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

; 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_smart_ptr" = type { ptr, ptr, i8, i8, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::xconicconstraints" = type { i64, %"struct.alglib_impl::ae_obj_array" }
%"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 }
%"struct.alglib_impl::xconicconstraint" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", 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.418 = external hidden unnamed_addr constant [30 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

declare noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef, ptr noundef) #1

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

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

declare void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl18ae_obj_array_clearEPNS_12ae_obj_arrayE(ptr noundef) #1

declare void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare noundef i64 @_ZN11alglib_impl23ae_obj_array_get_lengthEPKNS_12ae_obj_arrayE(ptr noundef) #1

declare void @_ZN11alglib_impl16ae_obj_array_getEPNS_12ae_obj_arrayElPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl11icopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl7xcccopyEPNS_17xconicconstraintsES1_PNS_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 %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %14 = alloca i8, align 1
  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 32, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %15, ptr noundef %7)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 80, i1 false)
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %11, ptr noundef %10, ptr noundef %16, i1 noundef zeroext true)
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %13, ptr noundef %12, ptr noundef %17, i1 noundef zeroext true)
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %18, i32 0, i32 0
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %21, i32 0, i32 0
  store i64 %20, ptr %22, align 8, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %23, i32 0, i32 1
  %25 = call noundef i64 @_ZN11alglib_impl23ae_obj_array_get_lengthEPKNS_12ae_obj_arrayE(ptr noundef %24)
  store i64 %25, ptr %9, align 8, !tbaa !16
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %26, i32 0, i32 1
  call void @_ZN11alglib_impl18ae_obj_array_clearEPNS_12ae_obj_arrayE(ptr noundef %27)
  store i64 0, ptr %8, align 8, !tbaa !16
  br label %28

28:                                               ; preds = %110, %3
  %29 = load i64, ptr %8, align 8, !tbaa !16
  %30 = load i64, ptr %9, align 8, !tbaa !16
  %31 = sub nsw i64 %30, 1
  %32 = icmp sle i64 %29, %31
  br i1 %32, label %33, label %113

33:                                               ; preds = %28
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %34, i32 0, i32 1
  %36 = load i64, ptr %8, align 8, !tbaa !16
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl16ae_obj_array_getEPNS_12ae_obj_arrayElPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %35, i64 noundef %36, ptr noundef %11, ptr noundef %37)
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = call noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef 216, ptr noundef %38)
  store ptr %39, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %40, i8 0, i64 216, i1 false)
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl22_xconicconstraint_initEPvPNS_8ae_stateEb(ptr noundef %41, ptr noundef %42, i1 noundef zeroext false)
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef %13, ptr noundef %43, i1 noundef zeroext true, i1 noundef zeroext true, i64 noundef 216, ptr noundef @_ZN11alglib_impl27_xconicconstraint_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef @_ZN11alglib_impl25_xconicconstraint_destroyEPv)
  store i8 0, ptr %14, align 1, !tbaa !17
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %44, i32 0, i32 0
  %46 = load i64, ptr %45, align 8, !tbaa !18
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %47, i32 0, i32 0
  store i64 %46, ptr %48, align 8, !tbaa !18
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %49, i32 0, i32 1
  %51 = load i64, ptr %50, align 8, !tbaa !21
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %52, i32 0, i32 1
  store i64 %51, ptr %53, align 8, !tbaa !21
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %54, i32 0, i32 5
  %56 = load i8, ptr %55, align 8, !tbaa !22, !range !23, !noundef !24
  %57 = trunc i8 %56 to i1
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %58, i32 0, i32 5
  %60 = zext i1 %57 to i8
  store i8 %60, ptr %59, align 8, !tbaa !22
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %61, i32 0, i32 0
  %63 = load i64, ptr %62, align 8, !tbaa !18
  %64 = icmp eq i64 %63, -1
  br i1 %64, label %70, label %65

65:                                               ; preds = %33
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !18
  %69 = icmp eq i64 %68, 1
  br i1 %69, label %70, label %102

70:                                               ; preds = %65, %33
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %71, i32 0, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !21
  %74 = icmp sgt i64 %73, 0
  br i1 %74, label %75, label %101

75:                                               ; preds = %70
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %76, i32 0, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !21
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl11icopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %78, ptr noundef %80, ptr noundef %82, ptr noundef %83)
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %84, i32 0, i32 1
  %86 = load i64, ptr %85, align 8, !tbaa !21
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %87, i32 0, i32 3
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %89, i32 0, i32 3
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %86, ptr noundef %88, ptr noundef %90, ptr noundef %91)
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %92, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !21
  %95 = add nsw i64 %94, 1
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::xconicconstraint", ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %95, ptr noundef %97, ptr noundef %99, ptr noundef %100)
  br label %101

101:                                              ; preds = %75, %70
  store i8 1, ptr %14, align 1, !tbaa !17
  br label %102

102:                                              ; preds = %101, %65
  %103 = load i8, ptr %14, align 1, !tbaa !17, !range !23, !noundef !24
  %104 = trunc i8 %103 to i1
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %104, ptr noundef @.str.418, ptr noundef %105)
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::xconicconstraints", ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = call noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %107, ptr noundef %13, ptr noundef %108)
  br label %110

110:                                              ; preds = %102
  %111 = load i64, ptr %8, align 8, !tbaa !16
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %8, align 8, !tbaa !16
  br label %28, !llvm.loop !25

113:                                              ; preds = %28
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %114)
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  ret void
}

declare void @_ZN11alglib_impl22_xconicconstraint_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl27_xconicconstraint_init_copyEPvPKvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl25_xconicconstraint_destroyEPv(ptr noundef) #1

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

!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_impl17xconicconstraintsE", !11, i64 0, !12, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !11, i64 0, !11, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !14, i64 56, !15, i64 104}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !15, i64 8, !13, i64 40}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!11, !11, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"_ZTSN11alglib_impl16xconicconstraintE", !11, i64 0, !11, i64 8, !20, i64 16, !20, i64 80, !20, i64 144, !13, i64 208}
!20 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !15, i64 24, !7, i64 56}
!21 = !{!19, !11, i64 8}
!22 = !{!19, !13, i64 208}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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

@.str.418 = external hidden unnamed_addr constant [30 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

declare noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef, ptr noundef) local_unnamed_addr #1

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

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl18ae_obj_array_clearEPNS_12ae_obj_arrayE(ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare noundef i64 @_ZN11alglib_impl23ae_obj_array_get_lengthEPKNS_12ae_obj_arrayE(ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl16ae_obj_array_getEPNS_12ae_obj_arrayElPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl11icopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl7xcccopyEPNS_17xconicconstraintsES1_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = alloca %"struct.alglib_impl::ae_frame", align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %2, ptr noundef nonnull %4)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %6, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %8, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef nonnull %5, ptr noundef %2, i1 noundef zeroext true)
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef nonnull %7, ptr noundef %2, i1 noundef zeroext true)
  %9 = load i64, ptr %0, align 8, !tbaa !5
  store i64 %9, ptr %1, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = call noundef i64 @_ZN11alglib_impl23ae_obj_array_get_lengthEPKNS_12ae_obj_arrayE(ptr noundef nonnull %10)
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  call void @_ZN11alglib_impl18ae_obj_array_clearEPNS_12ae_obj_arrayE(ptr noundef nonnull %12)
  %.not.not25 = icmp sgt i64 %11, 0
  br i1 %.not.not25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3, %42
  %.02226 = phi i64 [ %44, %42 ], [ 0, %3 ]
  call void @_ZN11alglib_impl16ae_obj_array_getEPNS_12ae_obj_arrayElPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %.02226, ptr noundef nonnull %6, ptr noundef %2)
  %13 = call noundef ptr @_ZN11alglib_impl9ae_mallocEmPNS_8ae_stateE(i64 noundef 216, ptr noundef %2)
  store ptr %13, ptr %7, align 8, !tbaa !15
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(216) %13, i8 0, i64 216, i1 false)
  call void @_ZN11alglib_impl22_xconicconstraint_initEPvPNS_8ae_stateEb(ptr noundef %13, ptr noundef %2, i1 noundef zeroext false)
  %14 = load ptr, ptr %7, align 8, !tbaa !15
  call void @_ZN11alglib_impl19ae_smart_ptr_assignEPNS_12ae_smart_ptrEPvbblPFvS2_PKvPNS_8ae_stateEbEPFvS2_E(ptr noundef nonnull %8, ptr noundef %14, i1 noundef zeroext true, i1 noundef zeroext true, i64 noundef 216, ptr noundef nonnull @_ZN11alglib_impl27_xconicconstraint_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef nonnull @_ZN11alglib_impl25_xconicconstraint_destroyEPv)
  %15 = load ptr, ptr %5, align 8, !tbaa !15
  %16 = load i64, ptr %15, align 8, !tbaa !16
  %17 = load ptr, ptr %7, align 8, !tbaa !15
  store i64 %16, ptr %17, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %15, i64 8
  %19 = load i64, ptr %18, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %17, i64 8
  store i64 %19, ptr %20, align 8, !tbaa !19
  %21 = getelementptr inbounds i8, ptr %15, i64 208
  %22 = load i8, ptr %21, align 8, !tbaa !20, !range !21, !noundef !22
  %23 = getelementptr inbounds i8, ptr %17, i64 208
  store i8 %22, ptr %23, align 8, !tbaa !20
  switch i64 %16, label %42 [
    i64 -1, label %24
    i64 1, label %24
  ]

24:                                               ; preds = %.lr.ph, %.lr.ph
  %25 = icmp sgt i64 %19, 0
  br i1 %25, label %26, label %42

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %15, i64 16
  %28 = getelementptr inbounds i8, ptr %17, i64 16
  call void @_ZN11alglib_impl11icopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %19, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %2)
  %29 = load ptr, ptr %5, align 8, !tbaa !15
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load i64, ptr %30, align 8, !tbaa !19
  %32 = getelementptr inbounds i8, ptr %29, i64 80
  %33 = load ptr, ptr %7, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %33, i64 80
  call void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %31, ptr noundef nonnull %32, ptr noundef nonnull %34, ptr noundef %2)
  %35 = load ptr, ptr %5, align 8, !tbaa !15
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load i64, ptr %36, align 8, !tbaa !19
  %38 = add nsw i64 %37, 1
  %39 = getelementptr inbounds i8, ptr %35, i64 144
  %40 = load ptr, ptr %7, align 8, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %40, i64 144
  call void @_ZN11alglib_impl11rcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %38, ptr noundef nonnull %39, ptr noundef nonnull %41, ptr noundef %2)
  br label %42

42:                                               ; preds = %24, %26, %.lr.ph
  %.0 = phi i1 [ false, %.lr.ph ], [ true, %26 ], [ true, %24 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %.0, ptr noundef nonnull @.str.418, ptr noundef %2)
  %43 = call noundef i64 @_ZN11alglib_impl28ae_obj_array_append_transferEPNS_12ae_obj_arrayEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef nonnull %8, ptr noundef %2)
  %44 = add nuw nsw i64 %.02226, 1
  %exitcond.not = icmp eq i64 %44, %11
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %42, %3
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret void
}

declare void @_ZN11alglib_impl22_xconicconstraint_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN11alglib_impl27_xconicconstraint_init_copyEPvPKvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare void @_ZN11alglib_impl25_xconicconstraint_destroyEPv(ptr noundef) #1

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

!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_impl17xconicconstraintsE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl12ae_obj_arrayE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !14, i64 104}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSN11alglib_impl7ae_lockE", !12, i64 0, !14, i64 8, !11, i64 40}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl16xconicconstraintE", !7, i64 0, !7, i64 8, !18, i64 16, !18, i64 80, !18, i64 144, !11, i64 208}
!18 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !14, i64 24, !8, i64 56}
!19 = !{!17, !7, i64 8}
!20 = !{!17, !11, i64 208}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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