; LLVM IR from Dimandragon/non-parametric-dsp :: 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::decisionforestbuilder" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, double, double, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", i64, i64, %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", i8, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, 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 }
%"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 uwtable
define dso_local void @_ZN11alglib_impl15dfbuildercreateEPNS_21decisionforestbuilderEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl28_decisionforestbuilder_clearEPv(ptr noundef %5)
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %6, i32 0, i32 0
  store i64 -1, ptr %7, align 8, !tbaa !9
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %8, i32 0, i32 1
  store i64 0, ptr %9, align 8, !tbaa !19
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %10, i32 0, i32 2
  store i64 0, ptr %11, align 8, !tbaa !20
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %12, i32 0, i32 3
  store i64 1, ptr %13, align 8, !tbaa !21
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %14, i32 0, i32 7
  store i64 0, ptr %15, align 8, !tbaa !22
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %16, i32 0, i32 8
  store double 5.000000e-01, ptr %17, align 8, !tbaa !23
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %18, i32 0, i32 9
  store double 0.000000e+00, ptr %19, align 8, !tbaa !24
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %20, i32 0, i32 10
  store i64 0, ptr %21, align 8, !tbaa !25
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %22, i32 0, i32 11
  store i64 2, ptr %23, align 8, !tbaa !26
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %24, i32 0, i32 12
  store i64 0, ptr %25, align 8, !tbaa !27
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %26, i32 0, i32 18
  store i64 0, ptr %27, align 8, !tbaa !28
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::decisionforestbuilder", ptr %28, i32 0, i32 19
  store i64 1, ptr %29, align 8, !tbaa !29
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl28_decisionforestbuilder_clearEPv(ptr noundef) #0

attributes #0 = { 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" }

!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, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl21decisionforestbuilderE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 96, !12, i64 160, !11, i64 224, !15, i64 232, !15, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !12, i64 272, !12, i64 336, !12, i64 400, !15, i64 464, !12, i64 472, !11, i64 536, !11, i64 544, !16, i64 552, !16, i64 688, !16, i64 824, !16, i64 960, !13, i64 1096, !18, i64 1104, !12, i64 1184}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl14ae_shared_poolE", !17, i64 0, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !11, i64 80, !6, i64 88, !6, i64 96, !14, i64 104}
!17 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !14, i64 8, !13, i64 40}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!19 = !{!10, !11, i64 8}
!20 = !{!10, !11, i64 16}
!21 = !{!10, !11, i64 24}
!22 = !{!10, !11, i64 224}
!23 = !{!10, !15, i64 232}
!24 = !{!10, !15, i64 240}
!25 = !{!10, !11, i64 248}
!26 = !{!10, !11, i64 256}
!27 = !{!10, !11, i64 264}
!28 = !{!10, !11, i64 536}
!29 = !{!10, !11, i64 544}


; 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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15dfbuildercreateEPNS_21decisionforestbuilderEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  tail call void @_ZN11alglib_impl28_decisionforestbuilder_clearEPv(ptr noundef %0)
  store i64 -1, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  store i64 1, ptr %4, align 8, !tbaa !18
  %5 = getelementptr inbounds i8, ptr %0, i64 224
  store i64 0, ptr %5, align 8, !tbaa !19
  %6 = getelementptr inbounds i8, ptr %0, i64 232
  store double 5.000000e-01, ptr %6, align 8, !tbaa !20
  %7 = getelementptr inbounds i8, ptr %0, i64 240
  %8 = getelementptr inbounds i8, ptr %0, i64 256
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 0, i64 16, i1 false)
  store i64 2, ptr %8, align 8, !tbaa !21
  %9 = getelementptr inbounds i8, ptr %0, i64 264
  store i64 0, ptr %9, align 8, !tbaa !22
  %10 = getelementptr inbounds i8, ptr %0, i64 536
  store i64 0, ptr %10, align 8, !tbaa !23
  %11 = getelementptr inbounds i8, ptr %0, i64 544
  store i64 1, ptr %11, align 8, !tbaa !24
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl28_decisionforestbuilder_clearEPv(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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_impl21decisionforestbuilderE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 96, !10, i64 160, !7, i64 224, !14, i64 232, !14, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !10, i64 272, !10, i64 336, !10, i64 400, !14, i64 464, !10, i64 472, !7, i64 536, !7, i64 544, !15, i64 552, !15, i64 688, !15, i64 824, !15, i64 960, !11, i64 1096, !17, i64 1104, !10, i64 1184}
!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 = !{!"double", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl14ae_shared_poolE", !16, i64 0, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !7, i64 80, !13, i64 88, !13, i64 96, !12, i64 104}
!16 = !{!"_ZTSN11alglib_impl7ae_lockE", !13, i64 0, !12, i64 8, !11, i64 40}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!18 = !{!6, !7, i64 24}
!19 = !{!6, !7, i64 224}
!20 = !{!6, !14, i64 232}
!21 = !{!6, !7, i64 256}
!22 = !{!6, !7, i64 264}
!23 = !{!6, !7, i64 536}
!24 = !{!6, !7, i64 544}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass