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

@_ZN11alglib_implL23mlpbase_mlpfirstversionE = external hidden global i64, align 8

; 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_impl12mlpserializeEPNS_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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, 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 64, ptr %17) #5
  %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
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = call noundef i64 @_ZN11alglib_impl23getmlpserializationcodeEPNS_8ae_stateE(ptr noundef %38)
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl27ae_serializer_serialize_intEPNS_13ae_serializerElPNS_8ae_stateE(ptr noundef %37, i64 noundef %39, ptr noundef %40)
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load i64, ptr @_ZN11alglib_implL23mlpbase_mlpfirstversionE, align 8, !tbaa !10
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl27ae_serializer_serialize_intEPNS_13ae_serializerElPNS_8ae_stateE(ptr noundef %41, i64 noundef %42, ptr noundef %43)
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPKNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %45, ptr noundef %46)
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl28ae_serializer_serialize_boolEPNS_13ae_serializerEbPNS_8ae_stateE(ptr noundef %44, i1 noundef zeroext %47, ptr noundef %48)
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl21serializeintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %49, ptr noundef %51, i64 noundef -1, ptr noundef %52)
  store i64 1, ptr %8, align 8, !tbaa !10
  br label %53

53:                                               ; preds = %115, %3
  %54 = load i64, ptr %8, 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 0
  %58 = load i64, ptr %57, align 8, !tbaa !12
  %59 = sub nsw i64 %58, 1
  %60 = icmp sle i64 %54, %59
  br i1 %60, label %61, label %118

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

62:                                               ; preds = %111, %61
  %63 = load i64, ptr %9, align 8, !tbaa !10
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %64, i32 0, i32 2
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %65, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = load i64, ptr %8, align 8, !tbaa !10
  %69 = getelementptr inbounds i64, ptr %67, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !10
  %71 = sub nsw i64 %70, 1
  %72 = icmp sle i64 %63, %71
  br i1 %72, label %73, label %114

73:                                               ; preds = %62
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = load i64, ptr %8, align 8, !tbaa !10
  %76 = load i64, ptr %9, align 8, !tbaa !10
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_implL25mlpbase_mlpgetneuroninfoxEPKNS_20multilayerperceptronEllPNS_9ae_vectorEPlPdPNS_8ae_stateE(ptr noundef %74, i64 noundef %75, i64 noundef %76, ptr noundef %17, ptr noundef %11, ptr noundef %12, ptr noundef %77)
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = load i64, ptr %11, align 8, !tbaa !10
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl27ae_serializer_serialize_intEPNS_13ae_serializerElPNS_8ae_stateE(ptr noundef %78, i64 noundef %79, ptr noundef %80)
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = load double, ptr %12, align 8, !tbaa !23
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %81, double noundef %82, ptr noundef %83)
  store i64 0, ptr %10, align 8, !tbaa !10
  br label %84

84:                                               ; preds = %107, %73
  %85 = load i64, ptr %10, align 8, !tbaa !10
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %86, i32 0, i32 2
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = load i64, ptr %8, align 8, !tbaa !10
  %91 = sub nsw i64 %90, 1
  %92 = getelementptr inbounds i64, ptr %89, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !10
  %94 = sub nsw i64 %93, 1
  %95 = icmp sle i64 %85, %94
  br i1 %95, label %96, label %110

96:                                               ; preds = %84
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load i64, ptr %8, align 8, !tbaa !10
  %100 = sub nsw i64 %99, 1
  %101 = load i64, ptr %10, align 8, !tbaa !10
  %102 = load i64, ptr %8, align 8, !tbaa !10
  %103 = load i64, ptr %9, align 8, !tbaa !10
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = call noundef double @_ZN11alglib_implL21mlpbase_mlpgetweightxEPKNS_20multilayerperceptronEllllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %98, i64 noundef %100, i64 noundef %101, i64 noundef %102, i64 noundef %103, ptr noundef %17, ptr noundef %104)
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %97, double noundef %105, ptr noundef %106)
  br label %107

107:                                              ; preds = %96
  %108 = load i64, ptr %10, align 8, !tbaa !10
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %10, align 8, !tbaa !10
  br label %84, !llvm.loop !24

110:                                              ; preds = %84
  br label %111

111:                                              ; preds = %110
  %112 = load i64, ptr %9, align 8, !tbaa !10
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %9, align 8, !tbaa !10
  br label %62, !llvm.loop !26

114:                                              ; preds = %62
  br label %115

115:                                              ; preds = %114
  %116 = load i64, ptr %8, align 8, !tbaa !10
  %117 = add nsw i64 %116, 1
  store i64 %117, ptr %8, align 8, !tbaa !10
  br label %53, !llvm.loop !27

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

119:                                              ; preds = %134, %118
  %120 = load i64, ptr %9, align 8, !tbaa !10
  %121 = load i64, ptr %15, align 8, !tbaa !10
  %122 = sub nsw i64 %121, 1
  %123 = icmp sle i64 %120, %122
  br i1 %123, label %124, label %137

124:                                              ; preds = %119
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load i64, ptr %9, align 8, !tbaa !10
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl18mlpgetinputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %125, i64 noundef %126, ptr noundef %13, ptr noundef %14, ptr noundef %127)
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = load double, ptr %13, align 8, !tbaa !23
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %128, double noundef %129, ptr noundef %130)
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = load double, ptr %14, align 8, !tbaa !23
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %131, double noundef %132, ptr noundef %133)
  br label %134

134:                                              ; preds = %124
  %135 = load i64, ptr %9, align 8, !tbaa !10
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %9, align 8, !tbaa !10
  br label %119, !llvm.loop !28

137:                                              ; preds = %119
  store i64 0, ptr %9, align 8, !tbaa !10
  br label %138

138:                                              ; preds = %153, %137
  %139 = load i64, ptr %9, align 8, !tbaa !10
  %140 = load i64, ptr %16, align 8, !tbaa !10
  %141 = sub nsw i64 %140, 1
  %142 = icmp sle i64 %139, %141
  br i1 %142, label %143, label %156

143:                                              ; preds = %138
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load i64, ptr %9, align 8, !tbaa !10
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl19mlpgetoutputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %144, i64 noundef %145, ptr noundef %13, ptr noundef %14, ptr noundef %146)
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = load double, ptr %13, align 8, !tbaa !23
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %147, double noundef %148, ptr noundef %149)
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = load double, ptr %14, align 8, !tbaa !23
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %150, double noundef %151, ptr noundef %152)
  br label %153

153:                                              ; preds = %143
  %154 = load i64, ptr %9, align 8, !tbaa !10
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %9, align 8, !tbaa !10
  br label %138, !llvm.loop !29

156:                                              ; preds = %138
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %157)
  call void @llvm.lifetime.end.p0(i64 64, 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 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  ret void
}

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

; 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) #4

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #4

; 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

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

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

declare noundef i64 @_ZN11alglib_impl23getmlpserializationcodeEPNS_8ae_stateE(ptr noundef) #4

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

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

declare void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef, double 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 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 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 #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 = !{!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 = !{!19, !19, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}


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

@_ZN11alglib_implL23mlpbase_mlpfirstversionE = external hidden local_unnamed_addr global i64, align 8

; 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_impl12mlpserializeEPNS_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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  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
  %18 = call noundef i64 @_ZN11alglib_impl23getmlpserializationcodeEPNS_8ae_stateE(ptr noundef %2)
  call void @_ZN11alglib_impl27ae_serializer_serialize_intEPNS_13ae_serializerElPNS_8ae_stateE(ptr noundef %0, i64 noundef %18, ptr noundef %2)
  %19 = load i64, ptr @_ZN11alglib_implL23mlpbase_mlpfirstversionE, align 8, !tbaa !8
  call void @_ZN11alglib_impl27ae_serializer_serialize_intEPNS_13ae_serializerElPNS_8ae_stateE(ptr noundef %0, i64 noundef %19, ptr noundef %2)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPKNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %1, ptr noundef %2)
  call void @_ZN11alglib_impl28ae_serializer_serialize_boolEPNS_13ae_serializerEbPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext %20, ptr noundef %2)
  call void @_ZN11alglib_impl21serializeintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %10, i64 noundef -1, ptr noundef %2)
  %21 = load i64, ptr %10, align 8, !tbaa !10
  %.not.not78 = icmp sgt i64 %21, 1
  br i1 %.not.not78, label %.preheader71.preheader, label %.preheader70

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

.preheader71:                                     ; preds = %.preheader71.preheader, %._crit_edge77
  %22 = phi i64 [ %42, %._crit_edge77 ], [ %21, %.preheader71.preheader ]
  %23 = phi ptr [ %43, %._crit_edge77 ], [ %.pre, %.preheader71.preheader ]
  %.079 = phi i64 [ %44, %._crit_edge77 ], [ 1, %.preheader71.preheader ]
  %24 = getelementptr inbounds i64, ptr %23, i64 %.079
  %25 = load i64, ptr %24, align 8, !tbaa !8
  %.not.not6874 = icmp sgt i64 %25, 0
  br i1 %.not.not6874, label %.lr.ph76, label %._crit_edge77

.lr.ph76:                                         ; preds = %.preheader71
  %26 = add nsw i64 %.079, -1
  br label %27

.preheader70:                                     ; preds = %._crit_edge77, %3
  %.not.not6680 = icmp sgt i64 %13, 0
  br i1 %.not.not6680, label %.lr.ph82, label %.preheader

27:                                               ; preds = %.lr.ph76, %._crit_edge
  %.06475 = phi i64 [ 0, %.lr.ph76 ], [ %39, %._crit_edge ]
  call void @_ZN11alglib_implL25mlpbase_mlpgetneuroninfoxEPKNS_20multilayerperceptronEllPNS_9ae_vectorEPlPdPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %.079, i64 noundef %.06475, ptr noundef nonnull %9, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %2)
  %28 = load i64, ptr %5, align 8, !tbaa !8
  call void @_ZN11alglib_impl27ae_serializer_serialize_intEPNS_13ae_serializerElPNS_8ae_stateE(ptr noundef %0, i64 noundef %28, ptr noundef %2)
  %29 = load double, ptr %6, align 8, !tbaa !22
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %0, double noundef %29, ptr noundef %2)
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = getelementptr inbounds i64, ptr %30, i64 %26
  %32 = load i64, ptr %31, align 8, !tbaa !8
  %.not.not6972 = icmp sgt i64 %32, 0
  br i1 %.not.not6972, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %27, %.lr.ph
  %.06573 = phi i64 [ %34, %.lr.ph ], [ 0, %27 ]
  %33 = call noundef double @_ZN11alglib_implL21mlpbase_mlpgetweightxEPKNS_20multilayerperceptronEllllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %26, i64 noundef %.06573, i64 noundef %.079, i64 noundef %.06475, ptr noundef nonnull %9, ptr noundef %2)
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %0, double noundef %33, ptr noundef %2)
  %34 = add nuw nsw i64 %.06573, 1
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds i64, ptr %35, i64 %26
  %37 = load i64, ptr %36, align 8, !tbaa !8
  %.not.not69 = icmp slt i64 %34, %37
  br i1 %.not.not69, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %27
  %38 = phi ptr [ %30, %27 ], [ %35, %.lr.ph ]
  %39 = add nuw nsw i64 %.06475, 1
  %40 = getelementptr inbounds i64, ptr %38, i64 %.079
  %41 = load i64, ptr %40, align 8, !tbaa !8
  %.not.not68 = icmp slt i64 %39, %41
  br i1 %.not.not68, label %27, label %._crit_edge77.loopexit, !llvm.loop !25

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

._crit_edge77:                                    ; preds = %._crit_edge77.loopexit, %.preheader71
  %42 = phi i64 [ %.pre88, %._crit_edge77.loopexit ], [ %22, %.preheader71 ]
  %43 = phi ptr [ %38, %._crit_edge77.loopexit ], [ %23, %.preheader71 ]
  %44 = add nuw nsw i64 %.079, 1
  %.not.not = icmp slt i64 %44, %42
  br i1 %.not.not, label %.preheader71, label %.preheader70, !llvm.loop !26

.preheader:                                       ; preds = %.lr.ph82, %.preheader70
  %.not.not6783 = icmp sgt i64 %17, 0
  br i1 %.not.not6783, label %.lr.ph85, label %._crit_edge86

.lr.ph82:                                         ; preds = %.preheader70, %.lr.ph82
  %.181 = phi i64 [ %47, %.lr.ph82 ], [ 0, %.preheader70 ]
  call void @_ZN11alglib_impl18mlpgetinputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %1, i64 noundef %.181, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %2)
  %45 = load double, ptr %7, align 8, !tbaa !22
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %0, double noundef %45, ptr noundef %2)
  %46 = load double, ptr %8, align 8, !tbaa !22
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %0, double noundef %46, ptr noundef %2)
  %47 = add nuw nsw i64 %.181, 1
  %exitcond.not = icmp eq i64 %47, %13
  br i1 %exitcond.not, label %.preheader, label %.lr.ph82, !llvm.loop !27

.lr.ph85:                                         ; preds = %.preheader, %.lr.ph85
  %.284 = phi i64 [ %50, %.lr.ph85 ], [ 0, %.preheader ]
  call void @_ZN11alglib_impl19mlpgetoutputscalingEPKNS_20multilayerperceptronElPdS3_PNS_8ae_stateE(ptr noundef %1, i64 noundef %.284, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %2)
  %48 = load double, ptr %7, align 8, !tbaa !22
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %0, double noundef %48, ptr noundef %2)
  %49 = load double, ptr %8, align 8, !tbaa !22
  call void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef %0, double noundef %49, ptr noundef %2)
  %50 = add nuw nsw i64 %.284, 1
  %exitcond87.not = icmp eq i64 %50, %17
  br i1 %exitcond87.not, label %._crit_edge86, label %.lr.ph85, !llvm.loop !28

._crit_edge86:                                    ; preds = %.lr.ph85, %.preheader
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPKNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #3

; 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 #4

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

; 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

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

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

declare noundef i64 @_ZN11alglib_impl23getmlpserializationcodeEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZN11alglib_impl30ae_serializer_serialize_doubleEPNS_13ae_serializerEdPNS_8ae_stateE(ptr noundef, double 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 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 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 #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 = !{!"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 = !{!18, !18, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}


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