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

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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_smart_ptr" = type { ptr, ptr, i8, i8, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::multilayerperceptron" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::modelerrors", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::modelerrors" = type { double, double, double, double, double }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::smlpgrad" = type { double, %"struct.alglib_impl::ae_vector" }

@.str.187 = external hidden unnamed_addr constant [28 x i8], align 1

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

; 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

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

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

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

38:                                               ; preds = %59, %6
  %39 = load ptr, ptr %21, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %63

41:                                               ; preds = %38
  %42 = load ptr, ptr %21, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::smlpgrad", ptr %42, i32 0, i32 0
  store double 0.000000e+00, ptr %43, align 8, !tbaa !13
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %56, %41
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = load i64, ptr %17, align 8, !tbaa !9
  %47 = sub nsw i64 %46, 1
  %48 = icmp sle i64 %45, %47
  br i1 %48, label %49, label %59

49:                                               ; preds = %44
  %50 = load ptr, ptr %21, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::smlpgrad", ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = load i64, ptr %14, align 8, !tbaa !9
  %55 = getelementptr inbounds double, ptr %53, i64 %54
  store double 0.000000e+00, ptr %55, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %49
  %57 = load i64, ptr %14, align 8, !tbaa !9
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %14, align 8, !tbaa !9
  br label %44, !llvm.loop !19

59:                                               ; preds = %44
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %60, i32 0, i32 21
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl28ae_shared_pool_next_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %61, ptr noundef %22, ptr noundef %62)
  br label %38, !llvm.loop !21

63:                                               ; preds = %38
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %66, i32 0, i32 23
  %68 = load i64, ptr %9, align 8, !tbaa !9
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %69, i32 0, i32 24
  %71 = load i64, ptr %18, align 8, !tbaa !9
  %72 = load i64, ptr %19, align 8, !tbaa !9
  %73 = load i64, ptr %20, align 8, !tbaa !9
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %74, i32 0, i32 20
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %76, i32 0, i32 21
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlpgradbatchxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolES9_PNS_8ae_stateE(ptr noundef %64, ptr noundef %65, ptr noundef %67, i64 noundef %68, i64 noundef 0, ptr noundef %70, i64 noundef %71, i64 noundef %72, i64 noundef %73, ptr noundef %75, ptr noundef %77, ptr noundef %78)
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  store double 0.000000e+00, ptr %79, align 8, !tbaa !11
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %91, %63
  %81 = load i64, ptr %14, align 8, !tbaa !9
  %82 = load i64, ptr %17, align 8, !tbaa !9
  %83 = sub nsw i64 %82, 1
  %84 = icmp sle i64 %81, %83
  br i1 %84, label %85, label %94

85:                                               ; preds = %80
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %86, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !18
  %89 = load i64, ptr %14, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  store double 0.000000e+00, ptr %90, align 8, !tbaa !11
  br label %91

91:                                               ; preds = %85
  %92 = load i64, ptr %14, align 8, !tbaa !9
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %14, align 8, !tbaa !9
  br label %80, !llvm.loop !22

94:                                               ; preds = %80
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %95, i32 0, i32 21
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_shared_pool_first_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %96, ptr noundef %22, ptr noundef %97)
  br label %98

98:                                               ; preds = %137, %94
  %99 = load ptr, ptr %21, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %141

101:                                              ; preds = %98
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = load ptr, ptr %21, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::smlpgrad", ptr %104, i32 0, i32 0
  %106 = load double, ptr %105, align 8, !tbaa !13
  %107 = fadd double %103, %106
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  store double %107, ptr %108, align 8, !tbaa !11
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %134, %101
  %110 = load i64, ptr %14, align 8, !tbaa !9
  %111 = load i64, ptr %17, align 8, !tbaa !9
  %112 = sub nsw i64 %111, 1
  %113 = icmp sle i64 %110, %112
  br i1 %113, label %114, label %137

114:                                              ; preds = %109
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !18
  %118 = load i64, ptr %14, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = load ptr, ptr %21, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::smlpgrad", ptr %121, i32 0, i32 1
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !18
  %125 = load i64, ptr %14, align 8, !tbaa !9
  %126 = getelementptr inbounds double, ptr %124, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !11
  %128 = fadd double %120, %127
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load i64, ptr %14, align 8, !tbaa !9
  %133 = getelementptr inbounds double, ptr %131, i64 %132
  store double %128, ptr %133, align 8, !tbaa !11
  br label %134

134:                                              ; preds = %114
  %135 = load i64, ptr %14, align 8, !tbaa !9
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %14, align 8, !tbaa !9
  br label %109, !llvm.loop !23

137:                                              ; preds = %109
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %138, i32 0, i32 21
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl28ae_shared_pool_next_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %139, ptr noundef %22, ptr noundef %140)
  br label %98, !llvm.loop !24

141:                                              ; preds = %98
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %142)
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  ret void
}

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

declare void @_ZN11alglib_impl29ae_shared_pool_first_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl28ae_shared_pool_next_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 = { 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 #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 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN11alglib_impl8smlpgradE", !12, i64 0, !15, i64 8}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !16, i64 16, !17, i64 24, !7, i64 56}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_smart_ptr" = type { ptr, ptr, i8, i8, ptr, %"struct.alglib_impl::ae_dyn_block" }

@.str.187 = external hidden unnamed_addr constant [28 x i8], align 1

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

; 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl12mlpgradbatchEPNS_20multilayerperceptronEPNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #4 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef %5, i1 noundef zeroext true)
  %13 = icmp sgt i64 %2, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.187, ptr noundef %5)
  call void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef %5)
  %14 = load i64, ptr %10, align 8, !tbaa !9
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %14, ptr noundef %5)
  %15 = getelementptr inbounds i8, ptr %0, i64 1304
  call void @_ZN11alglib_impl29ae_shared_pool_first_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef %5)
  %16 = load ptr, ptr %11, align 8, !tbaa !11
  %.not54 = icmp eq ptr %16, null
  br i1 %.not54, label %._crit_edge57, label %.lr.ph56

.lr.ph56:                                         ; preds = %6, %._crit_edge
  %17 = phi ptr [ %37, %._crit_edge ], [ %16, %6 ]
  store double 0.000000e+00, ptr %17, align 8, !tbaa !13
  %18 = load i64, ptr %10, align 8, !tbaa !9
  %.not51.not52 = icmp sgt i64 %18, 0
  br i1 %.not51.not52, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph56
  %19 = getelementptr inbounds i8, ptr %17, i64 64
  %xtraiter = and i64 %18, 3
  %20 = icmp ult i64 %18, 4
  br i1 %20, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

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

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

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

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.053.epil = phi i64 [ %36, %.epil.preheader ], [ %.053.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %34 = load ptr, ptr %19, align 8, !tbaa !18
  %35 = getelementptr inbounds double, ptr %34, i64 %.053.epil
  store double 0.000000e+00, ptr %35, align 8, !tbaa !5
  %36 = add nuw nsw i64 %.053.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !21

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.lr.ph56
  call void @_ZN11alglib_impl28ae_shared_pool_next_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef %5)
  %37 = load ptr, ptr %11, align 8, !tbaa !11
  %.not = icmp eq ptr %37, null
  br i1 %.not, label %._crit_edge57, label %.lr.ph56, !llvm.loop !23

._crit_edge57:                                    ; preds = %._crit_edge, %6
  %38 = getelementptr inbounds i8, ptr %0, i64 1528
  %39 = getelementptr inbounds i8, ptr %0, i64 1896
  %40 = getelementptr inbounds i8, ptr %0, i64 1160
  call void @_ZN11alglib_impl13mlpgradbatchxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolES9_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %38, i64 noundef %2, i64 noundef 0, ptr noundef nonnull %39, i64 noundef 0, i64 noundef %2, i64 noundef 0, ptr noundef nonnull %40, ptr noundef nonnull %15, ptr noundef %5)
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  %41 = load i64, ptr %10, align 8, !tbaa !9
  %.not48.not58 = icmp sgt i64 %41, 0
  br i1 %.not48.not58, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %._crit_edge57
  %42 = getelementptr inbounds i8, ptr %4, i64 56
  %xtraiter75 = and i64 %41, 3
  %43 = icmp ult i64 %41, 4
  br i1 %43, label %._crit_edge62.loopexit.unr-lcssa, label %.lr.ph61.new

.lr.ph61.new:                                     ; preds = %.lr.ph61
  %unroll_iter78 = and i64 %41, 9223372036854775804
  br label %44

44:                                               ; preds = %44, %.lr.ph61.new
  %.159 = phi i64 [ 0, %.lr.ph61.new ], [ %56, %44 ]
  %niter79 = phi i64 [ 0, %.lr.ph61.new ], [ %niter79.next.3, %44 ]
  %45 = load ptr, ptr %42, align 8, !tbaa !18
  %46 = getelementptr inbounds double, ptr %45, i64 %.159
  store double 0.000000e+00, ptr %46, align 8, !tbaa !5
  %47 = or disjoint i64 %.159, 1
  %48 = load ptr, ptr %42, align 8, !tbaa !18
  %49 = getelementptr inbounds double, ptr %48, i64 %47
  store double 0.000000e+00, ptr %49, align 8, !tbaa !5
  %50 = or disjoint i64 %.159, 2
  %51 = load ptr, ptr %42, align 8, !tbaa !18
  %52 = getelementptr inbounds double, ptr %51, i64 %50
  store double 0.000000e+00, ptr %52, align 8, !tbaa !5
  %53 = or disjoint i64 %.159, 3
  %54 = load ptr, ptr %42, align 8, !tbaa !18
  %55 = getelementptr inbounds double, ptr %54, i64 %53
  store double 0.000000e+00, ptr %55, align 8, !tbaa !5
  %56 = add nuw nsw i64 %.159, 4
  %niter79.next.3 = add i64 %niter79, 4
  %niter79.ncmp.3 = icmp eq i64 %niter79.next.3, %unroll_iter78
  br i1 %niter79.ncmp.3, label %._crit_edge62.loopexit.unr-lcssa, label %44, !llvm.loop !24

._crit_edge62.loopexit.unr-lcssa:                 ; preds = %44, %.lr.ph61
  %.159.unr = phi i64 [ 0, %.lr.ph61 ], [ %56, %44 ]
  %lcmp.mod77.not = icmp eq i64 %xtraiter75, 0
  br i1 %lcmp.mod77.not, label %._crit_edge62, label %.epil.preheader74

.epil.preheader74:                                ; preds = %._crit_edge62.loopexit.unr-lcssa, %.epil.preheader74
  %.159.epil = phi i64 [ %59, %.epil.preheader74 ], [ %.159.unr, %._crit_edge62.loopexit.unr-lcssa ]
  %epil.iter76 = phi i64 [ %epil.iter76.next, %.epil.preheader74 ], [ 0, %._crit_edge62.loopexit.unr-lcssa ]
  %57 = load ptr, ptr %42, align 8, !tbaa !18
  %58 = getelementptr inbounds double, ptr %57, i64 %.159.epil
  store double 0.000000e+00, ptr %58, align 8, !tbaa !5
  %59 = add nuw nsw i64 %.159.epil, 1
  %epil.iter76.next = add i64 %epil.iter76, 1
  %epil.iter76.cmp.not = icmp eq i64 %epil.iter76.next, %xtraiter75
  br i1 %epil.iter76.cmp.not, label %._crit_edge62, label %.epil.preheader74, !llvm.loop !25

._crit_edge62:                                    ; preds = %._crit_edge62.loopexit.unr-lcssa, %.epil.preheader74, %._crit_edge57
  call void @_ZN11alglib_impl29ae_shared_pool_first_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef %5)
  %60 = load ptr, ptr %11, align 8, !tbaa !11
  %.not4968 = icmp eq ptr %60, null
  br i1 %.not4968, label %._crit_edge71, label %.lr.ph70

.lr.ph70:                                         ; preds = %._crit_edge62
  %61 = getelementptr inbounds i8, ptr %4, i64 56
  br label %62

62:                                               ; preds = %.lr.ph70, %._crit_edge67
  %63 = phi ptr [ %60, %.lr.ph70 ], [ %94, %._crit_edge67 ]
  %64 = load double, ptr %3, align 8, !tbaa !5
  %65 = load double, ptr %63, align 8, !tbaa !13
  %66 = fadd double %64, %65
  store double %66, ptr %3, align 8, !tbaa !5
  %67 = load i64, ptr %10, align 8, !tbaa !9
  %.not50.not63 = icmp sgt i64 %67, 0
  br i1 %.not50.not63, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %62
  %68 = getelementptr inbounds i8, ptr %63, i64 64
  %xtraiter81 = and i64 %67, 1
  %69 = icmp eq i64 %67, 1
  br i1 %69, label %._crit_edge67.loopexit.unr-lcssa, label %.lr.ph66.new

.lr.ph66.new:                                     ; preds = %.lr.ph66
  %unroll_iter84 = and i64 %67, 9223372036854775806
  br label %70

70:                                               ; preds = %70, %.lr.ph66.new
  %.264 = phi i64 [ 0, %.lr.ph66.new ], [ %86, %70 ]
  %niter85 = phi i64 [ 0, %.lr.ph66.new ], [ %niter85.next.1, %70 ]
  %71 = load ptr, ptr %61, align 8, !tbaa !18
  %72 = getelementptr inbounds double, ptr %71, i64 %.264
  %73 = load double, ptr %72, align 8, !tbaa !5
  %74 = load ptr, ptr %68, align 8, !tbaa !18
  %75 = getelementptr inbounds double, ptr %74, i64 %.264
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = fadd double %73, %76
  store double %77, ptr %72, align 8, !tbaa !5
  %78 = or disjoint i64 %.264, 1
  %79 = load ptr, ptr %61, align 8, !tbaa !18
  %80 = getelementptr inbounds double, ptr %79, i64 %78
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = load ptr, ptr %68, align 8, !tbaa !18
  %83 = getelementptr inbounds double, ptr %82, i64 %78
  %84 = load double, ptr %83, align 8, !tbaa !5
  %85 = fadd double %81, %84
  store double %85, ptr %80, align 8, !tbaa !5
  %86 = add nuw nsw i64 %.264, 2
  %niter85.next.1 = add i64 %niter85, 2
  %niter85.ncmp.1 = icmp eq i64 %niter85.next.1, %unroll_iter84
  br i1 %niter85.ncmp.1, label %._crit_edge67.loopexit.unr-lcssa, label %70, !llvm.loop !26

._crit_edge67.loopexit.unr-lcssa:                 ; preds = %70, %.lr.ph66
  %.264.unr = phi i64 [ 0, %.lr.ph66 ], [ %86, %70 ]
  %lcmp.mod83.not = icmp eq i64 %xtraiter81, 0
  br i1 %lcmp.mod83.not, label %._crit_edge67, label %._crit_edge67.loopexit.epilog-lcssa

._crit_edge67.loopexit.epilog-lcssa:              ; preds = %._crit_edge67.loopexit.unr-lcssa
  %87 = load ptr, ptr %61, align 8, !tbaa !18
  %88 = getelementptr inbounds double, ptr %87, i64 %.264.unr
  %89 = load double, ptr %88, align 8, !tbaa !5
  %90 = load ptr, ptr %68, align 8, !tbaa !18
  %91 = getelementptr inbounds double, ptr %90, i64 %.264.unr
  %92 = load double, ptr %91, align 8, !tbaa !5
  %93 = fadd double %89, %92
  store double %93, ptr %88, align 8, !tbaa !5
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit.epilog-lcssa, %._crit_edge67.loopexit.unr-lcssa, %62
  call void @_ZN11alglib_impl28ae_shared_pool_next_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef %5)
  %94 = load ptr, ptr %11, align 8, !tbaa !11
  %.not49 = icmp eq ptr %94, null
  br i1 %.not49, label %._crit_edge71, label %62, !llvm.loop !27

._crit_edge71:                                    ; preds = %._crit_edge67, %._crit_edge62
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  ret void
}

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

declare void @_ZN11alglib_impl29ae_shared_pool_first_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl28ae_shared_pool_next_recycledEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN11alglib_impl8smlpgradE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !16, i64 16, !17, i64 24, !7, i64 56}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}


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