; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src/ap.ll (ZN6alglib17ae_vector_wrapper6assignERKS0_)

; 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.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%"struct.alglib_impl::ae_state" = type { i64, double, double, double, ptr, %"struct.alglib_impl::ae_dyn_block", ptr, i32, ptr, i64, ptr, ptr, ptr }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"class.alglib::ae_vector_wrapper" = type <{ ptr, ptr, %"struct.alglib_impl::ae_vector", i8, [7 x i8] }>
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@_ZTIN6alglib8ap_errorE = external dso_local constant { ptr, ptr }, align 8
@.str.56 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [65 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: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef) #1

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6alglib8ap_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(81) ptr @_ZN6alglib17ae_vector_wrapper6assignERKS0_(ptr noundef nonnull align 8 dereferenceable(81) %0, ptr noundef nonnull align 8 dereferenceable(81) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1 x %struct.__jmp_buf_tag], align 16
  %7 = alloca %"struct.alglib_impl::ae_state", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 200, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %7) #6
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = icmp eq ptr %11, %12
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  store ptr %11, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %99

15:                                               ; preds = %2
  call void @_ZN11alglib_impl13ae_state_initEPNS_8ae_stateE(ptr noundef %7)
  %16 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %6, i64 0, i64 0
  %17 = call i32 @_setjmp(ptr noundef %16) #7
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %28

19:                                               ; preds = %15
  %20 = call ptr @__cxa_allocate_exception(i64 32) #6
  %21 = getelementptr inbounds %"struct.alglib_impl::ae_state", ptr %7, i32 0, i32 8
  %22 = load volatile ptr, ptr %21, align 8, !tbaa !9
  invoke void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %22)
          to label %23 unwind label %24

23:                                               ; preds = %19
  call void @__cxa_throw(ptr %20, ptr @_ZTIN6alglib8ap_errorE, ptr @_ZN6alglib8ap_errorD2Ev) #8
  unreachable

24:                                               ; preds = %19
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %9, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %10, align 4
  call void @__cxa_free_exception(ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %6) #6
  br label %101

28:                                               ; preds = %15
  call void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef %7, ptr noundef %6)
  %29 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !16
  %31 = icmp ne ptr %30, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.56, ptr noundef %7)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = icmp ne ptr %34, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.57, ptr noundef %7)
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %38, i32 0, i32 1
  %40 = load i64, ptr %39, align 8, !tbaa !20
  %41 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !20
  %45 = icmp eq i64 %40, %44
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.58, ptr noundef %7)
  %46 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 3
  %47 = load i8, ptr %46, align 8, !tbaa !21, !range !22, !noundef !23
  %48 = trunc i8 %47 to i1
  br i1 %48, label %49, label %60

49:                                               ; preds = %28
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %52, i32 0, i32 0
  %54 = load i64, ptr %53, align 8, !tbaa !24
  %55 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %56, i32 0, i32 0
  %58 = load i64, ptr %57, align 8, !tbaa !24
  %59 = icmp eq i64 %54, %58
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %59, ptr noundef @.str.59, ptr noundef %7)
  br label %60

60:                                               ; preds = %49, %28
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !16
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %63, i32 0, i32 0
  %65 = load i64, ptr %64, align 8, !tbaa !24
  %66 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !16
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %67, i32 0, i32 0
  %69 = load i64, ptr %68, align 8, !tbaa !24
  %70 = icmp ne i64 %65, %69
  br i1 %70, label %71, label %79

71:                                               ; preds = %60
  %72 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !16
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !16
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %76, i32 0, i32 0
  %78 = load i64, ptr %77, align 8, !tbaa !24
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %73, i64 noundef %78, ptr noundef %7)
  br label %79

79:                                               ; preds = %71, %60
  %80 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !25
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %86, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !25
  %89 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 0
  %92 = load i64, ptr %91, align 8, !tbaa !24
  %93 = getelementptr inbounds %"class.alglib::ae_vector_wrapper", ptr %11, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8, !tbaa !16
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %94, i32 0, i32 1
  %96 = load i64, ptr %95, align 8, !tbaa !20
  %97 = call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %96)
  %98 = mul nsw i64 %92, %97
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %83, ptr align 1 %88, i64 %98, i1 false)
  call void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef %7)
  store ptr %11, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %99

99:                                               ; preds = %79, %14
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %6) #6
  %100 = load ptr, ptr %3, align 8
  ret ptr %100

101:                                              ; preds = %24
  %102 = load ptr, ptr %9, align 8
  %103 = load i32, ptr %10, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

declare void @_ZN6alglib8ap_errorC1EPKc(ptr, ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { nounwind returns_twice "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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }
attributes #8 = { noreturn }

!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 88}
!10 = !{!"_ZTSN11alglib_impl8ae_stateE", !11, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !6, i64 32, !13, i64 40, !6, i64 72, !14, i64 80, !6, i64 88, !15, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"long", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !7, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSN6alglib17ae_vector_wrapperE", !6, i64 8, !18, i64 16, !19, i64 80}
!18 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !19, i64 16, !13, i64 24, !7, i64 56}
!19 = !{!"bool", !7, i64 0}
!20 = !{!18, !11, i64 8}
!21 = !{!17, !19, i64 80}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!18, !11, i64 0}
!25 = !{!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.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%"struct.alglib_impl::ae_state" = type { i64, double, double, double, ptr, %"struct.alglib_impl::ae_dyn_block", ptr, i32, ptr, i64, ptr, ptr, ptr }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }

@_ZTIN6alglib8ap_errorE = external dso_local constant { ptr, ptr }, align 8
@.str.56 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [65 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 uwtable
declare dso_local void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef, ptr noundef) 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 #1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6alglib8ap_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(81) ptr @_ZN6alglib17ae_vector_wrapper6assignERKS0_(ptr noundef nonnull readonly returned align 8 dereferenceable(81) %0, ptr noundef nonnull readonly align 8 dereferenceable(81) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [1 x %struct.__jmp_buf_tag], align 16
  %4 = alloca %"struct.alglib_impl::ae_state", align 8
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #6
  %5 = icmp eq ptr %0, %1
  br i1 %5, label %56, label %6

6:                                                ; preds = %2
  call void @_ZN11alglib_impl13ae_state_initEPNS_8ae_stateE(ptr noundef nonnull %4)
  %7 = call i32 @_setjmp(ptr noundef nonnull %3) #7
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %15, label %8

8:                                                ; preds = %6
  %9 = call ptr @__cxa_allocate_exception(i64 32) #6
  %10 = getelementptr inbounds i8, ptr %4, i64 88
  %11 = load volatile ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6alglib8ap_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %11)
          to label %12 unwind label %13

12:                                               ; preds = %8
  call void @__cxa_throw(ptr %9, ptr nonnull @_ZTIN6alglib8ap_errorE, ptr nonnull @_ZN6alglib8ap_errorD2Ev) #8
  unreachable

13:                                               ; preds = %8
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %3) #6
  resume { ptr, i32 } %14

15:                                               ; preds = %6
  call void @_ZN11alglib_impl23ae_state_set_break_jumpEPNS_8ae_stateEPA1_13__jmp_buf_tag(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = icmp ne ptr %17, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.56, ptr noundef nonnull %4)
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = icmp ne ptr %20, null
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.57, ptr noundef nonnull %4)
  %22 = load ptr, ptr %19, align 8, !tbaa !15
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load i64, ptr %23, align 8, !tbaa !19
  %25 = load ptr, ptr %16, align 8, !tbaa !15
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i64, ptr %26, align 8, !tbaa !19
  %28 = icmp eq i64 %24, %27
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef nonnull @.str.58, ptr noundef nonnull %4)
  %29 = getelementptr inbounds i8, ptr %0, i64 80
  %30 = load i8, ptr %29, align 8, !tbaa !20, !range !21, !noundef !22
  %31 = trunc nuw i8 %30 to i1
  br i1 %31, label %32, label %38

32:                                               ; preds = %15
  %33 = load ptr, ptr %19, align 8, !tbaa !15
  %34 = load i64, ptr %33, align 8, !tbaa !23
  %35 = load ptr, ptr %16, align 8, !tbaa !15
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %37 = icmp eq i64 %34, %36
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef nonnull @.str.59, ptr noundef nonnull %4)
  br label %38

38:                                               ; preds = %32, %15
  %39 = load ptr, ptr %19, align 8, !tbaa !15
  %40 = load i64, ptr %39, align 8, !tbaa !23
  %41 = load ptr, ptr %16, align 8, !tbaa !15
  %42 = load i64, ptr %41, align 8, !tbaa !23
  %.not12 = icmp eq i64 %40, %42
  br i1 %.not12, label %44, label %43

43:                                               ; preds = %38
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %41, i64 noundef %40, ptr noundef nonnull %4)
  %.pre = load ptr, ptr %16, align 8, !tbaa !15
  %.pre13 = load ptr, ptr %19, align 8, !tbaa !15
  %.pre14 = load i64, ptr %.pre, align 8, !tbaa !23
  br label %44

44:                                               ; preds = %43, %38
  %45 = phi i64 [ %.pre14, %43 ], [ %40, %38 ]
  %46 = phi ptr [ %.pre13, %43 ], [ %39, %38 ]
  %47 = phi ptr [ %.pre, %43 ], [ %41, %38 ]
  %48 = getelementptr inbounds i8, ptr %47, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %50 = getelementptr inbounds i8, ptr %46, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !24
  %52 = getelementptr inbounds i8, ptr %47, i64 8
  %53 = load i64, ptr %52, align 8, !tbaa !19
  %54 = call noundef i64 @_ZN11alglib_impl9ae_sizeofEl(i64 noundef %53)
  %55 = mul nsw i64 %54, %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %49, ptr align 1 %51, i64 %55, i1 false)
  call void @_ZN11alglib_impl14ae_state_clearEPNS_8ae_stateE(ptr noundef nonnull %4)
  br label %56

56:                                               ; preds = %2, %44
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %3) #6
  ret ptr %0
}

declare void @_ZN6alglib8ap_errorC1EPKc(ptr, ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { nounwind returns_twice "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 #6 = { nounwind }
attributes #7 = { nounwind returns_twice }
attributes #8 = { noreturn }

!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, !11, i64 88}
!6 = !{!"_ZTSN11alglib_impl8ae_stateE", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !12, i64 40, !11, i64 72, !13, i64 80, !11, i64 88, !14, i64 96, !11, i64 104, !11, i64 112, !11, i64 120}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!13 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !8, i64 0}
!14 = !{!"long long", !8, i64 0}
!15 = !{!16, !11, i64 8}
!16 = !{!"_ZTSN6alglib17ae_vector_wrapperE", !11, i64 8, !17, i64 16, !18, i64 80}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !18, i64 16, !12, i64 24, !8, i64 56}
!18 = !{!"bool", !8, i64 0}
!19 = !{!17, !7, i64 8}
!20 = !{!16, !18, i64 80}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!17, !7, i64 0}
!24 = !{!8, !8, i64 0}


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