; LLVM IR from Dimandragon/non-parametric-dsp :: 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"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_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl8mlpallocEPNS_13ae_serializerEPKNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", 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 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 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %18, ptr noundef %7)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 2, ptr noundef %19, i1 noundef zeroext true)
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %20, i32 0, i32 2
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = getelementptr inbounds i64, ptr %23, i64 0
  %25 = load i64, ptr %24, align 8, !tbaa !10
  store i64 %25, ptr %15, align 8, !tbaa !10
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %26, i32 0, i32 2
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %27, i32 0, i32 4
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %30, i32 0, i32 2
  %32 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %31, i32 0, i32 0
  %33 = load i64, ptr %32, align 8, !tbaa !12
  %34 = sub nsw i64 %33, 1
  %35 = getelementptr inbounds i64, ptr %29, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !10
  store i64 %36, ptr %16, align 8, !tbaa !10
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %37)
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %38)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %39)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %40, ptr noundef %42, i64 noundef -1, ptr noundef %43)
  store i64 1, ptr %8, align 8, !tbaa !10
  br label %44

44:                                               ; preds = %93, %3
  %45 = load i64, ptr %8, align 8, !tbaa !10
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %46, i32 0, i32 2
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 0
  %49 = load i64, ptr %48, align 8, !tbaa !12
  %50 = sub nsw i64 %49, 1
  %51 = icmp sle i64 %45, %50
  br i1 %51, label %52, label %96

52:                                               ; preds = %44
  store i64 0, ptr %9, align 8, !tbaa !10
  br label %53

53:                                               ; preds = %89, %52
  %54 = load i64, ptr %9, align 8, !tbaa !10
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %56, i32 0, i32 4
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = load i64, ptr %8, align 8, !tbaa !10
  %60 = getelementptr inbounds i64, ptr %58, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !10
  %62 = sub nsw i64 %61, 1
  %63 = icmp sle i64 %54, %62
  br i1 %63, label %64, label %92

64:                                               ; preds = %53
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load i64, ptr %8, align 8, !tbaa !10
  %67 = load i64, ptr %9, align 8, !tbaa !10
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_implL25mlpbase_mlpgetneuroninfoxEPKNS_20multilayerperceptronEllPNS_9ae_vectorEPlPdPNS_8ae_stateE(ptr noundef %65, i64 noundef %66, i64 noundef %67, ptr noundef %17, ptr noundef %11, ptr noundef %12, ptr noundef %68)
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %69)
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %70)
  store i64 0, ptr %10, align 8, !tbaa !10
  br label %71

71:                                               ; preds = %85, %64
  %72 = load i64, ptr %10, align 8, !tbaa !10
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = load i64, ptr %8, align 8, !tbaa !10
  %78 = sub nsw i64 %77, 1
  %79 = getelementptr inbounds i64, ptr %76, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !10
  %81 = sub nsw i64 %80, 1
  %82 = icmp sle i64 %72, %81
  br i1 %82, label %83, label %88

83:                                               ; preds = %71
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %84)
  br label %85

85:                                               ; preds = %83
  %86 = load i64, ptr %10, align 8, !tbaa !10
  %87 = add nsw i64 %86, 1
  store i64 %87, ptr %10, align 8, !tbaa !10
  br label %71, !llvm.loop !23

88:                                               ; preds = %71
  br label %89

89:                                               ; preds = %88
  %90 = load i64, ptr %9, align 8, !tbaa !10
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %9, align 8, !tbaa !10
  br label %53, !llvm.loop !25

92:                                               ; preds = %53
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %8, align 8, !tbaa !10
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %8, align 8, !tbaa !10
  br label %44, !llvm.loop !26

96:                                               ; preds = %44
  store i64 0, ptr %9, align 8, !tbaa !10
  br label %97

97:                                               ; preds = %108, %96
  %98 = load i64, ptr %9, align 8, !tbaa !10
  %99 = load i64, ptr %15, align 8, !tbaa !10
  %100 = sub nsw i64 %99, 1
  %101 = icmp sle i64 %98, %100
  br i1 %101, label %102, label %111

102:                                              ; preds = %97
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = load i64, ptr %9, align 8, !tbaa !10
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl18mlpgetinputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %103, i64 noundef %104, ptr noundef %13, ptr noundef %14, ptr noundef %105)
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %106)
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %107)
  br label %108

108:                                              ; preds = %102
  %109 = load i64, ptr %9, align 8, !tbaa !10
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %9, align 8, !tbaa !10
  br label %97, !llvm.loop !27

111:                                              ; preds = %97
  store i64 0, ptr %9, align 8, !tbaa !10
  br label %112

112:                                              ; preds = %123, %111
  %113 = load i64, ptr %9, align 8, !tbaa !10
  %114 = load i64, ptr %16, align 8, !tbaa !10
  %115 = sub nsw i64 %114, 1
  %116 = icmp sle i64 %113, %115
  br i1 %116, label %117, label %126

117:                                              ; preds = %112
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load i64, ptr %9, align 8, !tbaa !10
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl19mlpgetoutputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %118, i64 noundef %119, ptr noundef %13, ptr noundef %14, ptr noundef %120)
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %121)
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %122)
  br label %123

123:                                              ; preds = %117
  %124 = load i64, ptr %9, align 8, !tbaa !10
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %9, align 8, !tbaa !10
  br label %112, !llvm.loop !28

126:                                              ; preds = %112
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %127)
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
}

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

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

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

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

declare void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef) #3

declare void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"_ZTSN11alglib_impl20multilayerperceptronE", !11, i64 0, !11, i64 8, !14, i64 16, !14, i64 80, !14, i64 144, !14, i64 208, !14, i64 272, !14, i64 336, !14, i64 400, !14, i64 464, !14, i64 528, !14, i64 592, !14, i64 656, !14, i64 720, !17, i64 784, !14, i64 864, !14, i64 928, !14, i64 992, !18, i64 1056, !14, i64 1096, !20, i64 1160, !20, i64 1296, !17, i64 1432, !22, i64 1512, !14, i64 1880, !20, i64 1944}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !15, i64 32, !16, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl11modelerrorsE", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_ZTSN11alglib_impl14ae_shared_poolE", !21, i64 0, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !11, i64 80, !6, i64 88, !6, i64 96, !16, i64 104}
!21 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !16, i64 8, !15, i64 40}
!22 = !{!"_ZTSN11alglib_impl12sparsematrixE", !14, i64 0, !14, i64 64, !14, i64 128, !14, i64 192, !14, i64 256, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}


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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl8mlpallocEPNS_13ae_serializerEPKNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %"struct.alglib_impl::ae_frame", align 8
  %5 = alloca i64, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", 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 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #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(64) %9, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 2, ptr noundef %2, i1 noundef zeroext true)
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = getelementptr inbounds i8, ptr %1, i64 72
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = load i64, ptr %12, align 8, !tbaa !8
  %14 = load i64, ptr %10, align 8, !tbaa !10
  %15 = getelementptr i64, ptr %12, i64 %14
  %16 = getelementptr i8, ptr %15, i64 -8
  %17 = load i64, ptr %16, align 8, !tbaa !8
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %10, i64 noundef -1, ptr noundef %2)
  %18 = load i64, ptr %10, align 8, !tbaa !10
  %.not.not59 = icmp sgt i64 %18, 1
  br i1 %.not.not59, label %.preheader52.preheader, label %.preheader51

.preheader52.preheader:                           ; preds = %3
  %.pre = load ptr, ptr %11, align 8, !tbaa !5
  br label %.preheader52

.preheader52:                                     ; preds = %.preheader52.preheader, %._crit_edge58
  %19 = phi i64 [ %36, %._crit_edge58 ], [ %18, %.preheader52.preheader ]
  %20 = phi ptr [ %37, %._crit_edge58 ], [ %.pre, %.preheader52.preheader ]
  %.060 = phi i64 [ %38, %._crit_edge58 ], [ 1, %.preheader52.preheader ]
  %21 = getelementptr inbounds i64, ptr %20, i64 %.060
  %22 = load i64, ptr %21, align 8, !tbaa !8
  %.not.not4955 = icmp sgt i64 %22, 0
  br i1 %.not.not4955, label %.lr.ph57, label %._crit_edge58

.preheader51:                                     ; preds = %._crit_edge58, %3
  %.not.not4761 = icmp sgt i64 %13, 0
  br i1 %.not.not4761, label %.lr.ph63, label %.preheader

.lr.ph57:                                         ; preds = %.preheader52, %._crit_edge
  %.04556 = phi i64 [ %33, %._crit_edge ], [ 0, %.preheader52 ]
  call void @_ZN11alglib_implL25mlpbase_mlpgetneuroninfoxEPKNS_20multilayerperceptronEllPNS_9ae_vectorEPlPdPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %.060, i64 noundef %.04556, ptr noundef nonnull %9, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %2)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = getelementptr i64, ptr %23, i64 %.060
  %25 = getelementptr i8, ptr %24, i64 -8
  %26 = load i64, ptr %25, align 8, !tbaa !8
  %.not.not5053 = icmp sgt i64 %26, 0
  br i1 %.not.not5053, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph57, %.lr.ph
  %.04654 = phi i64 [ %27, %.lr.ph ], [ 0, %.lr.ph57 ]
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %27 = add nuw nsw i64 %.04654, 1
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = getelementptr i64, ptr %28, i64 %.060
  %30 = getelementptr i8, ptr %29, i64 -8
  %31 = load i64, ptr %30, align 8, !tbaa !8
  %.not.not50 = icmp slt i64 %27, %31
  br i1 %.not.not50, label %.lr.ph, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph57
  %32 = phi ptr [ %23, %.lr.ph57 ], [ %28, %.lr.ph ]
  %33 = add nuw nsw i64 %.04556, 1
  %34 = getelementptr inbounds i64, ptr %32, i64 %.060
  %35 = load i64, ptr %34, align 8, !tbaa !8
  %.not.not49 = icmp slt i64 %33, %35
  br i1 %.not.not49, label %.lr.ph57, label %._crit_edge58.loopexit, !llvm.loop !24

._crit_edge58.loopexit:                           ; preds = %._crit_edge
  %.pre69 = load i64, ptr %10, align 8, !tbaa !10
  br label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge58.loopexit, %.preheader52
  %36 = phi i64 [ %.pre69, %._crit_edge58.loopexit ], [ %19, %.preheader52 ]
  %37 = phi ptr [ %32, %._crit_edge58.loopexit ], [ %20, %.preheader52 ]
  %38 = add nuw nsw i64 %.060, 1
  %.not.not = icmp slt i64 %38, %36
  br i1 %.not.not, label %.preheader52, label %.preheader51, !llvm.loop !25

.preheader:                                       ; preds = %.lr.ph63, %.preheader51
  %.not.not4864 = icmp sgt i64 %17, 0
  br i1 %.not.not4864, label %.lr.ph66, label %._crit_edge67

.lr.ph63:                                         ; preds = %.preheader51, %.lr.ph63
  %.162 = phi i64 [ %39, %.lr.ph63 ], [ 0, %.preheader51 ]
  call void @_ZN11alglib_impl18mlpgetinputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %1, i64 noundef %.162, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %2)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %39 = add nuw nsw i64 %.162, 1
  %exitcond.not = icmp eq i64 %39, %13
  br i1 %exitcond.not, label %.preheader, label %.lr.ph63, !llvm.loop !26

.lr.ph66:                                         ; preds = %.preheader, %.lr.ph66
  %.265 = phi i64 [ %40, %.lr.ph66 ], [ 0, %.preheader ]
  call void @_ZN11alglib_impl19mlpgetoutputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %1, i64 noundef %.265, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %2)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %40 = add nuw nsw i64 %.265, 1
  %exitcond68.not = icmp eq i64 %40, %17
  br i1 %exitcond68.not, label %._crit_edge67, label %.lr.ph66, !llvm.loop !27

._crit_edge67:                                    ; preds = %.lr.ph66, %.preheader
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
}

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

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

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

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long", !6, i64 0}
!10 = !{!11, !9, i64 16}
!11 = !{!"_ZTSN11alglib_impl20multilayerperceptronE", !9, i64 0, !9, i64 8, !12, i64 16, !12, i64 80, !12, i64 144, !12, i64 208, !12, i64 272, !12, i64 336, !12, i64 400, !12, i64 464, !12, i64 528, !12, i64 592, !12, i64 656, !12, i64 720, !16, i64 784, !12, i64 864, !12, i64 928, !12, i64 992, !17, i64 1056, !12, i64 1096, !19, i64 1160, !19, i64 1296, !16, i64 1432, !21, i64 1512, !12, i64 1880, !19, i64 1944}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !9, i64 0, !9, i64 8, !13, i64 16, !14, i64 24, !6, i64 56}
!13 = !{!"bool", !6, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"any pointer", !6, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !13, i64 32, !14, i64 40, !6, i64 72}
!17 = !{!"_ZTSN11alglib_impl11modelerrorsE", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32}
!18 = !{!"double", !6, i64 0}
!19 = !{!"_ZTSN11alglib_impl14ae_shared_poolE", !20, i64 0, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !9, i64 80, !15, i64 88, !15, i64 96, !14, i64 104}
!20 = !{!"_ZTSN11alglib_impl7ae_lockE", !15, i64 0, !14, i64 8, !13, i64 40}
!21 = !{!"_ZTSN11alglib_impl12sparsematrixE", !12, i64 0, !12, i64 64, !12, i64 128, !12, i64 192, !12, i64 256, !9, i64 320, !9, i64 328, !9, i64 336, !9, i64 344, !9, i64 352, !9, i64 360}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}


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