; 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_smart_ptr" = type { ptr, ptr, i8, i8, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_obj_array" = type { i64, i64, i8, ptr, ptr, ptr, ptr, %"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 }

@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @abort() #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl18ae_mfence_locklessEv() #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl23ae_unsafe_volatile_readEPKl(ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL26_ae_obj_array_set_capacityEPNS_12ae_obj_arrayElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  %10 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %9, i32 0, i32 1
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = icmp eq ptr %11, null
  br i1 %12, label %18, label %13

13:                                               ; preds = %3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %14, i32 0, i32 2
  %16 = load i8, ptr %15, align 8, !tbaa !14, !range !15, !noundef !16
  %17 = trunc i8 %16 to i1
  br label %18

18:                                               ; preds = %13, %3
  %19 = phi i1 [ true, %3 ], [ %17, %13 ]
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.29, ptr noundef %20)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %21, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = icmp eq ptr %23, null
  br i1 %24, label %30, label %25

25:                                               ; preds = %18
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %26, i32 0, i32 3
  %28 = load i8, ptr %27, align 1, !tbaa !17, !range !15, !noundef !16
  %29 = trunc i8 %28 to i1
  br label %30

30:                                               ; preds = %25, %18
  %31 = phi i1 [ true, %18 ], [ %29, %25 ]
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.30, ptr noundef %32)
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %33, i32 0, i32 7
  call void @_ZN11alglib_impl15ae_acquire_lockEPNS_7ae_lockE(ptr noundef %34)
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %35, i32 0, i32 0
  %37 = call noundef i64 @_ZN11alglib_impl23ae_unsafe_volatile_readEPKl(ptr noundef %36)
  store i64 %37, ptr %8, align 8, !tbaa !18
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %38, i32 0, i32 2
  %40 = load i8, ptr %39, align 8, !tbaa !19, !range !15, !noundef !16
  %41 = trunc i8 %40 to i1
  br i1 %41, label %42, label %52

42:                                               ; preds = %30
  %43 = load i64, ptr %8, align 8, !tbaa !18
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %44, i32 0, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !22
  %47 = icmp sge i64 %43, %46
  br i1 %47, label %48, label %52

48:                                               ; preds = %42
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %49, i32 0, i32 7
  call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef %50)
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.31, ptr noundef %51)
  br label %52

52:                                               ; preds = %48, %42, %30
  %53 = load i64, ptr %8, align 8, !tbaa !18
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %54, i32 0, i32 1
  %56 = load i64, ptr %55, align 8, !tbaa !22
  %57 = icmp eq i64 %53, %56
  br i1 %57, label %58, label %78

58:                                               ; preds = %52
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %59, i32 0, i32 2
  %61 = load i8, ptr %60, align 8, !tbaa !19, !range !15, !noundef !16
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  call void @abort() #5
  unreachable

64:                                               ; preds = %58
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %66, i32 0, i32 1
  %68 = load i64, ptr %67, align 8, !tbaa !22
  %69 = mul nsw i64 2, %68
  %70 = add nsw i64 %69, 8
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call noundef zeroext i1 @_ZN11alglib_implL26_ae_obj_array_set_capacityEPNS_12ae_obj_arrayElPNS_8ae_stateE(ptr noundef %65, i64 noundef %70, ptr noundef %71)
  br i1 %72, label %77, label %73

73:                                               ; preds = %64
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %74, i32 0, i32 7
  call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef %75)
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.32, ptr noundef %76)
  br label %77

77:                                               ; preds = %73, %64
  br label %78

78:                                               ; preds = %77, %52
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %126

83:                                               ; preds = %78
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %87, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !23
  %90 = load i64, ptr %8, align 8, !tbaa !18
  %91 = getelementptr inbounds ptr, ptr %89, i64 %90
  store ptr %86, ptr %91, align 8, !tbaa !5
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %92, i32 0, i32 4
  %94 = load i64, ptr %93, align 8, !tbaa !24
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %95, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !25
  %98 = load i64, ptr %8, align 8, !tbaa !18
  %99 = getelementptr inbounds i64, ptr %97, i64 %98
  store i64 %94, ptr %99, align 8, !tbaa !18
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %100, i32 0, i32 5
  %102 = load ptr, ptr %101, align 8, !tbaa !26
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %103, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !27
  %106 = load i64, ptr %8, align 8, !tbaa !18
  %107 = getelementptr inbounds ptr, ptr %105, i64 %106
  store ptr %102, ptr %107, align 8, !tbaa !5
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %108, i32 0, i32 6
  %110 = load ptr, ptr %109, align 8, !tbaa !28
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %111, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !29
  %114 = load i64, ptr %8, align 8, !tbaa !18
  %115 = getelementptr inbounds ptr, ptr %113, i64 %114
  store ptr %110, ptr %115, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %116, i32 0, i32 2
  store i8 0, ptr %117, align 8, !tbaa !14
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %118, i32 0, i32 3
  store i8 0, ptr %119, align 1, !tbaa !17
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %120, i32 0, i32 4
  store i64 0, ptr %121, align 8, !tbaa !24
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %122, i32 0, i32 5
  store ptr null, ptr %123, align 8, !tbaa !26
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_smart_ptr", ptr %124, i32 0, i32 6
  store ptr null, ptr %125, align 8, !tbaa !28
  br label %147

126:                                              ; preds = %78
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %127, i32 0, i32 3
  %129 = load ptr, ptr %128, align 8, !tbaa !23
  %130 = load i64, ptr %8, align 8, !tbaa !18
  %131 = getelementptr inbounds ptr, ptr %129, i64 %130
  store ptr null, ptr %131, align 8, !tbaa !5
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !25
  %135 = load i64, ptr %8, align 8, !tbaa !18
  %136 = getelementptr inbounds i64, ptr %134, i64 %135
  store i64 0, ptr %136, align 8, !tbaa !18
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %137, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !27
  %140 = load i64, ptr %8, align 8, !tbaa !18
  %141 = getelementptr inbounds ptr, ptr %139, i64 %140
  store ptr null, ptr %141, align 8, !tbaa !5
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %142, i32 0, i32 6
  %144 = load ptr, ptr %143, align 8, !tbaa !29
  %145 = load i64, ptr %8, align 8, !tbaa !18
  %146 = getelementptr inbounds ptr, ptr %144, i64 %145
  store ptr null, ptr %146, align 8, !tbaa !5
  br label %147

147:                                              ; preds = %126, %83
  call void @_ZN11alglib_impl18ae_mfence_locklessEv()
  %148 = load i64, ptr %8, align 8, !tbaa !18
  store i64 %148, ptr %7, align 8, !tbaa !18
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %149, i32 0, i32 0
  %151 = load i64, ptr %8, align 8, !tbaa !18
  %152 = add nsw i64 %151, 1
  call void @_ZN11alglib_impl15ae_unsafe_writeEPll(ptr noundef %150, i64 noundef %152)
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_obj_array", ptr %153, i32 0, i32 7
  call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef %154)
  %155 = load i64, ptr %7, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret i64 %155
}

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

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

attributes #0 = { noreturn nounwind "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { noreturn 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, !6, i64 8}
!10 = !{!"_ZTSN11alglib_impl12ae_smart_ptrE", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 17, !12, i64 24, !6, i64 32, !6, i64 40, !13, i64 48}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!10, !11, i64 16}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!10, !11, i64 17}
!18 = !{!12, !12, i64 0}
!19 = !{!20, !11, i64 16}
!20 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !12, i64 0, !12, i64 8, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !21, i64 56, !13, i64 104}
!21 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !13, i64 8, !11, i64 40}
!22 = !{!20, !12, i64 8}
!23 = !{!20, !6, i64 24}
!24 = !{!10, !12, i64 24}
!25 = !{!20, !6, i64 32}
!26 = !{!10, !6, i64 32}
!27 = !{!20, !6, i64 40}
!28 = !{!10, !6, i64 40}
!29 = !{!20, !6, i64 48}


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

@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl18ae_mfence_locklessEv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl23ae_unsafe_volatile_readEPKl(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl15ae_unsafe_writeEPll(ptr noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %11, label %7

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = load i8, ptr %8, align 8, !tbaa !13, !range !14, !noundef !15
  %10 = trunc nuw i8 %9 to i1
  br label %11

11:                                               ; preds = %7, %3
  %12 = phi i1 [ true, %3 ], [ %10, %7 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.29, ptr noundef %2)
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %19, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %1, i64 17
  %17 = load i8, ptr %16, align 1, !tbaa !16, !range !14, !noundef !15
  %18 = trunc nuw i8 %17 to i1
  br label %19

19:                                               ; preds = %15, %11
  %20 = phi i1 [ true, %11 ], [ %18, %15 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.30, ptr noundef %2)
  %21 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZN11alglib_impl15ae_acquire_lockEPNS_7ae_lockE(ptr noundef nonnull %21)
  %22 = tail call noundef i64 @_ZN11alglib_impl23ae_unsafe_volatile_readEPKl(ptr noundef %0)
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = load i8, ptr %23, align 8, !tbaa !17, !range !14, !noundef !15
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %30

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  %28 = load i64, ptr %27, align 8, !tbaa !20
  %.not = icmp slt i64 %22, %28
  br i1 %.not, label %30, label %29

29:                                               ; preds = %26
  tail call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef nonnull %21)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.31, ptr noundef %2)
  br label %30

30:                                               ; preds = %29, %26, %19
  %31 = getelementptr inbounds i8, ptr %0, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !20
  %33 = icmp eq i64 %22, %32
  br i1 %33, label %34, label %43

34:                                               ; preds = %30
  %35 = load i8, ptr %23, align 8, !tbaa !17, !range !14, !noundef !15
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  tail call void @abort() #4
  unreachable

38:                                               ; preds = %34
  %39 = shl nsw i64 %22, 1
  %40 = add nsw i64 %39, 8
  %41 = tail call noundef zeroext i1 @_ZN11alglib_implL26_ae_obj_array_set_capacityEPNS_12ae_obj_arrayElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %40, ptr noundef %2)
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  tail call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef nonnull %21)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.32, ptr noundef %2)
  br label %43

43:                                               ; preds = %38, %42, %30
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %.not52 = icmp eq ptr %44, null
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = getelementptr inbounds ptr, ptr %46, i64 %22
  br i1 %.not52, label %66, label %48

48:                                               ; preds = %43
  store ptr %44, ptr %47, align 8, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %1, i64 24
  %50 = load i64, ptr %49, align 8, !tbaa !23
  %51 = getelementptr inbounds i8, ptr %0, i64 32
  %52 = load ptr, ptr %51, align 8, !tbaa !24
  %53 = getelementptr inbounds i64, ptr %52, i64 %22
  store i64 %50, ptr %53, align 8, !tbaa !25
  %54 = getelementptr inbounds i8, ptr %1, i64 32
  %55 = load ptr, ptr %54, align 8, !tbaa !26
  %56 = getelementptr inbounds i8, ptr %0, i64 40
  %57 = load ptr, ptr %56, align 8, !tbaa !27
  %58 = getelementptr inbounds ptr, ptr %57, i64 %22
  store ptr %55, ptr %58, align 8, !tbaa !22
  %59 = getelementptr inbounds i8, ptr %1, i64 40
  %60 = load ptr, ptr %59, align 8, !tbaa !28
  %61 = getelementptr inbounds i8, ptr %0, i64 48
  %62 = load ptr, ptr %61, align 8, !tbaa !29
  %63 = getelementptr inbounds ptr, ptr %62, i64 %22
  store ptr %60, ptr %63, align 8, !tbaa !22
  %64 = getelementptr inbounds i8, ptr %1, i64 16
  store i8 0, ptr %64, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %1, i64 17
  store i8 0, ptr %65, align 1, !tbaa !16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %49, i8 0, i64 24, i1 false)
  br label %76

66:                                               ; preds = %43
  store ptr null, ptr %47, align 8, !tbaa !22
  %67 = getelementptr inbounds i8, ptr %0, i64 32
  %68 = load ptr, ptr %67, align 8, !tbaa !24
  %69 = getelementptr inbounds i64, ptr %68, i64 %22
  store i64 0, ptr %69, align 8, !tbaa !25
  %70 = getelementptr inbounds i8, ptr %0, i64 40
  %71 = load ptr, ptr %70, align 8, !tbaa !27
  %72 = getelementptr inbounds ptr, ptr %71, i64 %22
  store ptr null, ptr %72, align 8, !tbaa !22
  %73 = getelementptr inbounds i8, ptr %0, i64 48
  %74 = load ptr, ptr %73, align 8, !tbaa !29
  %75 = getelementptr inbounds ptr, ptr %74, i64 %22
  store ptr null, ptr %75, align 8, !tbaa !22
  br label %76

76:                                               ; preds = %66, %48
  tail call void @_ZN11alglib_impl18ae_mfence_locklessEv()
  %77 = add nsw i64 %22, 1
  tail call void @_ZN11alglib_impl15ae_unsafe_writeEPll(ptr noundef nonnull %0, i64 noundef %77)
  tail call void @_ZN11alglib_impl15ae_release_lockEPNS_7ae_lockE(ptr noundef nonnull %21)
  ret i64 %22
}

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

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

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

attributes #0 = { noreturn nounwind "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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { noreturn 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 8}
!6 = !{!"_ZTSN11alglib_impl12ae_smart_ptrE", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 17, !11, i64 24, !7, i64 32, !7, i64 40, !12, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!13 = !{!6, !10, i64 16}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!6, !10, i64 17}
!17 = !{!18, !10, i64 16}
!18 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !11, i64 0, !11, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !19, i64 56, !12, i64 104}
!19 = !{!"_ZTSN11alglib_impl7ae_lockE", !7, i64 0, !12, i64 8, !10, i64 40}
!20 = !{!18, !11, i64 8}
!21 = !{!18, !7, i64 24}
!22 = !{!7, !7, i64 0}
!23 = !{!6, !11, i64 24}
!24 = !{!18, !7, i64 32}
!25 = !{!11, !11, i64 0}
!26 = !{!6, !7, i64 32}
!27 = !{!18, !7, i64 40}
!28 = !{!6, !7, i64 40}
!29 = !{!18, !7, i64 48}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass