; 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::mlpensemble" = type { i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::multilayerperceptron", %"struct.alglib_impl::ae_vector" }
%"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, 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 nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl11mlpeprocessEPNS_11mlpensembleEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19mlpeallerrorssparseEPNS_11mlpensembleEPNS_12sparsematrixElPdS4_S4_S4_S4_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_frame", align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i64 %2, ptr %12, align 8, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %27 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %27, ptr noundef %19)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 64, i1 false)
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  store double 0.000000e+00, ptr %29, align 8, !tbaa !11
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  store double 0.000000e+00, ptr %30, align 8, !tbaa !11
  %31 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %31, align 8, !tbaa !11
  %32 = load ptr, ptr %17, align 8, !tbaa !5
  store double 0.000000e+00, ptr %32, align 8, !tbaa !11
  %33 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %22, i64 noundef 0, i64 noundef 3, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 3, ptr noundef %35, i1 noundef zeroext true)
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 3, ptr noundef %36, i1 noundef zeroext true)
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %37, i32 0, i32 4
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  %40 = call noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %38, ptr noundef %39)
  store i64 %40, ptr %25, align 8, !tbaa !9
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %18, align 8, !tbaa !5
  %44 = call noundef i64 @_ZN11alglib_impl18mlpgetoutputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %42, ptr noundef %43)
  store i64 %44, ptr %26, align 8, !tbaa !9
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %46, ptr noundef %47)
  br i1 %48, label %49, label %53

49:                                               ; preds = %9
  %50 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %24, i64 noundef 1, ptr noundef %50)
  %51 = load i64, ptr %26, align 8, !tbaa !9
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %51, ptr noundef %21, ptr noundef %52)
  br label %59

53:                                               ; preds = %9
  %54 = load i64, ptr %26, align 8, !tbaa !9
  %55 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %24, i64 noundef %54, ptr noundef %55)
  %56 = load i64, ptr %26, align 8, !tbaa !9
  %57 = sub nsw i64 0, %56
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %57, ptr noundef %21, ptr noundef %58)
  br label %59

59:                                               ; preds = %53, %49
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %97, %59
  %61 = load i64, ptr %20, align 8, !tbaa !9
  %62 = load i64, ptr %12, align 8, !tbaa !9
  %63 = sub nsw i64 %62, 1
  %64 = icmp sle i64 %61, %63
  br i1 %64, label %65, label %100

65:                                               ; preds = %60
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load i64, ptr %20, align 8, !tbaa !9
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl12sparsegetrowEPNS_12sparsematrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %66, i64 noundef %67, ptr noundef %22, ptr noundef %68)
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl11mlpeprocessEPNS_11mlpensembleEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %69, ptr noundef %22, ptr noundef %23, ptr noundef %70)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %72, ptr noundef %73)
  br i1 %74, label %75, label %84

75:                                               ; preds = %65
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = load i64, ptr %25, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %77, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !11
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !13
  %83 = getelementptr inbounds double, ptr %82, i64 0
  store double %80, ptr %83, align 8, !tbaa !11
  br label %95

84:                                               ; preds = %65
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = getelementptr inbounds double, ptr %86, i64 0
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i64, ptr %25, align 8, !tbaa !9
  %91 = getelementptr inbounds double, ptr %89, i64 %90
  %92 = load i64, ptr %26, align 8, !tbaa !9
  %93 = sub nsw i64 %92, 1
  %94 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %93)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %87, i64 noundef 1, ptr noundef %91, i64 noundef 1, i64 noundef %94)
  br label %95

95:                                               ; preds = %84, %75
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef %21, ptr noundef %23, ptr noundef %24, ptr noundef %96)
  br label %97

97:                                               ; preds = %95
  %98 = load i64, ptr %20, align 8, !tbaa !9
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %20, align 8, !tbaa !9
  br label %60, !llvm.loop !14

100:                                              ; preds = %60
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %21, ptr noundef %101)
  %102 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = getelementptr inbounds double, ptr %103, i64 0
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  store double %105, ptr %106, align 8, !tbaa !11
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = getelementptr inbounds double, ptr %108, i64 1
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  store double %110, ptr %111, align 8, !tbaa !11
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = getelementptr inbounds double, ptr %113, i64 2
  %115 = load double, ptr %114, align 8, !tbaa !11
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  store double %115, ptr %116, align 8, !tbaa !11
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = getelementptr inbounds double, ptr %118, i64 3
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  store double %120, ptr %121, align 8, !tbaa !11
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !13
  %124 = getelementptr inbounds double, ptr %123, i64 4
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  store double %125, ptr %126, align 8, !tbaa !11
  %127 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %127)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  ret void
}

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


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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl11mlpeprocessEPNS_11mlpensembleEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19mlpeallerrorssparseEPNS_11mlpensembleEPNS_12sparsematrixElPdS4_S4_S4_S4_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6, ptr nocapture noundef writeonly %7, ptr noundef %8) local_unnamed_addr #3 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  store double 0.000000e+00, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  %15 = getelementptr inbounds i8, ptr %0, i64 200
  %16 = call noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef %8)
  %17 = call noundef i64 @_ZN11alglib_impl18mlpgetoutputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef %8)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef %8)
  br i1 %18, label %19, label %20

19:                                               ; preds = %9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef 1, ptr noundef %8)
  br label %22

20:                                               ; preds = %9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %17, ptr noundef %8)
  %21 = sub nsw i64 0, %17
  br label %22

22:                                               ; preds = %20, %19
  %.sink = phi i64 [ %21, %20 ], [ %17, %19 ]
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %.sink, ptr noundef nonnull %11, ptr noundef %8)
  %.not.not43 = icmp sgt i64 %2, 0
  br i1 %.not.not43, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %22
  %23 = getelementptr inbounds i8, ptr %14, i64 56
  %24 = getelementptr inbounds i8, ptr %12, i64 56
  %25 = add nsw i64 %17, -1
  br label %26

26:                                               ; preds = %.lr.ph, %38
  %.044 = phi i64 [ 0, %.lr.ph ], [ %39, %38 ]
  call void @_ZN11alglib_impl12sparsegetrowEPNS_12sparsematrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %1, i64 noundef %.044, ptr noundef nonnull %12, ptr noundef %8)
  call void @_ZN11alglib_impl11mlpeprocessEPNS_11mlpensembleEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %8)
  %27 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef %8)
  br i1 %27, label %28, label %33

28:                                               ; preds = %26
  %29 = load ptr, ptr %24, align 8, !tbaa !9
  %30 = getelementptr inbounds double, ptr %29, i64 %16
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = load ptr, ptr %23, align 8, !tbaa !9
  store double %31, ptr %32, align 8, !tbaa !5
  br label %38

33:                                               ; preds = %26
  %34 = load ptr, ptr %23, align 8, !tbaa !9
  %35 = load ptr, ptr %24, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %35, i64 %16
  %37 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %25)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %34, i64 noundef 1, ptr noundef %36, i64 noundef 1, i64 noundef %37)
  br label %38

38:                                               ; preds = %33, %28
  call void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef %8)
  %39 = add nuw nsw i64 %.044, 1
  %exitcond.not = icmp eq i64 %39, %2
  br i1 %exitcond.not, label %._crit_edge, label %26, !llvm.loop !10

._crit_edge:                                      ; preds = %38, %22
  call void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %8)
  %40 = getelementptr inbounds i8, ptr %11, i64 56
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load double, ptr %41, align 8, !tbaa !5
  store double %42, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %41, i64 8
  %44 = load double, ptr %43, align 8, !tbaa !5
  store double %44, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %41, i64 16
  %46 = load double, ptr %45, align 8, !tbaa !5
  store double %46, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %41, i64 24
  %48 = load double, ptr %47, align 8, !tbaa !5
  store double %48, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %41, i64 32
  %50 = load double, ptr %49, align 8, !tbaa !5
  store double %50, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  ret void
}

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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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