; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (ap)

; 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_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_nxpool" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_dyn_block", %"struct.alglib_impl::ae_lock", %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.50 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [56 x i8], align 1

; 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_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl15ae_acquire_lockEPNS_7ae_lockE(ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17ae_nxpool_recycleEPNS_9ae_nxpoolEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.alglib_impl::ae_dyn_block", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %11, i32 0, i32 0
  %13 = load i64, ptr %12, align 8, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 1
  %16 = load i64, ptr %15, align 8, !tbaa !15
  %17 = icmp eq i64 %13, %16
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef @.str.50, ptr noundef %18)
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !17
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %22, i32 0, i32 1
  %24 = load i64, ptr %23, align 8, !tbaa !18
  %25 = icmp eq i64 %21, %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.51, ptr noundef %26)
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %27, i32 0, i32 5
  call void @_ZN11alglib_impl15ae_acquire_lockEPNS_7ae_lockE(ptr noundef %28)
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %29, i32 0, i32 3
  %31 = load i64, ptr %30, align 8, !tbaa !19
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %32, i32 0, i32 2
  %34 = load i64, ptr %33, align 8, !tbaa !20
  %35 = icmp eq i64 %31, %34
  br i1 %35, label %36, label %98

36:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %37, i32 0, i32 2
  %39 = load i64, ptr %38, align 8, !tbaa !20
  %40 = mul nsw i64 2, %39
  %41 = add nsw i64 %40, 5
  store i64 %41, ptr %7, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 32, i1 false)
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef %8, i64 noundef 0, ptr noundef %42, i1 noundef zeroext false)
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %43, i32 0, i32 4
  call void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef %8, ptr noundef %44)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %45, i32 0, i32 4
  %47 = load i64, ptr %7, align 8, !tbaa !21
  %48 = mul i64 %47, 32
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_db_reallocEPNS_12ae_dyn_blockElPNS_8ae_stateE(ptr noundef %46, i64 noundef %48, ptr noundef %49)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %50, i32 0, i32 4
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %51, i32 0, i32 2
  %53 = load volatile ptr, ptr %52, align 8, !tbaa !22
  %54 = load i64, ptr %7, align 8, !tbaa !21
  %55 = mul i64 %54, 32
  call void @llvm.memset.p0.i64(ptr align 1 %53, i8 0, i64 %55, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !21
  br label %56

56:                                               ; preds = %69, %36
  %57 = load i64, ptr %9, align 8, !tbaa !21
  %58 = load i64, ptr %7, align 8, !tbaa !21
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %72

61:                                               ; preds = %56
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %62, i32 0, i32 4
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %63, i32 0, i32 2
  %65 = load volatile ptr, ptr %64, align 8, !tbaa !22
  %66 = load i64, ptr %9, align 8, !tbaa !21
  %67 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %65, i64 %66
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef %67, i64 noundef 0, ptr noundef %68, i1 noundef zeroext false)
  br label %69

69:                                               ; preds = %61
  %70 = load i64, ptr %9, align 8, !tbaa !21
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %9, align 8, !tbaa !21
  br label %56, !llvm.loop !23

72:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !21
  br label %73

73:                                               ; preds = %91, %72
  %74 = load i64, ptr %10, align 8, !tbaa !21
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %75, i32 0, i32 2
  %77 = load i64, ptr %76, align 8, !tbaa !20
  %78 = icmp slt i64 %74, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %94

80:                                               ; preds = %73
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %81, i32 0, i32 4
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %82, i32 0, i32 2
  %84 = load volatile ptr, ptr %83, align 8, !tbaa !22
  %85 = load i64, ptr %10, align 8, !tbaa !21
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %84, i64 %85
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %8, i32 0, i32 2
  %88 = load volatile ptr, ptr %87, align 8, !tbaa !25
  %89 = load i64, ptr %10, align 8, !tbaa !21
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %88, i64 %89
  call void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef %86, ptr noundef %90)
  br label %91

91:                                               ; preds = %80
  %92 = load i64, ptr %10, align 8, !tbaa !21
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %10, align 8, !tbaa !21
  br label %73, !llvm.loop !26

94:                                               ; preds = %79
  call void @_ZN11alglib_impl10ae_db_freeEPNS_12ae_dyn_blockE(ptr noundef %8)
  %95 = load i64, ptr %7, align 8, !tbaa !21
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %96, i32 0, i32 2
  store i64 %95, ptr %97, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %98

98:                                               ; preds = %94, %3
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %99, i32 0, i32 3
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %101, i32 0, i32 4
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %102, i32 0, i32 2
  %104 = load volatile ptr, ptr %103, align 8, !tbaa !22
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %105, i32 0, i32 3
  %107 = load i64, ptr %106, align 8, !tbaa !19
  %108 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %104, i64 %107
  call void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef %100, ptr noundef %108)
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %109, i32 0, i32 3
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %110, i32 0, i32 2
  %112 = load volatile ptr, ptr %111, align 8, !tbaa !27
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %113, i32 0, i32 4
  store ptr %112, ptr %114, align 8, !tbaa !28
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 0
  store i64 0, ptr %116, align 8, !tbaa !17
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %117, i32 0, i32 3
  %119 = load i64, ptr %118, align 8, !tbaa !19
  %120 = add nsw i64 %119, 1
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %121, i32 0, i32 3
  store i64 %120, ptr %122, align 8, !tbaa !19
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_nxpool", ptr %123, i32 0, i32 5
  call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef %124)
  ret void
}

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 = { mustprogress nounwind 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, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl9ae_nxpoolE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 64, !12, i64 112}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !12, i64 8, !14, i64 40}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !11, i64 8}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !14, i64 16, !12, i64 24, !7, i64 56}
!17 = !{!16, !11, i64 0}
!18 = !{!10, !11, i64 8}
!19 = !{!10, !11, i64 24}
!20 = !{!10, !11, i64 16}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !6, i64 48}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!12, !6, i64 16}
!26 = distinct !{!26, !24}
!27 = !{!16, !6, i64 40}
!28 = !{!7, !7, i64 0}


; 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_dyn_block" = type { ptr, ptr, ptr, ptr }

@.str.50 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [56 x i8], align 1

; 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_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl15ae_acquire_lockEPNS_7ae_lockE(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17ae_nxpool_recycleEPNS_9ae_nxpoolEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %"struct.alglib_impl::ae_dyn_block", align 8
  %5 = load i64, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load i64, ptr %6, align 8, !tbaa !14
  %8 = icmp eq i64 %5, %7
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.50, ptr noundef %2)
  %9 = load i64, ptr %1, align 8, !tbaa !16
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !17
  %12 = icmp eq i64 %9, %11
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.51, ptr noundef %2)
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZN11alglib_impl15ae_acquire_lockEPNS_7ae_lockE(ptr noundef nonnull %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load i64, ptr %14, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load i64, ptr %16, align 8, !tbaa !19
  %18 = icmp eq i64 %15, %17
  br i1 %18, label %19, label %41

19:                                               ; preds = %3
  %20 = shl i64 %15, 1
  %21 = add i64 %20, 5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 0, i64 32, i1 false)
  call void @_ZN11alglib_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef nonnull %4, i64 noundef 0, ptr noundef %2, i1 noundef zeroext false)
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef nonnull %4, ptr noundef nonnull %22)
  %23 = shl i64 %21, 5
  call void @_ZN11alglib_impl13ae_db_reallocEPNS_12ae_dyn_blockElPNS_8ae_stateE(ptr noundef nonnull %22, i64 noundef %23, ptr noundef %2)
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  %25 = load volatile ptr, ptr %24, align 8, !tbaa !20
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %25, i8 0, i64 %23, i1 false)
  %26 = icmp sgt i64 %15, -3
  br i1 %26, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %19
  %smax = call i64 @llvm.smax.i64(i64 %21, i64 1)
  br label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %19
  %27 = load i64, ptr %16, align 8, !tbaa !19
  %28 = icmp sgt i64 %27, 0
  br i1 %28, label %.lr.ph44, label %._crit_edge

.lr.ph44:                                         ; preds = %.preheader
  %29 = getelementptr inbounds i8, ptr %4, i64 16
  br label %33

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.03942 = phi i64 [ %32, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %30 = load volatile ptr, ptr %24, align 8, !tbaa !20
  %31 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %30, i64 %.03942
  call void @_ZN11alglib_impl10ae_db_initEPNS_12ae_dyn_blockElPNS_8ae_stateEb(ptr noundef %31, i64 noundef 0, ptr noundef %2, i1 noundef zeroext false)
  %32 = add nuw nsw i64 %.03942, 1
  %exitcond.not = icmp eq i64 %32, %smax
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %33, %.preheader
  call void @_ZN11alglib_impl10ae_db_freeEPNS_12ae_dyn_blockE(ptr noundef nonnull %4)
  store i64 %21, ptr %16, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %.pre = load i64, ptr %14, align 8, !tbaa !18
  br label %41

33:                                               ; preds = %.lr.ph44, %33
  %.043 = phi i64 [ 0, %.lr.ph44 ], [ %38, %33 ]
  %34 = load volatile ptr, ptr %24, align 8, !tbaa !20
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %34, i64 %.043
  %36 = load volatile ptr, ptr %29, align 8, !tbaa !23
  %37 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %36, i64 %.043
  call void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef %35, ptr noundef %37)
  %38 = add nuw nsw i64 %.043, 1
  %39 = load i64, ptr %16, align 8, !tbaa !19
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %33, label %._crit_edge, !llvm.loop !24

41:                                               ; preds = %._crit_edge, %3
  %42 = phi i64 [ %.pre, %._crit_edge ], [ %15, %3 ]
  %43 = getelementptr inbounds i8, ptr %1, i64 24
  %44 = getelementptr inbounds i8, ptr %0, i64 48
  %45 = load volatile ptr, ptr %44, align 8, !tbaa !20
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_dyn_block", ptr %45, i64 %42
  call void @_ZN11alglib_impl10ae_db_swapEPNS_12ae_dyn_blockES1_(ptr noundef nonnull %43, ptr noundef %46)
  %47 = getelementptr inbounds i8, ptr %1, i64 40
  %48 = load volatile ptr, ptr %47, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %1, i64 56
  store ptr %48, ptr %49, align 8, !tbaa !26
  store i64 0, ptr %1, align 8, !tbaa !16
  %50 = load i64, ptr %14, align 8, !tbaa !18
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %14, align 8, !tbaa !18
  call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef nonnull %13)
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

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 = { mustprogress nounwind 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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_impl9ae_nxpoolE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !12, i64 64, !10, i64 112}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl7ae_lockE", !11, i64 0, !10, i64 8, !13, i64 40}
!13 = !{!"bool", !8, i64 0}
!14 = !{!15, !7, i64 8}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !13, i64 16, !10, i64 24, !8, i64 56}
!16 = !{!15, !7, i64 0}
!17 = !{!6, !7, i64 8}
!18 = !{!6, !7, i64 24}
!19 = !{!6, !7, i64 16}
!20 = !{!6, !11, i64 48}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!10, !11, i64 16}
!24 = distinct !{!24, !22}
!25 = !{!15, !11, i64 40}
!26 = !{!8, !8, i64 0}


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