; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (dataanalysis)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::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, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::multilayerperceptron" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::modelerrors", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::modelerrors" = type { double, double, double, double, double }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::mlpbuffers" = type { i64, i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

; 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 nounwind uwtable
declare dso_local void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #5
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %20, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 64, i1 false)
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  store double 0.000000e+00, ptr %21, align 8, !tbaa !11
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %19, ptr noundef %18, ptr noundef %22, i1 noundef zeroext true)
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef %23, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %24)
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %25, i32 0, i32 20
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %26, ptr noundef %19, ptr noundef %27)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %28, i32 0, i32 6
  %30 = load i64, ptr %17, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = call noundef i64 @_ZN11alglib_impl9mlpntotalEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %31, ptr noundef %32)
  %34 = load i64, ptr %15, align 8, !tbaa !9
  %35 = load i64, ptr %16, align 8, !tbaa !9
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef %29, i64 noundef %30, i64 noundef %33, i64 noundef %34, i64 noundef %35, ptr noundef %36, ptr noundef %37)
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = load i64, ptr %17, align 8, !tbaa !9
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %38, i64 noundef %39, ptr noundef %40)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %52, %6
  %42 = load i64, ptr %14, align 8, !tbaa !9
  %43 = load i64, ptr %17, align 8, !tbaa !9
  %44 = sub nsw i64 %43, 1
  %45 = icmp sle i64 %42, %44
  br i1 %45, label %46, label %55

46:                                               ; preds = %41
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = load i64, ptr %14, align 8, !tbaa !9
  %51 = getelementptr inbounds double, ptr %49, i64 %50
  store double 0.000000e+00, ptr %51, align 8, !tbaa !11
  br label %52

52:                                               ; preds = %46
  %53 = load i64, ptr %14, align 8, !tbaa !9
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %14, align 8, !tbaa !9
  br label %41, !llvm.loop !14

55:                                               ; preds = %41
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  store double 0.000000e+00, ptr %56, align 8, !tbaa !11
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %62, %55
  %58 = load i64, ptr %14, align 8, !tbaa !9
  %59 = load i64, ptr %9, align 8, !tbaa !9
  %60 = sub nsw i64 %59, 1
  %61 = icmp sle i64 %58, %60
  br i1 %61, label %62, label %87

62:                                               ; preds = %57
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = load i64, ptr %14, align 8, !tbaa !9
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = load i64, ptr %14, align 8, !tbaa !9
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %68, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !16
  %71 = add nsw i64 %67, %70
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %66, i64 noundef %71, ptr noundef %72)
  %74 = load i64, ptr %14, align 8, !tbaa !9
  %75 = sub nsw i64 %73, %74
  %76 = load ptr, ptr %18, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %76, i32 0, i32 5
  %78 = load ptr, ptr %18, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %78, i32 0, i32 6
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_implL26mlpbase_mlpchunkedgradientEPNS_20multilayerperceptronEPNS_9ae_matrixEllPNS_9ae_vectorES5_PdbPNS_8ae_stateE(ptr noundef %63, ptr noundef %64, i64 noundef %65, i64 noundef %75, ptr noundef %77, ptr noundef %79, ptr noundef %80, i1 noundef zeroext true, ptr noundef %81)
  %82 = load i64, ptr %14, align 8, !tbaa !9
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %83, i32 0, i32 0
  %85 = load i64, ptr %84, align 8, !tbaa !16
  %86 = add nsw i64 %82, %85
  store i64 %86, ptr %14, align 8, !tbaa !9
  br label %57, !llvm.loop !22

87:                                               ; preds = %57
  %88 = load ptr, ptr %18, align 8, !tbaa !5
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl26hpcfinalizechunkedgradientEPNS_10mlpbuffersEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %88, ptr noundef %89, ptr noundef %90)
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %91, i32 0, i32 20
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %92, ptr noundef %19, ptr noundef %93)
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %94)
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  ret void
}

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #4

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #4

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #4

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

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

declare void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #4

declare void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #4

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

declare void @_ZN11alglib_impl26hpcfinalizechunkedgradientEPNS_10mlpbuffersEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #4

declare void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #4

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

!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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl10mlpbuffersE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !18, i64 40, !18, i64 104, !21, i64 168, !21, i64 248, !18, i64 328, !18, i64 392, !18, i64 456, !18, i64 520, !12, i64 584, !18, i64 592, !18, i64 656}
!18 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !19, i64 16, !20, i64 24, !7, i64 56}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !19, i64 32, !20, i64 40, !7, i64 72}
!22 = distinct !{!22, !15}


; 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, ptr, %"struct.alglib_impl::ae_dyn_block" }

; 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 nounwind uwtable
declare dso_local void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef %5)
  %13 = getelementptr inbounds i8, ptr %0, i64 1160
  call void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %13, ptr noundef nonnull %12, ptr noundef %5)
  %14 = getelementptr inbounds i8, ptr %0, i64 272
  %15 = load i64, ptr %10, align 8, !tbaa !9
  %16 = call noundef i64 @_ZN11alglib_impl9mlpntotalEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %0, ptr noundef %5)
  %17 = load i64, ptr %8, align 8, !tbaa !9
  %18 = load i64, ptr %9, align 8, !tbaa !9
  %19 = load ptr, ptr %11, align 8, !tbaa !11
  call void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %15, i64 noundef %16, i64 noundef %17, i64 noundef %18, ptr noundef %19, ptr noundef %5)
  %20 = load i64, ptr %10, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %20, ptr noundef %5)
  %21 = load i64, ptr %10, align 8, !tbaa !9
  %.not.not35 = icmp sgt i64 %21, 0
  br i1 %.not.not35, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %22 = getelementptr inbounds i8, ptr %4, i64 56
  %xtraiter = and i64 %21, 3
  %23 = icmp ult i64 %21, 4
  br i1 %23, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %21, 9223372036854775804
  br label %24

24:                                               ; preds = %24, %.lr.ph.new
  %.036 = phi i64 [ 0, %.lr.ph.new ], [ %36, %24 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %24 ]
  %25 = load ptr, ptr %22, align 8, !tbaa !13
  %26 = getelementptr inbounds double, ptr %25, i64 %.036
  store double 0.000000e+00, ptr %26, align 8, !tbaa !5
  %27 = or disjoint i64 %.036, 1
  %28 = load ptr, ptr %22, align 8, !tbaa !13
  %29 = getelementptr inbounds double, ptr %28, i64 %27
  store double 0.000000e+00, ptr %29, align 8, !tbaa !5
  %30 = or disjoint i64 %.036, 2
  %31 = load ptr, ptr %22, align 8, !tbaa !13
  %32 = getelementptr inbounds double, ptr %31, i64 %30
  store double 0.000000e+00, ptr %32, align 8, !tbaa !5
  %33 = or disjoint i64 %.036, 3
  %34 = load ptr, ptr %22, align 8, !tbaa !13
  %35 = getelementptr inbounds double, ptr %34, i64 %33
  store double 0.000000e+00, ptr %35, align 8, !tbaa !5
  %36 = add nuw nsw i64 %.036, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %24, !llvm.loop !14

._crit_edge.loopexit.unr-lcssa:                   ; preds = %24, %.lr.ph
  %.036.unr = phi i64 [ 0, %.lr.ph ], [ %36, %24 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.036.epil = phi i64 [ %39, %.epil.preheader ], [ %.036.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %37 = load ptr, ptr %22, align 8, !tbaa !13
  %38 = getelementptr inbounds double, ptr %37, i64 %.036.epil
  store double 0.000000e+00, ptr %38, align 8, !tbaa !5
  %39 = add nuw nsw i64 %.036.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !16

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %6
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  %.not.not3437 = icmp sgt i64 %2, 0
  %.pre43 = load ptr, ptr %11, align 8, !tbaa !11
  br i1 %.not.not3437, label %.lr.ph40.preheader, label %._crit_edge41

.lr.ph40.preheader:                               ; preds = %._crit_edge
  %.pre42 = load i64, ptr %.pre43, align 8, !tbaa !18
  br label %.lr.ph40

.lr.ph40:                                         ; preds = %.lr.ph40.preheader, %.lr.ph40
  %40 = phi i64 [ %48, %.lr.ph40 ], [ %.pre42, %.lr.ph40.preheader ]
  %.138 = phi i64 [ %49, %.lr.ph40 ], [ 0, %.lr.ph40.preheader ]
  %41 = add nsw i64 %40, %.138
  %42 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %2, i64 noundef %41, ptr noundef %5)
  %43 = sub nsw i64 %42, %.138
  %44 = load ptr, ptr %11, align 8, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %44, i64 40
  %46 = getelementptr inbounds i8, ptr %44, i64 104
  call void @_ZN11alglib_implL26mlpbase_mlpchunkedgradientEPNS_20multilayerperceptronEPNS_9ae_matrixEllPNS_9ae_vectorES5_PdbPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %.138, i64 noundef %43, ptr noundef nonnull %45, ptr noundef nonnull %46, ptr noundef nonnull %3, i1 noundef zeroext true, ptr noundef %5)
  %47 = load ptr, ptr %11, align 8, !tbaa !11
  %48 = load i64, ptr %47, align 8, !tbaa !18
  %49 = add nsw i64 %48, %.138
  %.not.not34 = icmp slt i64 %49, %2
  br i1 %.not.not34, label %.lr.ph40, label %._crit_edge41, !llvm.loop !24

._crit_edge41:                                    ; preds = %.lr.ph40, %._crit_edge
  %50 = phi ptr [ %.pre43, %._crit_edge ], [ %47, %.lr.ph40 ]
  call void @_ZN11alglib_impl26hpcfinalizechunkedgradientEPNS_10mlpbuffersEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %50, ptr noundef %4, ptr noundef %5)
  call void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %13, ptr noundef nonnull %12, ptr noundef %5)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  ret void
}

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare void @_ZN11alglib_impl26hpcfinalizechunkedgradientEPNS_10mlpbuffersEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #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 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 = { "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 }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSN11alglib_impl10mlpbuffersE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !20, i64 40, !20, i64 104, !23, i64 168, !23, i64 248, !20, i64 328, !20, i64 392, !20, i64 456, !20, i64 520, !6, i64 584, !20, i64 592, !20, i64 656}
!20 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !21, i64 16, !22, i64 24, !7, i64 56}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!23 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !21, i64 32, !22, i64 40, !7, i64 72}
!24 = distinct !{!24, !15}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass