; 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_impl10dfrmserrorEPNS_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 = %158, %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 %161

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 %136

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
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %132, %98
  %100 = load i64, ptr %13, align 8, !tbaa !9
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !17
  %104 = sub nsw i64 %103, 1
  %105 = icmp sle i64 %100, %104
  br i1 %105, label %106, label %135

106:                                              ; preds = %99
  %107 = load i64, ptr %13, align 8, !tbaa !9
  %108 = load i64, ptr %14, align 8, !tbaa !9
  %109 = icmp eq i64 %107, %108
  br i1 %109, label %110, label %121

110:                                              ; preds = %106
  %111 = load double, ptr %16, align 8, !tbaa !18
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !20
  %114 = load i64, ptr %13, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !18
  %117 = fsub double %116, 1.000000e+00
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %117, ptr noundef %118)
  %120 = fadd double %111, %119
  store double %120, ptr %16, align 8, !tbaa !18
  br label %131

121:                                              ; preds = %106
  %122 = load double, ptr %16, align 8, !tbaa !18
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = getelementptr inbounds double, ptr %124, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !18
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %127, ptr noundef %128)
  %130 = fadd double %122, %129
  store double %130, ptr %16, align 8, !tbaa !18
  br label %131

131:                                              ; preds = %121, %110
  br label %132

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

135:                                              ; preds = %99
  br label %157

136:                                              ; preds = %37
  %137 = load double, ptr %16, align 8, !tbaa !18
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !20
  %140 = getelementptr inbounds double, ptr %139, i64 0
  %141 = load double, ptr %140, align 8, !tbaa !18
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %142, i32 0, i32 6
  %144 = load ptr, ptr %143, align 8, !tbaa !20
  %145 = load i64, ptr %12, align 8, !tbaa !9
  %146 = getelementptr inbounds ptr, ptr %144, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %148, i32 0, i32 0
  %150 = load i64, ptr %149, align 8, !tbaa !11
  %151 = getelementptr inbounds double, ptr %147, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !18
  %153 = fsub double %141, %152
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %153, ptr noundef %154)
  %156 = fadd double %137, %155
  store double %156, ptr %16, align 8, !tbaa !18
  br label %157

157:                                              ; preds = %136, %135
  br label %158

158:                                              ; preds = %157
  %159 = load i64, ptr %12, align 8, !tbaa !9
  %160 = add nsw i64 %159, 1
  store i64 %160, ptr %12, align 8, !tbaa !9
  br label %32, !llvm.loop !24

161:                                              ; preds = %32
  %162 = load double, ptr %16, align 8, !tbaa !18
  %163 = load i64, ptr %7, align 8, !tbaa !9
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::decisionforest", ptr %164, i32 0, i32 1
  %166 = load i64, ptr %165, align 8, !tbaa !17
  %167 = mul nsw i64 %163, %166
  %168 = sitofp i64 %167 to double
  %169 = fdiv double %162, %168
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %169, ptr noundef %170)
  store double %171, ptr %16, align 8, !tbaa !18
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %172)
  %173 = 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 %173
}

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 double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr 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_impl7ae_sqrtEdPNS_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}
!24 = distinct !{!24, !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_impl10dfrmserrorEPNS_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.not61 = icmp sgt i64 %2, 0
  br i1 %.not.not61, label %.lr.ph64, label %._crit_edge

.lr.ph64:                                         ; 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.ph64, %.loopexit
  %.063 = phi double [ 0.000000e+00, %.lr.ph64 ], [ %.3, %.loopexit ]
  %.04962 = phi i64 [ 0, %.lr.ph64 ], [ %67, %.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 %.04962
  %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 %55

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

.preheader:                                       ; preds = %.lr.ph, %24
  %33 = phi i64 [ %32, %24 ], [ %41, %.lr.ph ]
  %.not.not5357 = icmp sgt i64 %33, 0
  br i1 %.not.not5357, label %.lr.ph60, label %.loopexit

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

.lr.ph60:                                         ; preds = %.preheader, %51
  %.159 = phi double [ %.2, %51 ], [ %.063, %.preheader ]
  %.15158 = phi i64 [ %53, %51 ], [ 0, %.preheader ]
  %42 = icmp eq i64 %.15158, %31
  %43 = load ptr, ptr %13, align 8, !tbaa !16
  br i1 %42, label %44, label %48

44:                                               ; preds = %.lr.ph60
  %45 = getelementptr inbounds double, ptr %43, i64 %31
  %46 = load double, ptr %45, align 8, !tbaa !18
  %47 = fadd double %46, -1.000000e+00
  br label %51

48:                                               ; preds = %.lr.ph60
  %49 = getelementptr inbounds double, ptr %43, i64 %.15158
  %50 = load double, ptr %49, align 8, !tbaa !18
  br label %51

51:                                               ; preds = %44, %48
  %.sink = phi double [ %47, %44 ], [ %50, %48 ]
  %52 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %.sink, ptr noundef %3)
  %.2 = fadd double %.159, %52
  %53 = add nuw nsw i64 %.15158, 1
  %54 = load i64, ptr %9, align 8, !tbaa !15
  %.not.not53 = icmp slt i64 %53, %54
  br i1 %.not.not53, label %.lr.ph60, label %.loopexit, !llvm.loop !22

55:                                               ; preds = %14
  %56 = load ptr, ptr %13, align 8, !tbaa !16
  %57 = load double, ptr %56, align 8, !tbaa !18
  %58 = load ptr, ptr %12, align 8, !tbaa !16
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.04962
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = load i64, ptr %0, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %60, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !18
  %64 = fsub double %57, %63
  %65 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %64, ptr noundef %3)
  %66 = fadd double %.063, %65
  br label %.loopexit

.loopexit:                                        ; preds = %51, %.preheader, %55
  %.3 = phi double [ %66, %55 ], [ %.063, %.preheader ], [ %.2, %51 ]
  %67 = add nuw nsw i64 %.04962, 1
  %exitcond.not = icmp eq i64 %67, %2
  br i1 %exitcond.not, label %._crit_edge, label %14, !llvm.loop !23

._crit_edge:                                      ; preds = %.loopexit, %4
  %.0.lcssa = phi double [ 0.000000e+00, %4 ], [ %.3, %.loopexit ]
  %68 = load i64, ptr %9, align 8, !tbaa !15
  %69 = mul nsw i64 %68, %2
  %70 = sitofp i64 %69 to double
  %71 = fdiv double %.0.lcssa, %70
  %72 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %71, ptr noundef %3)
  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 %72
}

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 double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr 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_impl7ae_sqrtEdPNS_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}
!23 = distinct !{!23, !21}


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