; 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::modelerrors" = type { double, double, double, double, double }
%"struct.alglib_impl::mlpbuffers" = type { i64, i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"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::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::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 }

@_ZN11alglib_implL22mlpbase_microbatchsizeE = external hidden global i64, align 8
@.str.220 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [30 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

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #3

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #3

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef, ptr noundef) #3

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

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) #2 {
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"struct.alglib_impl::ae_frame", align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i8, align 1
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca %"struct.alglib_impl::modelerrors", align 8
  %40 = alloca %"struct.alglib_impl::modelerrors", align 8
  %41 = alloca double, align 8
  %42 = alloca i32, align 4
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store ptr %2, ptr %15, align 8, !tbaa !5
  store i64 %3, ptr %16, align 8, !tbaa !9
  store i64 %4, ptr %17, align 8, !tbaa !9
  store ptr %5, ptr %18, align 8, !tbaa !5
  store i64 %6, ptr %19, align 8, !tbaa !9
  store i64 %7, ptr %20, align 8, !tbaa !9
  store i64 %8, ptr %21, align 8, !tbaa !9
  store ptr %9, ptr %22, align 8, !tbaa !5
  store ptr %10, ptr %23, align 8, !tbaa !5
  store ptr %11, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %39) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %40) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %43 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %43, ptr noundef %25)
  call void @llvm.memset.p0.i64(ptr align 8 %36, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %39, i8 0, i64 40, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %40, i8 0, i64 40, i1 false)
  %44 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %36, ptr noundef %35, ptr noundef %44, i1 noundef zeroext true)
  %45 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef %39, ptr noundef %45, i1 noundef zeroext true)
  %46 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef %40, ptr noundef %46, i1 noundef zeroext true)
  %47 = load i64, ptr %16, align 8, !tbaa !9
  %48 = icmp sge i64 %47, 0
  %49 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.220, ptr noundef %49)
  %50 = load i64, ptr %17, align 8, !tbaa !9
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %55, label %52

52:                                               ; preds = %12
  %53 = load i64, ptr %17, align 8, !tbaa !9
  %54 = icmp eq i64 %53, 1
  br label %55

55:                                               ; preds = %52, %12
  %56 = phi i1 [ true, %12 ], [ %54, %52 ]
  %57 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.221, ptr noundef %57)
  %58 = load i64, ptr %21, align 8, !tbaa !9
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %63, label %60

60:                                               ; preds = %55
  %61 = load i64, ptr %21, align 8, !tbaa !9
  %62 = icmp eq i64 %61, 1
  br label %63

63:                                               ; preds = %60, %55
  %64 = phi i1 [ true, %55 ], [ %62, %60 ]
  %65 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.222, ptr noundef %65)
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef %66, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %67)
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = load ptr, ptr %24, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %68, ptr noundef %69)
  %71 = zext i1 %70 to i8
  store i8 %71, ptr %30, align 1, !tbaa !11
  %72 = load i64, ptr %20, align 8, !tbaa !9
  %73 = load i64, ptr %19, align 8, !tbaa !9
  %74 = sub nsw i64 %72, %73
  %75 = sitofp i64 %74 to double
  store double %75, ptr %41, align 8, !tbaa !13
  %76 = load double, ptr %41, align 8, !tbaa !13
  %77 = load i64, ptr %28, align 8, !tbaa !9
  %78 = sitofp i64 %77 to double
  %79 = fmul double %76, %78
  %80 = fmul double %79, 2.000000e+00
  store double %80, ptr %41, align 8, !tbaa !13
  %81 = load double, ptr %41, align 8, !tbaa !13
  %82 = load ptr, ptr %24, align 8, !tbaa !5
  %83 = call noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef %82)
  %84 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %81, double noundef %83)
  br i1 %84, label %85, label %109

85:                                               ; preds = %63
  %86 = load i64, ptr %20, align 8, !tbaa !9
  %87 = load i64, ptr %19, align 8, !tbaa !9
  %88 = sub nsw i64 %86, %87
  %89 = load i64, ptr @_ZN11alglib_implL22mlpbase_microbatchsizeE, align 8, !tbaa !9
  %90 = mul nsw i64 2, %89
  %91 = icmp sge i64 %88, %90
  br i1 %91, label %92, label %109

92:                                               ; preds = %85
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load i64, ptr %16, align 8, !tbaa !9
  %97 = load i64, ptr %17, align 8, !tbaa !9
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = load i64, ptr %19, align 8, !tbaa !9
  %100 = load i64, ptr %20, align 8, !tbaa !9
  %101 = load i64, ptr %21, align 8, !tbaa !9
  %102 = load ptr, ptr %22, align 8, !tbaa !5
  %103 = load ptr, ptr %23, align 8, !tbaa !5
  %104 = load ptr, ptr %24, align 8, !tbaa !5
  %105 = call noundef zeroext i1 @_ZN11alglib_impl23_trypexec_mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %93, ptr noundef %94, ptr noundef %95, i64 noundef %96, i64 noundef %97, ptr noundef %98, i64 noundef %99, i64 noundef %100, i64 noundef %101, ptr noundef %102, ptr noundef %103, ptr noundef %104)
  br i1 %105, label %106, label %108

106:                                              ; preds = %92
  %107 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %107)
  store i32 1, ptr %42, align 4
  br label %552

108:                                              ; preds = %92
  br label %109

109:                                              ; preds = %108, %85, %63
  %110 = load i64, ptr %20, align 8, !tbaa !9
  %111 = load i64, ptr %19, align 8, !tbaa !9
  %112 = sub nsw i64 %110, %111
  %113 = load i64, ptr @_ZN11alglib_implL22mlpbase_microbatchsizeE, align 8, !tbaa !9
  %114 = mul nsw i64 2, %113
  %115 = icmp sge i64 %112, %114
  br i1 %115, label %116, label %245

116:                                              ; preds = %109
  %117 = load double, ptr %41, align 8, !tbaa !13
  %118 = load ptr, ptr %24, align 8, !tbaa !5
  %119 = call noundef double @_ZN11alglib_impl10spawnlevelEPNS_8ae_stateE(ptr noundef %118)
  %120 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %117, double noundef %119)
  br i1 %120, label %121, label %245

121:                                              ; preds = %116
  %122 = load i64, ptr %20, align 8, !tbaa !9
  %123 = load i64, ptr %19, align 8, !tbaa !9
  %124 = sub nsw i64 %122, %123
  %125 = load i64, ptr @_ZN11alglib_implL22mlpbase_microbatchsizeE, align 8, !tbaa !9
  %126 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl11splitlengthEllPlS0_PNS_8ae_stateE(i64 noundef %124, i64 noundef %125, ptr noundef %37, ptr noundef %38, ptr noundef %126)
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = load i64, ptr %16, align 8, !tbaa !9
  %131 = load i64, ptr %17, align 8, !tbaa !9
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  %133 = load i64, ptr %19, align 8, !tbaa !9
  %134 = load i64, ptr %19, align 8, !tbaa !9
  %135 = load i64, ptr %37, align 8, !tbaa !9
  %136 = add nsw i64 %134, %135
  %137 = load i64, ptr %21, align 8, !tbaa !9
  %138 = load ptr, ptr %22, align 8, !tbaa !5
  %139 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %127, ptr noundef %128, ptr noundef %129, i64 noundef %130, i64 noundef %131, ptr noundef %132, i64 noundef %133, i64 noundef %136, i64 noundef %137, ptr noundef %138, ptr noundef %39, ptr noundef %139)
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = load ptr, ptr %14, align 8, !tbaa !5
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = load i64, ptr %16, align 8, !tbaa !9
  %144 = load i64, ptr %17, align 8, !tbaa !9
  %145 = load ptr, ptr %18, align 8, !tbaa !5
  %146 = load i64, ptr %19, align 8, !tbaa !9
  %147 = load i64, ptr %37, align 8, !tbaa !9
  %148 = add nsw i64 %146, %147
  %149 = load i64, ptr %20, align 8, !tbaa !9
  %150 = load i64, ptr %21, align 8, !tbaa !9
  %151 = load ptr, ptr %22, align 8, !tbaa !5
  %152 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %140, ptr noundef %141, ptr noundef %142, i64 noundef %143, i64 noundef %144, ptr noundef %145, i64 noundef %148, i64 noundef %149, i64 noundef %150, ptr noundef %151, ptr noundef %40, ptr noundef %152)
  %153 = load i64, ptr %37, align 8, !tbaa !9
  %154 = sitofp i64 %153 to double
  %155 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %39, i32 0, i32 0
  %156 = load double, ptr %155, align 8, !tbaa !15
  %157 = load i64, ptr %38, align 8, !tbaa !9
  %158 = sitofp i64 %157 to double
  %159 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %40, i32 0, i32 0
  %160 = load double, ptr %159, align 8, !tbaa !15
  %161 = fmul double %158, %160
  %162 = call double @llvm.fmuladd.f64(double %154, double %156, double %161)
  %163 = load i64, ptr %37, align 8, !tbaa !9
  %164 = load i64, ptr %38, align 8, !tbaa !9
  %165 = add nsw i64 %163, %164
  %166 = sitofp i64 %165 to double
  %167 = fdiv double %162, %166
  %168 = load ptr, ptr %23, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %168, i32 0, i32 0
  store double %167, ptr %169, align 8, !tbaa !15
  %170 = load i64, ptr %37, align 8, !tbaa !9
  %171 = sitofp i64 %170 to double
  %172 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %39, i32 0, i32 1
  %173 = load double, ptr %172, align 8, !tbaa !17
  %174 = load i64, ptr %38, align 8, !tbaa !9
  %175 = sitofp i64 %174 to double
  %176 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %40, i32 0, i32 1
  %177 = load double, ptr %176, align 8, !tbaa !17
  %178 = fmul double %175, %177
  %179 = call double @llvm.fmuladd.f64(double %171, double %173, double %178)
  %180 = load i64, ptr %37, align 8, !tbaa !9
  %181 = load i64, ptr %38, align 8, !tbaa !9
  %182 = add nsw i64 %180, %181
  %183 = sitofp i64 %182 to double
  %184 = fdiv double %179, %183
  %185 = load ptr, ptr %23, align 8, !tbaa !5
  %186 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %185, i32 0, i32 1
  store double %184, ptr %186, align 8, !tbaa !17
  %187 = load i64, ptr %37, align 8, !tbaa !9
  %188 = sitofp i64 %187 to double
  %189 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %39, i32 0, i32 2
  %190 = load double, ptr %189, align 8, !tbaa !18
  %191 = load ptr, ptr %24, align 8, !tbaa !5
  %192 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %190, ptr noundef %191)
  %193 = load i64, ptr %38, align 8, !tbaa !9
  %194 = sitofp i64 %193 to double
  %195 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %40, i32 0, i32 2
  %196 = load double, ptr %195, align 8, !tbaa !18
  %197 = load ptr, ptr %24, align 8, !tbaa !5
  %198 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %196, ptr noundef %197)
  %199 = fmul double %194, %198
  %200 = call double @llvm.fmuladd.f64(double %188, double %192, double %199)
  %201 = load i64, ptr %37, align 8, !tbaa !9
  %202 = load i64, ptr %38, align 8, !tbaa !9
  %203 = add nsw i64 %201, %202
  %204 = sitofp i64 %203 to double
  %205 = fdiv double %200, %204
  %206 = load ptr, ptr %24, align 8, !tbaa !5
  %207 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %205, ptr noundef %206)
  %208 = load ptr, ptr %23, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %208, i32 0, i32 2
  store double %207, ptr %209, align 8, !tbaa !18
  %210 = load i64, ptr %37, align 8, !tbaa !9
  %211 = sitofp i64 %210 to double
  %212 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %39, i32 0, i32 3
  %213 = load double, ptr %212, align 8, !tbaa !19
  %214 = load i64, ptr %38, align 8, !tbaa !9
  %215 = sitofp i64 %214 to double
  %216 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %40, i32 0, i32 3
  %217 = load double, ptr %216, align 8, !tbaa !19
  %218 = fmul double %215, %217
  %219 = call double @llvm.fmuladd.f64(double %211, double %213, double %218)
  %220 = load i64, ptr %37, align 8, !tbaa !9
  %221 = load i64, ptr %38, align 8, !tbaa !9
  %222 = add nsw i64 %220, %221
  %223 = sitofp i64 %222 to double
  %224 = fdiv double %219, %223
  %225 = load ptr, ptr %23, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %225, i32 0, i32 3
  store double %224, ptr %226, align 8, !tbaa !19
  %227 = load i64, ptr %37, align 8, !tbaa !9
  %228 = sitofp i64 %227 to double
  %229 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %39, i32 0, i32 4
  %230 = load double, ptr %229, align 8, !tbaa !20
  %231 = load i64, ptr %38, align 8, !tbaa !9
  %232 = sitofp i64 %231 to double
  %233 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %40, i32 0, i32 4
  %234 = load double, ptr %233, align 8, !tbaa !20
  %235 = fmul double %232, %234
  %236 = call double @llvm.fmuladd.f64(double %228, double %230, double %235)
  %237 = load i64, ptr %37, align 8, !tbaa !9
  %238 = load i64, ptr %38, align 8, !tbaa !9
  %239 = add nsw i64 %237, %238
  %240 = sitofp i64 %239 to double
  %241 = fdiv double %236, %240
  %242 = load ptr, ptr %23, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %242, i32 0, i32 4
  store double %241, ptr %243, align 8, !tbaa !20
  %244 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %244)
  store i32 1, ptr %42, align 4
  br label %552

245:                                              ; preds = %116, %109
  %246 = load ptr, ptr %22, align 8, !tbaa !5
  %247 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %246, ptr noundef %36, ptr noundef %247)
  %248 = load i8, ptr %30, align 1, !tbaa !11, !range !21, !noundef !22
  %249 = trunc i8 %248 to i1
  br i1 %249, label %250, label %257

250:                                              ; preds = %245
  %251 = load i64, ptr %26, align 8, !tbaa !9
  %252 = add nsw i64 %251, 1
  store i64 %252, ptr %29, align 8, !tbaa !9
  %253 = load i64, ptr %27, align 8, !tbaa !9
  %254 = load ptr, ptr %35, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %254, i32 0, i32 15
  %256 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %253, ptr noundef %255, ptr noundef %256)
  br label %266

257:                                              ; preds = %245
  %258 = load i64, ptr %26, align 8, !tbaa !9
  %259 = load i64, ptr %27, align 8, !tbaa !9
  %260 = add nsw i64 %258, %259
  store i64 %260, ptr %29, align 8, !tbaa !9
  %261 = load i64, ptr %27, align 8, !tbaa !9
  %262 = sub nsw i64 0, %261
  %263 = load ptr, ptr %35, align 8, !tbaa !5
  %264 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %263, i32 0, i32 15
  %265 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %262, ptr noundef %264, ptr noundef %265)
  br label %266

266:                                              ; preds = %257, %250
  %267 = load ptr, ptr %13, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %267, i32 0, i32 6
  %269 = load i64, ptr %28, align 8, !tbaa !9
  %270 = load ptr, ptr %13, align 8, !tbaa !5
  %271 = load ptr, ptr %24, align 8, !tbaa !5
  %272 = call noundef i64 @_ZN11alglib_impl9mlpntotalEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %270, ptr noundef %271)
  %273 = load i64, ptr %26, align 8, !tbaa !9
  %274 = load i64, ptr %27, align 8, !tbaa !9
  %275 = load ptr, ptr %35, align 8, !tbaa !5
  %276 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef %268, i64 noundef %269, i64 noundef %272, i64 noundef %273, i64 noundef %274, ptr noundef %275, ptr noundef %276)
  %277 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %277, ptr %32, align 8, !tbaa !9
  br label %278

278:                                              ; preds = %496, %266
  %279 = load i64, ptr %32, align 8, !tbaa !9
  %280 = load i64, ptr %20, align 8, !tbaa !9
  %281 = icmp slt i64 %279, %280
  br i1 %281, label %282, label %502

282:                                              ; preds = %278
  %283 = load i64, ptr %20, align 8, !tbaa !9
  %284 = load i64, ptr %32, align 8, !tbaa !9
  %285 = load ptr, ptr %35, align 8, !tbaa !5
  %286 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %285, i32 0, i32 0
  %287 = load i64, ptr %286, align 8, !tbaa !23
  %288 = add nsw i64 %284, %287
  %289 = load ptr, ptr %24, align 8, !tbaa !5
  %290 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %283, i64 noundef %288, ptr noundef %289)
  %291 = load i64, ptr %32, align 8, !tbaa !9
  %292 = sub nsw i64 %290, %291
  store i64 %292, ptr %33, align 8, !tbaa !9
  store i64 0, ptr %34, align 8, !tbaa !9
  br label %293

293:                                              ; preds = %368, %282
  %294 = load i64, ptr %34, align 8, !tbaa !9
  %295 = load i64, ptr %33, align 8, !tbaa !9
  %296 = sub nsw i64 %295, 1
  %297 = icmp sle i64 %294, %296
  br i1 %297, label %298, label %371

298:                                              ; preds = %293
  store i64 -1, ptr %31, align 8, !tbaa !9
  %299 = load i64, ptr %21, align 8, !tbaa !9
  %300 = icmp eq i64 %299, 0
  br i1 %300, label %301, label %305

301:                                              ; preds = %298
  %302 = load i64, ptr %32, align 8, !tbaa !9
  %303 = load i64, ptr %34, align 8, !tbaa !9
  %304 = add nsw i64 %302, %303
  store i64 %304, ptr %31, align 8, !tbaa !9
  br label %305

305:                                              ; preds = %301, %298
  %306 = load i64, ptr %21, align 8, !tbaa !9
  %307 = icmp eq i64 %306, 1
  br i1 %307, label %308, label %317

308:                                              ; preds = %305
  %309 = load ptr, ptr %18, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %309, i32 0, i32 4
  %311 = load ptr, ptr %310, align 8, !tbaa !28
  %312 = load i64, ptr %32, align 8, !tbaa !9
  %313 = load i64, ptr %34, align 8, !tbaa !9
  %314 = add nsw i64 %312, %313
  %315 = getelementptr inbounds i64, ptr %311, i64 %314
  %316 = load i64, ptr %315, align 8, !tbaa !9
  store i64 %316, ptr %31, align 8, !tbaa !9
  br label %317

317:                                              ; preds = %308, %305
  %318 = load i64, ptr %31, align 8, !tbaa !9
  %319 = icmp sge i64 %318, 0
  %320 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %319, ptr noundef @.str.223, ptr noundef %320)
  %321 = load i64, ptr %17, align 8, !tbaa !9
  %322 = icmp eq i64 %321, 0
  br i1 %322, label %323, label %342

323:                                              ; preds = %317
  %324 = load ptr, ptr %35, align 8, !tbaa !5
  %325 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %324, i32 0, i32 7
  %326 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %325, i32 0, i32 6
  %327 = load ptr, ptr %326, align 8, !tbaa !28
  %328 = load i64, ptr %34, align 8, !tbaa !9
  %329 = getelementptr inbounds ptr, ptr %327, i64 %328
  %330 = load ptr, ptr %329, align 8, !tbaa !5
  %331 = getelementptr inbounds double, ptr %330, i64 0
  %332 = load ptr, ptr %14, align 8, !tbaa !5
  %333 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %332, i32 0, i32 6
  %334 = load ptr, ptr %333, align 8, !tbaa !28
  %335 = load i64, ptr %31, align 8, !tbaa !9
  %336 = getelementptr inbounds ptr, ptr %334, i64 %335
  %337 = load ptr, ptr %336, align 8, !tbaa !5
  %338 = getelementptr inbounds double, ptr %337, i64 0
  %339 = load i64, ptr %29, align 8, !tbaa !9
  %340 = sub nsw i64 %339, 1
  %341 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %340)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %331, i64 noundef 1, ptr noundef %338, i64 noundef 1, i64 noundef %341)
  br label %342

342:                                              ; preds = %323, %317
  %343 = load i64, ptr %17, align 8, !tbaa !9
  %344 = icmp eq i64 %343, 1
  br i1 %344, label %345, label %367

345:                                              ; preds = %342
  %346 = load ptr, ptr %15, align 8, !tbaa !5
  %347 = load i64, ptr %31, align 8, !tbaa !9
  %348 = load ptr, ptr %35, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %348, i32 0, i32 9
  %350 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl12sparsegetrowEPNS_12sparsematrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %346, i64 noundef %347, ptr noundef %349, ptr noundef %350)
  %351 = load ptr, ptr %35, align 8, !tbaa !5
  %352 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %351, i32 0, i32 7
  %353 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %352, i32 0, i32 6
  %354 = load ptr, ptr %353, align 8, !tbaa !28
  %355 = load i64, ptr %34, align 8, !tbaa !9
  %356 = getelementptr inbounds ptr, ptr %354, i64 %355
  %357 = load ptr, ptr %356, align 8, !tbaa !5
  %358 = getelementptr inbounds double, ptr %357, i64 0
  %359 = load ptr, ptr %35, align 8, !tbaa !5
  %360 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %359, i32 0, i32 9
  %361 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %360, i32 0, i32 4
  %362 = load ptr, ptr %361, align 8, !tbaa !28
  %363 = getelementptr inbounds double, ptr %362, i64 0
  %364 = load i64, ptr %29, align 8, !tbaa !9
  %365 = sub nsw i64 %364, 1
  %366 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %365)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %358, i64 noundef 1, ptr noundef %363, i64 noundef 1, i64 noundef %366)
  br label %367

367:                                              ; preds = %345, %342
  br label %368

368:                                              ; preds = %367
  %369 = load i64, ptr %34, align 8, !tbaa !9
  %370 = add nsw i64 %369, 1
  store i64 %370, ptr %34, align 8, !tbaa !9
  br label %293, !llvm.loop !29

371:                                              ; preds = %293
  store i64 0, ptr %34, align 8, !tbaa !9
  br label %372

372:                                              ; preds = %397, %371
  %373 = load i64, ptr %34, align 8, !tbaa !9
  %374 = load i64, ptr %33, align 8, !tbaa !9
  %375 = sub nsw i64 %374, 1
  %376 = icmp sle i64 %373, %375
  br i1 %376, label %377, label %400

377:                                              ; preds = %372
  %378 = load ptr, ptr %35, align 8, !tbaa !5
  %379 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %378, i32 0, i32 8
  %380 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %379, i32 0, i32 6
  %381 = load ptr, ptr %380, align 8, !tbaa !28
  %382 = load i64, ptr %34, align 8, !tbaa !9
  %383 = getelementptr inbounds ptr, ptr %381, i64 %382
  %384 = load ptr, ptr %383, align 8, !tbaa !5
  %385 = getelementptr inbounds double, ptr %384, i64 0
  %386 = load ptr, ptr %35, align 8, !tbaa !5
  %387 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %386, i32 0, i32 7
  %388 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %387, i32 0, i32 6
  %389 = load ptr, ptr %388, align 8, !tbaa !28
  %390 = load i64, ptr %34, align 8, !tbaa !9
  %391 = getelementptr inbounds ptr, ptr %389, i64 %390
  %392 = load ptr, ptr %391, align 8, !tbaa !5
  %393 = getelementptr inbounds double, ptr %392, i64 0
  %394 = load i64, ptr %29, align 8, !tbaa !9
  %395 = sub nsw i64 %394, 1
  %396 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %395)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %385, i64 noundef 1, ptr noundef %393, i64 noundef 1, i64 noundef %396)
  br label %397

397:                                              ; preds = %377
  %398 = load i64, ptr %34, align 8, !tbaa !9
  %399 = add nsw i64 %398, 1
  store i64 %399, ptr %34, align 8, !tbaa !9
  br label %372, !llvm.loop !31

400:                                              ; preds = %372
  %401 = load ptr, ptr %13, align 8, !tbaa !5
  %402 = load ptr, ptr %35, align 8, !tbaa !5
  %403 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %402, i32 0, i32 8
  %404 = load i64, ptr %33, align 8, !tbaa !9
  %405 = load ptr, ptr %35, align 8, !tbaa !5
  %406 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %405, i32 0, i32 5
  %407 = load ptr, ptr %35, align 8, !tbaa !5
  %408 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %407, i32 0, i32 6
  %409 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_implL25mlpbase_mlpchunkedprocessEPNS_20multilayerperceptronEPNS_9ae_matrixEllPNS_9ae_vectorES5_PNS_8ae_stateE(ptr noundef %401, ptr noundef %403, i64 noundef 0, i64 noundef %404, ptr noundef %406, ptr noundef %408, ptr noundef %409)
  store i64 0, ptr %34, align 8, !tbaa !9
  br label %410

410:                                              ; preds = %493, %400
  %411 = load i64, ptr %34, align 8, !tbaa !9
  %412 = load i64, ptr %33, align 8, !tbaa !9
  %413 = sub nsw i64 %412, 1
  %414 = icmp sle i64 %411, %413
  br i1 %414, label %415, label %496

415:                                              ; preds = %410
  %416 = load ptr, ptr %35, align 8, !tbaa !5
  %417 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %416, i32 0, i32 10
  %418 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %417, i32 0, i32 4
  %419 = load ptr, ptr %418, align 8, !tbaa !28
  %420 = getelementptr inbounds double, ptr %419, i64 0
  %421 = load ptr, ptr %35, align 8, !tbaa !5
  %422 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %421, i32 0, i32 8
  %423 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %422, i32 0, i32 6
  %424 = load ptr, ptr %423, align 8, !tbaa !28
  %425 = load i64, ptr %34, align 8, !tbaa !9
  %426 = getelementptr inbounds ptr, ptr %424, i64 %425
  %427 = load ptr, ptr %426, align 8, !tbaa !5
  %428 = getelementptr inbounds double, ptr %427, i64 0
  %429 = load i64, ptr %26, align 8, !tbaa !9
  %430 = sub nsw i64 %429, 1
  %431 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %430)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %420, i64 noundef 1, ptr noundef %428, i64 noundef 1, i64 noundef %431)
  %432 = load ptr, ptr %35, align 8, !tbaa !5
  %433 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %432, i32 0, i32 11
  %434 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %433, i32 0, i32 4
  %435 = load ptr, ptr %434, align 8, !tbaa !28
  %436 = getelementptr inbounds double, ptr %435, i64 0
  %437 = load ptr, ptr %35, align 8, !tbaa !5
  %438 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %437, i32 0, i32 8
  %439 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %438, i32 0, i32 6
  %440 = load ptr, ptr %439, align 8, !tbaa !28
  %441 = load i64, ptr %34, align 8, !tbaa !9
  %442 = getelementptr inbounds ptr, ptr %440, i64 %441
  %443 = load ptr, ptr %442, align 8, !tbaa !5
  %444 = load i64, ptr %26, align 8, !tbaa !9
  %445 = getelementptr inbounds double, ptr %443, i64 %444
  %446 = load i64, ptr %27, align 8, !tbaa !9
  %447 = sub nsw i64 %446, 1
  %448 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %447)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %436, i64 noundef 1, ptr noundef %445, i64 noundef 1, i64 noundef %448)
  %449 = load i8, ptr %30, align 1, !tbaa !11, !range !21, !noundef !22
  %450 = trunc i8 %449 to i1
  br i1 %450, label %451, label %467

451:                                              ; preds = %415
  %452 = load ptr, ptr %35, align 8, !tbaa !5
  %453 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %452, i32 0, i32 7
  %454 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %453, i32 0, i32 6
  %455 = load ptr, ptr %454, align 8, !tbaa !28
  %456 = load i64, ptr %34, align 8, !tbaa !9
  %457 = getelementptr inbounds ptr, ptr %455, i64 %456
  %458 = load ptr, ptr %457, align 8, !tbaa !5
  %459 = load i64, ptr %26, align 8, !tbaa !9
  %460 = getelementptr inbounds double, ptr %458, i64 %459
  %461 = load double, ptr %460, align 8, !tbaa !13
  %462 = load ptr, ptr %35, align 8, !tbaa !5
  %463 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %462, i32 0, i32 12
  %464 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %463, i32 0, i32 4
  %465 = load ptr, ptr %464, align 8, !tbaa !28
  %466 = getelementptr inbounds double, ptr %465, i64 0
  store double %461, ptr %466, align 8, !tbaa !13
  br label %485

467:                                              ; preds = %415
  %468 = load ptr, ptr %35, align 8, !tbaa !5
  %469 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %468, i32 0, i32 12
  %470 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %469, i32 0, i32 4
  %471 = load ptr, ptr %470, align 8, !tbaa !28
  %472 = getelementptr inbounds double, ptr %471, i64 0
  %473 = load ptr, ptr %35, align 8, !tbaa !5
  %474 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %473, i32 0, i32 7
  %475 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %474, i32 0, i32 6
  %476 = load ptr, ptr %475, align 8, !tbaa !28
  %477 = load i64, ptr %34, align 8, !tbaa !9
  %478 = getelementptr inbounds ptr, ptr %476, i64 %477
  %479 = load ptr, ptr %478, align 8, !tbaa !5
  %480 = load i64, ptr %26, align 8, !tbaa !9
  %481 = getelementptr inbounds double, ptr %479, i64 %480
  %482 = load i64, ptr %27, align 8, !tbaa !9
  %483 = sub nsw i64 %482, 1
  %484 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %483)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %472, i64 noundef 1, ptr noundef %481, i64 noundef 1, i64 noundef %484)
  br label %485

485:                                              ; preds = %467, %451
  %486 = load ptr, ptr %35, align 8, !tbaa !5
  %487 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %486, i32 0, i32 15
  %488 = load ptr, ptr %35, align 8, !tbaa !5
  %489 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %488, i32 0, i32 11
  %490 = load ptr, ptr %35, align 8, !tbaa !5
  %491 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %490, i32 0, i32 12
  %492 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef %487, ptr noundef %489, ptr noundef %491, ptr noundef %492)
  br label %493

493:                                              ; preds = %485
  %494 = load i64, ptr %34, align 8, !tbaa !9
  %495 = add nsw i64 %494, 1
  store i64 %495, ptr %34, align 8, !tbaa !9
  br label %410, !llvm.loop !32

496:                                              ; preds = %410
  %497 = load i64, ptr %32, align 8, !tbaa !9
  %498 = load ptr, ptr %35, align 8, !tbaa !5
  %499 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %498, i32 0, i32 0
  %500 = load i64, ptr %499, align 8, !tbaa !23
  %501 = add nsw i64 %497, %500
  store i64 %501, ptr %32, align 8, !tbaa !9
  br label %278, !llvm.loop !33

502:                                              ; preds = %278
  %503 = load ptr, ptr %35, align 8, !tbaa !5
  %504 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %503, i32 0, i32 15
  %505 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %504, ptr noundef %505)
  %506 = load ptr, ptr %35, align 8, !tbaa !5
  %507 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %506, i32 0, i32 15
  %508 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %507, i32 0, i32 4
  %509 = load ptr, ptr %508, align 8, !tbaa !28
  %510 = getelementptr inbounds double, ptr %509, i64 0
  %511 = load double, ptr %510, align 8, !tbaa !13
  %512 = load ptr, ptr %23, align 8, !tbaa !5
  %513 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %512, i32 0, i32 0
  store double %511, ptr %513, align 8, !tbaa !15
  %514 = load ptr, ptr %35, align 8, !tbaa !5
  %515 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %514, i32 0, i32 15
  %516 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %515, i32 0, i32 4
  %517 = load ptr, ptr %516, align 8, !tbaa !28
  %518 = getelementptr inbounds double, ptr %517, i64 1
  %519 = load double, ptr %518, align 8, !tbaa !13
  %520 = load ptr, ptr %24, align 8, !tbaa !5
  %521 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 2.000000e+00, ptr noundef %520)
  %522 = fdiv double %519, %521
  %523 = load ptr, ptr %23, align 8, !tbaa !5
  %524 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %523, i32 0, i32 1
  store double %522, ptr %524, align 8, !tbaa !17
  %525 = load ptr, ptr %35, align 8, !tbaa !5
  %526 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %525, i32 0, i32 15
  %527 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %526, i32 0, i32 4
  %528 = load ptr, ptr %527, align 8, !tbaa !28
  %529 = getelementptr inbounds double, ptr %528, i64 2
  %530 = load double, ptr %529, align 8, !tbaa !13
  %531 = load ptr, ptr %23, align 8, !tbaa !5
  %532 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %531, i32 0, i32 2
  store double %530, ptr %532, align 8, !tbaa !18
  %533 = load ptr, ptr %35, align 8, !tbaa !5
  %534 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %533, i32 0, i32 15
  %535 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %534, i32 0, i32 4
  %536 = load ptr, ptr %535, align 8, !tbaa !28
  %537 = getelementptr inbounds double, ptr %536, i64 3
  %538 = load double, ptr %537, align 8, !tbaa !13
  %539 = load ptr, ptr %23, align 8, !tbaa !5
  %540 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %539, i32 0, i32 3
  store double %538, ptr %540, align 8, !tbaa !19
  %541 = load ptr, ptr %35, align 8, !tbaa !5
  %542 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %541, i32 0, i32 15
  %543 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %542, i32 0, i32 4
  %544 = load ptr, ptr %543, align 8, !tbaa !28
  %545 = getelementptr inbounds double, ptr %544, i64 4
  %546 = load double, ptr %545, align 8, !tbaa !13
  %547 = load ptr, ptr %23, align 8, !tbaa !5
  %548 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %547, i32 0, i32 4
  store double %546, ptr %548, align 8, !tbaa !20
  %549 = load ptr, ptr %22, align 8, !tbaa !5
  %550 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %549, ptr noundef %36, ptr noundef %550)
  %551 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %551)
  store i32 0, ptr %42, align 4
  br label %552

552:                                              ; preds = %502, %121, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #6
  %553 = load i32, ptr %42, align 4
  switch i32 %553, label %555 [
    i32 0, label %554
    i32 1, label %554
  ]

554:                                              ; preds = %552, %552
  ret void

555:                                              ; preds = %552
  unreachable
}

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

declare noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef) #3

declare noundef double @_ZN11alglib_impl10spawnlevelEPNS_8ae_stateE(ptr noundef) #3

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl23_trypexec_mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !14, i64 0}
!16 = !{!"_ZTSN11alglib_impl11modelerrorsE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!17 = !{!16, !14, i64 8}
!18 = !{!16, !14, i64 16}
!19 = !{!16, !14, i64 24}
!20 = !{!16, !14, i64 32}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSN11alglib_impl10mlpbuffersE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !25, i64 40, !25, i64 104, !27, i64 168, !27, i64 248, !25, i64 328, !25, i64 392, !25, i64 456, !25, i64 520, !14, i64 584, !25, i64 592, !25, i64 656}
!25 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !12, i64 16, !26, i64 24, !7, i64 56}
!26 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !26, i64 40, !7, i64 72}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}


; 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" }
%"struct.alglib_impl::modelerrors" = type { double, double, double, double, double }

@_ZN11alglib_implL22mlpbase_microbatchsizeE = external hidden local_unnamed_addr global i64, align 8
@.str.220 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [30 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

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

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

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double 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 #2

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 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 #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #2 {
  %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 ptr, align 8
  %18 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.alglib_impl::modelerrors", align 16
  %22 = alloca %"struct.alglib_impl::modelerrors", align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %22) #7
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %11, ptr noundef nonnull %13)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %18, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %21, i8 0, i64 40, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %22, i8 0, i64 40, i1 false)
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef nonnull %21, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef nonnull %22, ptr noundef %11, i1 noundef zeroext true)
  %23 = icmp sgt i64 %3, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.220, ptr noundef %11)
  %24 = icmp ult i64 %4, 2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.221, ptr noundef %11)
  %25 = icmp eq i64 %8, 0
  %26 = icmp eq i64 %8, 1
  %27 = icmp ult i64 %8, 2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.222, ptr noundef %11)
  call void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %11)
  %28 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %0, ptr noundef %11)
  %29 = sub nsw i64 %7, %6
  %30 = sitofp i64 %29 to double
  %31 = load i64, ptr %16, align 8, !tbaa !5
  %32 = sitofp i64 %31 to double
  %33 = fmul double %30, %32
  %34 = fmul double %33, 2.000000e+00
  %35 = call noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef %11)
  %36 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %34, double noundef %35)
  %.pre169 = load i64, ptr @_ZN11alglib_implL22mlpbase_microbatchsizeE, align 8, !tbaa !5
  %37 = shl nsw i64 %.pre169, 1
  %.not = icmp sge i64 %29, %37
  %or.cond.not = select i1 %36, i1 %.not, i1 false
  br i1 %or.cond.not, label %38, label %40

38:                                               ; preds = %12
  %39 = call noundef zeroext i1 @_ZN11alglib_impl23_trypexec_mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11)
  br i1 %39, label %254, label %._crit_edge168

._crit_edge168:                                   ; preds = %38
  %.pre = load i64, ptr @_ZN11alglib_implL22mlpbase_microbatchsizeE, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %._crit_edge168, %12
  %41 = phi i64 [ %.pre, %._crit_edge168 ], [ %.pre169, %12 ]
  %42 = shl nsw i64 %41, 1
  %.not148 = icmp slt i64 %29, %42
  br i1 %.not148, label %106, label %43

43:                                               ; preds = %40
  %44 = call noundef double @_ZN11alglib_impl10spawnlevelEPNS_8ae_stateE(ptr noundef %11)
  %45 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %34, double noundef %44)
  br i1 %45, label %46, label %106

46:                                               ; preds = %43
  %47 = load i64, ptr @_ZN11alglib_implL22mlpbase_microbatchsizeE, align 8, !tbaa !5
  call void @_ZN11alglib_impl11splitlengthEllPlS0_PNS_8ae_stateE(i64 noundef %29, i64 noundef %47, ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef %11)
  %48 = load i64, ptr %19, align 8, !tbaa !5
  %49 = add nsw i64 %48, %6
  call void @_ZN11alglib_impl13mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %49, i64 noundef %8, ptr noundef %9, ptr noundef nonnull %21, ptr noundef %11)
  %50 = load i64, ptr %19, align 8, !tbaa !5
  %51 = add nsw i64 %50, %6
  call void @_ZN11alglib_impl13mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %51, i64 noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef nonnull %22, ptr noundef %11)
  %52 = load i64, ptr %19, align 8, !tbaa !5
  %53 = sitofp i64 %52 to double
  %54 = load i64, ptr %20, align 8, !tbaa !5
  %55 = sitofp i64 %54 to double
  %56 = add nsw i64 %54, %52
  %57 = sitofp i64 %56 to double
  %58 = load <2 x double>, ptr %21, align 16, !tbaa !9
  %59 = load <2 x double>, ptr %22, align 16, !tbaa !9
  %60 = insertelement <2 x double> poison, double %55, i64 0
  %61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
  %62 = fmul <2 x double> %59, %61
  %63 = insertelement <2 x double> poison, double %53, i64 0
  %64 = shufflevector <2 x double> %63, <2 x double> poison, <2 x i32> zeroinitializer
  %65 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %58, <2 x double> %62)
  %66 = insertelement <2 x double> poison, double %57, i64 0
  %67 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
  %68 = fdiv <2 x double> %65, %67
  store <2 x double> %68, ptr %10, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %21, i64 16
  %70 = load double, ptr %69, align 16, !tbaa !11
  %71 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %70, ptr noundef %11)
  %72 = load i64, ptr %20, align 8, !tbaa !5
  %73 = sitofp i64 %72 to double
  %74 = getelementptr inbounds i8, ptr %22, i64 16
  %75 = load double, ptr %74, align 16, !tbaa !11
  %76 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %75, ptr noundef %11)
  %77 = fmul double %76, %73
  %78 = call double @llvm.fmuladd.f64(double %53, double %71, double %77)
  %79 = load i64, ptr %19, align 8, !tbaa !5
  %80 = load i64, ptr %20, align 8, !tbaa !5
  %81 = add nsw i64 %80, %79
  %82 = sitofp i64 %81 to double
  %83 = fdiv double %78, %82
  %84 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %83, ptr noundef %11)
  %85 = getelementptr inbounds i8, ptr %10, i64 16
  store double %84, ptr %85, align 8, !tbaa !11
  %86 = load i64, ptr %19, align 8, !tbaa !5
  %87 = sitofp i64 %86 to double
  %88 = getelementptr inbounds i8, ptr %21, i64 24
  %89 = load i64, ptr %20, align 8, !tbaa !5
  %90 = sitofp i64 %89 to double
  %91 = getelementptr inbounds i8, ptr %22, i64 24
  %92 = add nsw i64 %89, %86
  %93 = sitofp i64 %92 to double
  %94 = getelementptr inbounds i8, ptr %10, i64 24
  %95 = load <2 x double>, ptr %88, align 8, !tbaa !9
  %96 = load <2 x double>, ptr %91, align 8, !tbaa !9
  %97 = insertelement <2 x double> poison, double %90, i64 0
  %98 = shufflevector <2 x double> %97, <2 x double> poison, <2 x i32> zeroinitializer
  %99 = fmul <2 x double> %96, %98
  %100 = insertelement <2 x double> poison, double %87, i64 0
  %101 = shufflevector <2 x double> %100, <2 x double> poison, <2 x i32> zeroinitializer
  %102 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %101, <2 x double> %95, <2 x double> %99)
  %103 = insertelement <2 x double> poison, double %93, i64 0
  %104 = shufflevector <2 x double> %103, <2 x double> poison, <2 x i32> zeroinitializer
  %105 = fdiv <2 x double> %102, %104
  store <2 x double> %105, ptr %94, align 8, !tbaa !9
  br label %254

106:                                              ; preds = %43, %40
  call void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %9, ptr noundef nonnull %18, ptr noundef %11)
  %107 = load i64, ptr %14, align 8, !tbaa !5
  %108 = load i64, ptr %15, align 8, !tbaa !5
  br i1 %28, label %109, label %112

109:                                              ; preds = %106
  %110 = load ptr, ptr %17, align 8, !tbaa !13
  %111 = getelementptr inbounds i8, ptr %110, i64 656
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %108, ptr noundef nonnull %111, ptr noundef %11)
  br label %118

112:                                              ; preds = %106
  %113 = sub nsw i64 0, %108
  %114 = load ptr, ptr %17, align 8, !tbaa !13
  %115 = getelementptr inbounds i8, ptr %114, i64 656
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %113, ptr noundef nonnull %115, ptr noundef %11)
  %116 = add i64 %107, -1
  %117 = add i64 %116, %108
  br label %118

118:                                              ; preds = %112, %109
  %.0141 = phi i64 [ %107, %109 ], [ %117, %112 ]
  %119 = getelementptr inbounds i8, ptr %0, i64 272
  %120 = load i64, ptr %16, align 8, !tbaa !5
  %121 = call noundef i64 @_ZN11alglib_impl9mlpntotalEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %0, ptr noundef %11)
  %122 = load i64, ptr %14, align 8, !tbaa !5
  %123 = load i64, ptr %15, align 8, !tbaa !5
  %124 = load ptr, ptr %17, align 8, !tbaa !13
  call void @_ZN11alglib_impl25hpcpreparechunkedgradientEPNS_9ae_vectorEllllPNS_10mlpbuffersEPNS_8ae_stateE(ptr noundef nonnull %119, i64 noundef %120, i64 noundef %121, i64 noundef %122, i64 noundef %123, ptr noundef %124, ptr noundef %11)
  %125 = icmp slt i64 %6, %7
  %.pre173 = load ptr, ptr %17, align 8, !tbaa !13
  br i1 %125, label %.lr.ph164, label %._crit_edge165

.lr.ph164:                                        ; preds = %118
  %126 = getelementptr inbounds i8, ptr %5, i64 56
  %127 = getelementptr inbounds i8, ptr %1, i64 72
  %.pre171 = load i64, ptr %.pre173, align 8, !tbaa !15
  br label %128

128:                                              ; preds = %.lr.ph164, %._crit_edge161
  %129 = phi i64 [ %.pre171, %.lr.ph164 ], [ %225, %._crit_edge161 ]
  %.0142162 = phi i64 [ %6, %.lr.ph164 ], [ %226, %._crit_edge161 ]
  %130 = add nsw i64 %129, %.0142162
  %131 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %7, i64 noundef %130, ptr noundef %11)
  %132 = sub nsw i64 %131, %.0142162
  %.not149.not152 = icmp sgt i64 %132, 0
  br i1 %.not149.not152, label %.lr.ph, label %._crit_edge.thread

.preheader:                                       ; preds = %152
  br i1 %.not149.not152, label %.lr.ph156, label %._crit_edge.thread

.lr.ph:                                           ; preds = %128, %152
  %.0153 = phi i64 [ %153, %152 ], [ 0, %128 ]
  %133 = add nsw i64 %.0153, %.0142162
  %spec.select = select i1 %25, i64 %133, i64 -1
  br i1 %26, label %134, label %139

134:                                              ; preds = %.lr.ph
  %135 = load ptr, ptr %126, align 8, !tbaa !21
  %136 = getelementptr i64, ptr %135, i64 %.0142162
  %137 = getelementptr i64, ptr %136, i64 %.0153
  %138 = load i64, ptr %137, align 8, !tbaa !5
  br label %139

139:                                              ; preds = %134, %.lr.ph
  %.1144 = phi i64 [ %138, %134 ], [ %spec.select, %.lr.ph ]
  %140 = icmp sgt i64 %.1144, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %140, ptr noundef nonnull @.str.223, ptr noundef %11)
  switch i64 %4, label %152 [
    i64 0, label %141
    i64 1, label %145
  ]

141:                                              ; preds = %139
  %142 = load ptr, ptr %17, align 8, !tbaa !13
  %143 = load ptr, ptr %127, align 8, !tbaa !21
  %144 = getelementptr inbounds ptr, ptr %143, i64 %.1144
  br label %.sink.split

145:                                              ; preds = %139
  %146 = load ptr, ptr %17, align 8, !tbaa !13
  %147 = getelementptr inbounds i8, ptr %146, i64 328
  call void @_ZN11alglib_impl12sparsegetrowEPNS_12sparsematrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %2, i64 noundef %.1144, ptr noundef nonnull %147, ptr noundef %11)
  %148 = load ptr, ptr %17, align 8, !tbaa !13
  %149 = getelementptr inbounds i8, ptr %148, i64 384
  br label %.sink.split

.sink.split:                                      ; preds = %145, %141
  %.sink177 = phi ptr [ %144, %141 ], [ %149, %145 ]
  %.pn178 = phi ptr [ %142, %141 ], [ %148, %145 ]
  %.pn.in = getelementptr inbounds i8, ptr %.pn178, i64 240
  %.pn = load ptr, ptr %.pn.in, align 8, !tbaa !21
  %.sink.in = getelementptr inbounds ptr, ptr %.pn, i64 %.0153
  %.sink = load ptr, ptr %.sink.in, align 8, !tbaa !13
  %150 = load ptr, ptr %.sink177, align 8, !tbaa !21
  %151 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.0141)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %.sink, i64 noundef 1, ptr noundef %150, i64 noundef 1, i64 noundef %151)
  br label %152

152:                                              ; preds = %.sink.split, %139
  %153 = add nuw nsw i64 %.0153, 1
  %exitcond.not = icmp eq i64 %153, %132
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !22

.lr.ph156:                                        ; preds = %.preheader, %.lr.ph156
  %.1155 = phi i64 [ %164, %.lr.ph156 ], [ 0, %.preheader ]
  %154 = load ptr, ptr %17, align 8, !tbaa !13
  %155 = getelementptr inbounds i8, ptr %154, i64 320
  %156 = load ptr, ptr %155, align 8, !tbaa !21
  %157 = getelementptr inbounds ptr, ptr %156, i64 %.1155
  %158 = load ptr, ptr %157, align 8, !tbaa !13
  %159 = getelementptr inbounds i8, ptr %154, i64 240
  %160 = load ptr, ptr %159, align 8, !tbaa !21
  %161 = getelementptr inbounds ptr, ptr %160, i64 %.1155
  %162 = load ptr, ptr %161, align 8, !tbaa !13
  %163 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.0141)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %158, i64 noundef 1, ptr noundef %162, i64 noundef 1, i64 noundef %163)
  %164 = add nuw nsw i64 %.1155, 1
  %exitcond166.not = icmp eq i64 %164, %132
  br i1 %exitcond166.not, label %._crit_edge, label %.lr.ph156, !llvm.loop !24

._crit_edge.thread:                               ; preds = %.preheader, %128
  %165 = load ptr, ptr %17, align 8, !tbaa !13
  %166 = getelementptr inbounds i8, ptr %165, i64 248
  %167 = getelementptr inbounds i8, ptr %165, i64 40
  %168 = getelementptr inbounds i8, ptr %165, i64 104
  call void @_ZN11alglib_implL25mlpbase_mlpchunkedprocessEPNS_20multilayerperceptronEPNS_9ae_matrixEllPNS_9ae_vectorES5_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %166, i64 noundef 0, i64 noundef %132, ptr noundef nonnull %167, ptr noundef nonnull %168, ptr noundef %11)
  br label %._crit_edge161

._crit_edge:                                      ; preds = %.lr.ph156
  %169 = load ptr, ptr %17, align 8, !tbaa !13
  %170 = getelementptr inbounds i8, ptr %169, i64 248
  %171 = getelementptr inbounds i8, ptr %169, i64 40
  %172 = getelementptr inbounds i8, ptr %169, i64 104
  call void @_ZN11alglib_implL25mlpbase_mlpchunkedprocessEPNS_20multilayerperceptronEPNS_9ae_matrixEllPNS_9ae_vectorES5_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %170, i64 noundef 0, i64 noundef %132, ptr noundef nonnull %171, ptr noundef nonnull %172, ptr noundef %11)
  br i1 %.not149.not152, label %.lr.ph160, label %._crit_edge161

.lr.ph160:                                        ; preds = %._crit_edge, %218
  %.2158 = phi i64 [ %223, %218 ], [ 0, %._crit_edge ]
  %173 = load ptr, ptr %17, align 8, !tbaa !13
  %174 = getelementptr inbounds i8, ptr %173, i64 448
  %175 = load ptr, ptr %174, align 8, !tbaa !21
  %176 = getelementptr inbounds i8, ptr %173, i64 320
  %177 = load ptr, ptr %176, align 8, !tbaa !21
  %178 = getelementptr inbounds ptr, ptr %177, i64 %.2158
  %179 = load ptr, ptr %178, align 8, !tbaa !13
  %180 = load i64, ptr %14, align 8, !tbaa !5
  %181 = add nsw i64 %180, -1
  %182 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %181)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %175, i64 noundef 1, ptr noundef %179, i64 noundef 1, i64 noundef %182)
  %183 = load ptr, ptr %17, align 8, !tbaa !13
  %184 = getelementptr inbounds i8, ptr %183, i64 512
  %185 = load ptr, ptr %184, align 8, !tbaa !21
  %186 = getelementptr inbounds i8, ptr %183, i64 320
  %187 = load ptr, ptr %186, align 8, !tbaa !21
  %188 = getelementptr inbounds ptr, ptr %187, i64 %.2158
  %189 = load ptr, ptr %188, align 8, !tbaa !13
  %190 = load i64, ptr %14, align 8, !tbaa !5
  %191 = getelementptr inbounds double, ptr %189, i64 %190
  %192 = load i64, ptr %15, align 8, !tbaa !5
  %193 = add nsw i64 %192, -1
  %194 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %193)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %185, i64 noundef 1, ptr noundef %191, i64 noundef 1, i64 noundef %194)
  %195 = load ptr, ptr %17, align 8, !tbaa !13
  br i1 %28, label %196, label %206

196:                                              ; preds = %.lr.ph160
  %197 = getelementptr inbounds i8, ptr %195, i64 240
  %198 = load ptr, ptr %197, align 8, !tbaa !21
  %199 = getelementptr inbounds ptr, ptr %198, i64 %.2158
  %200 = load ptr, ptr %199, align 8, !tbaa !13
  %201 = load i64, ptr %14, align 8, !tbaa !5
  %202 = getelementptr inbounds double, ptr %200, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !9
  %204 = getelementptr inbounds i8, ptr %195, i64 576
  %205 = load ptr, ptr %204, align 8, !tbaa !21
  store double %203, ptr %205, align 8, !tbaa !9
  br label %218

206:                                              ; preds = %.lr.ph160
  %207 = getelementptr inbounds i8, ptr %195, i64 576
  %208 = load ptr, ptr %207, align 8, !tbaa !21
  %209 = getelementptr inbounds i8, ptr %195, i64 240
  %210 = load ptr, ptr %209, align 8, !tbaa !21
  %211 = getelementptr inbounds ptr, ptr %210, i64 %.2158
  %212 = load ptr, ptr %211, align 8, !tbaa !13
  %213 = load i64, ptr %14, align 8, !tbaa !5
  %214 = getelementptr inbounds double, ptr %212, i64 %213
  %215 = load i64, ptr %15, align 8, !tbaa !5
  %216 = add nsw i64 %215, -1
  %217 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %216)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %208, i64 noundef 1, ptr noundef %214, i64 noundef 1, i64 noundef %217)
  %.pre172 = load ptr, ptr %17, align 8, !tbaa !13
  br label %218

218:                                              ; preds = %206, %196
  %219 = phi ptr [ %.pre172, %206 ], [ %195, %196 ]
  %220 = getelementptr inbounds i8, ptr %219, i64 656
  %221 = getelementptr inbounds i8, ptr %219, i64 456
  %222 = getelementptr inbounds i8, ptr %219, i64 520
  call void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef nonnull %220, ptr noundef nonnull %221, ptr noundef nonnull %222, ptr noundef %11)
  %223 = add nuw nsw i64 %.2158, 1
  %exitcond167.not = icmp eq i64 %223, %132
  br i1 %exitcond167.not, label %._crit_edge161, label %.lr.ph160, !llvm.loop !25

._crit_edge161:                                   ; preds = %218, %._crit_edge.thread, %._crit_edge
  %224 = load ptr, ptr %17, align 8, !tbaa !13
  %225 = load i64, ptr %224, align 8, !tbaa !15
  %226 = add nsw i64 %225, %.0142162
  %227 = icmp slt i64 %226, %7
  br i1 %227, label %128, label %._crit_edge165, !llvm.loop !26

._crit_edge165:                                   ; preds = %._crit_edge161, %118
  %228 = phi ptr [ %.pre173, %118 ], [ %224, %._crit_edge161 ]
  %229 = getelementptr inbounds i8, ptr %228, i64 656
  call void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %229, ptr noundef %11)
  %230 = load ptr, ptr %17, align 8, !tbaa !13
  %231 = getelementptr inbounds i8, ptr %230, i64 712
  %232 = load ptr, ptr %231, align 8, !tbaa !21
  %233 = load double, ptr %232, align 8, !tbaa !9
  store double %233, ptr %10, align 8, !tbaa !27
  %234 = load ptr, ptr %231, align 8, !tbaa !21
  %235 = getelementptr inbounds i8, ptr %234, i64 8
  %236 = load double, ptr %235, align 8, !tbaa !9
  %237 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 2.000000e+00, ptr noundef %11)
  %238 = fdiv double %236, %237
  %239 = getelementptr inbounds i8, ptr %10, i64 8
  store double %238, ptr %239, align 8, !tbaa !28
  %240 = load ptr, ptr %17, align 8, !tbaa !13
  %241 = getelementptr inbounds i8, ptr %240, i64 712
  %242 = load ptr, ptr %241, align 8, !tbaa !21
  %243 = getelementptr inbounds i8, ptr %242, i64 16
  %244 = load double, ptr %243, align 8, !tbaa !9
  %245 = getelementptr inbounds i8, ptr %10, i64 16
  store double %244, ptr %245, align 8, !tbaa !11
  %246 = load ptr, ptr %241, align 8, !tbaa !21
  %247 = getelementptr inbounds i8, ptr %246, i64 24
  %248 = load double, ptr %247, align 8, !tbaa !9
  %249 = getelementptr inbounds i8, ptr %10, i64 24
  store double %248, ptr %249, align 8, !tbaa !29
  %250 = load ptr, ptr %241, align 8, !tbaa !21
  %251 = getelementptr inbounds i8, ptr %250, i64 32
  %252 = load double, ptr %251, align 8, !tbaa !9
  %253 = getelementptr inbounds i8, ptr %10, i64 32
  store double %252, ptr %253, align 8, !tbaa !30
  call void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %9, ptr noundef nonnull %18, ptr noundef %11)
  br label %254

254:                                              ; preds = %38, %._crit_edge165, %46
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %11)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  ret void
}

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

declare noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl10spawnlevelEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl23_trypexec_mlpallerrorsxEPNS_20multilayerperceptronEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN11alglib_impl11modelerrorsE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSN11alglib_impl10mlpbuffersE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !17, i64 40, !17, i64 104, !20, i64 168, !20, i64 248, !17, i64 328, !17, i64 392, !17, i64 456, !17, i64 520, !10, i64 584, !17, i64 592, !17, i64 656}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !18, i64 16, !19, i64 24, !7, i64 56}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!20 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !18, i64 32, !19, i64 40, !7, i64 72}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = !{!12, !10, i64 0}
!28 = !{!12, !10, i64 8}
!29 = !{!12, !10, i64 24}
!30 = !{!12, !10, i64 32}


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