; 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::mlpensemble" = type { i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::multilayerperceptron", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::multilayerperceptron" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::modelerrors", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"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::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" }

@.str.345 = external hidden unnamed_addr constant [31 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 noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl18mlpgetoutputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(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

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

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

declare void @_ZN11alglib_impl14ae_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

; 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 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 void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

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

declare void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #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_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14mlpeallerrorsxEPNS_11mlpensembleEPNS_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 ptr, align 8
  %33 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %34 = alloca %"struct.alglib_impl::modelerrors", align 8
  %35 = alloca %"struct.alglib_impl::modelerrors", align 8
  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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %35) #5
  %36 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %36, ptr noundef %25)
  call void @llvm.memset.p0.i64(ptr align 8 %33, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %34, i8 0, i64 40, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %35, i8 0, i64 40, i1 false)
  %37 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef %33, ptr noundef %32, ptr noundef %37, i1 noundef zeroext true)
  %38 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef %34, ptr noundef %38, i1 noundef zeroext true)
  %39 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef %35, ptr noundef %39, i1 noundef zeroext true)
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %24, align 8, !tbaa !5
  %43 = call noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %41, ptr noundef %42)
  store i64 %43, ptr %28, align 8, !tbaa !9
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %44, i32 0, i32 4
  %46 = load ptr, ptr %24, align 8, !tbaa !5
  %47 = call noundef i64 @_ZN11alglib_impl18mlpgetoutputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %45, ptr noundef %46)
  store i64 %47, ptr %29, align 8, !tbaa !9
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %48, i32 0, i32 4
  %50 = load ptr, ptr %24, align 8, !tbaa !5
  %51 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %49, ptr noundef %50)
  %52 = zext i1 %51 to i8
  store i8 %52, ptr %30, align 1, !tbaa !11
  %53 = load ptr, ptr %22, align 8, !tbaa !5
  %54 = 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 %53, ptr noundef %33, ptr noundef %54)
  %55 = load i8, ptr %30, align 1, !tbaa !11, !range !13, !noundef !14
  %56 = trunc i8 %55 to i1
  br i1 %56, label %57, label %62

57:                                               ; preds = %12
  %58 = load i64, ptr %29, align 8, !tbaa !9
  %59 = load ptr, ptr %32, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %59, i32 0, i32 15
  %61 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %58, ptr noundef %60, ptr noundef %61)
  br label %68

62:                                               ; preds = %12
  %63 = load i64, ptr %29, align 8, !tbaa !9
  %64 = sub nsw i64 0, %63
  %65 = load ptr, ptr %32, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %65, i32 0, i32 15
  %67 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %64, ptr noundef %66, ptr noundef %67)
  br label %68

68:                                               ; preds = %62, %57
  %69 = load ptr, ptr %32, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %69, i32 0, i32 10
  %71 = load i64, ptr %28, align 8, !tbaa !9
  %72 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %70, i64 noundef %71, ptr noundef %72)
  %73 = load ptr, ptr %32, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %73, i32 0, i32 11
  %75 = load i64, ptr %29, align 8, !tbaa !9
  %76 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %74, i64 noundef %75, ptr noundef %76)
  %77 = load ptr, ptr %32, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %77, i32 0, i32 12
  %79 = load i64, ptr %29, align 8, !tbaa !9
  %80 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %78, i64 noundef %79, ptr noundef %80)
  %81 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %81, ptr %26, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %233, %68
  %83 = load i64, ptr %26, align 8, !tbaa !9
  %84 = load i64, ptr %20, align 8, !tbaa !9
  %85 = sub nsw i64 %84, 1
  %86 = icmp sle i64 %83, %85
  br i1 %86, label %87, label %236

87:                                               ; preds = %82
  store i64 -1, ptr %31, align 8, !tbaa !9
  %88 = load i64, ptr %21, align 8, !tbaa !9
  %89 = icmp eq i64 %88, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %87
  %91 = load i64, ptr %26, align 8, !tbaa !9
  store i64 %91, ptr %31, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %90, %87
  %93 = load i64, ptr %21, align 8, !tbaa !9
  %94 = icmp eq i64 %93, 1
  br i1 %94, label %95, label %102

95:                                               ; preds = %92
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !15
  %99 = load i64, ptr %26, align 8, !tbaa !9
  %100 = getelementptr inbounds i64, ptr %98, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !9
  store i64 %101, ptr %31, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %95, %92
  %103 = load i64, ptr %31, align 8, !tbaa !9
  %104 = icmp sge i64 %103, 0
  %105 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %104, ptr noundef @.str.345, ptr noundef %105)
  %106 = load i64, ptr %17, align 8, !tbaa !9
  %107 = icmp eq i64 %106, 0
  br i1 %107, label %108, label %124

108:                                              ; preds = %102
  %109 = load ptr, ptr %32, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %109, i32 0, i32 10
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !15
  %113 = getelementptr inbounds double, ptr %112, i64 0
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !15
  %117 = load i64, ptr %31, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %116, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 0
  %121 = load i64, ptr %28, align 8, !tbaa !9
  %122 = sub nsw i64 %121, 1
  %123 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %122)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %113, i64 noundef 1, ptr noundef %120, i64 noundef 1, i64 noundef %123)
  br label %124

124:                                              ; preds = %108, %102
  %125 = load i64, ptr %17, align 8, !tbaa !9
  %126 = icmp eq i64 %125, 1
  br i1 %126, label %127, label %133

127:                                              ; preds = %124
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = load i64, ptr %31, align 8, !tbaa !9
  %130 = load ptr, ptr %32, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %130, i32 0, i32 10
  %132 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl12sparsegetrowEPNS_12sparsematrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %128, i64 noundef %129, ptr noundef %131, ptr noundef %132)
  br label %133

133:                                              ; preds = %127, %124
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = load ptr, ptr %32, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %135, i32 0, i32 10
  %137 = load ptr, ptr %32, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %137, i32 0, i32 11
  %139 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl11mlpeprocessEPNS_11mlpensembleEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %134, ptr noundef %136, ptr noundef %138, ptr noundef %139)
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::mlpensemble", ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %24, align 8, !tbaa !5
  %143 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %141, ptr noundef %142)
  br i1 %143, label %144, label %177

144:                                              ; preds = %133
  %145 = load i64, ptr %17, align 8, !tbaa !9
  %146 = icmp eq i64 %145, 0
  br i1 %146, label %147, label %162

147:                                              ; preds = %144
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %148, i32 0, i32 6
  %150 = load ptr, ptr %149, align 8, !tbaa !15
  %151 = load i64, ptr %31, align 8, !tbaa !9
  %152 = getelementptr inbounds ptr, ptr %150, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load i64, ptr %28, align 8, !tbaa !9
  %155 = getelementptr inbounds double, ptr %153, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !16
  %157 = load ptr, ptr %32, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %157, i32 0, i32 12
  %159 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !15
  %161 = getelementptr inbounds double, ptr %160, i64 0
  store double %156, ptr %161, align 8, !tbaa !16
  br label %162

162:                                              ; preds = %147, %144
  %163 = load i64, ptr %17, align 8, !tbaa !9
  %164 = icmp eq i64 %163, 1
  br i1 %164, label %165, label %176

165:                                              ; preds = %162
  %166 = load ptr, ptr %15, align 8, !tbaa !5
  %167 = load i64, ptr %31, align 8, !tbaa !9
  %168 = load i64, ptr %28, align 8, !tbaa !9
  %169 = load ptr, ptr %24, align 8, !tbaa !5
  %170 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %166, i64 noundef %167, i64 noundef %168, ptr noundef %169)
  %171 = load ptr, ptr %32, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %171, i32 0, i32 12
  %173 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %172, i32 0, i32 4
  %174 = load ptr, ptr %173, align 8, !tbaa !15
  %175 = getelementptr inbounds double, ptr %174, i64 0
  store double %170, ptr %175, align 8, !tbaa !16
  br label %176

176:                                              ; preds = %165, %162
  br label %225

177:                                              ; preds = %133
  %178 = load i64, ptr %17, align 8, !tbaa !9
  %179 = icmp eq i64 %178, 0
  br i1 %179, label %180, label %197

180:                                              ; preds = %177
  %181 = load ptr, ptr %32, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %181, i32 0, i32 12
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !15
  %185 = getelementptr inbounds double, ptr %184, i64 0
  %186 = load ptr, ptr %14, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %186, i32 0, i32 6
  %188 = load ptr, ptr %187, align 8, !tbaa !15
  %189 = load i64, ptr %31, align 8, !tbaa !9
  %190 = getelementptr inbounds ptr, ptr %188, i64 %189
  %191 = load ptr, ptr %190, align 8, !tbaa !5
  %192 = load i64, ptr %28, align 8, !tbaa !9
  %193 = getelementptr inbounds double, ptr %191, i64 %192
  %194 = load i64, ptr %29, align 8, !tbaa !9
  %195 = sub nsw i64 %194, 1
  %196 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %195)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %185, i64 noundef 1, ptr noundef %193, i64 noundef 1, i64 noundef %196)
  br label %197

197:                                              ; preds = %180, %177
  %198 = load i64, ptr %17, align 8, !tbaa !9
  %199 = icmp eq i64 %198, 1
  br i1 %199, label %200, label %224

200:                                              ; preds = %197
  store i64 0, ptr %27, align 8, !tbaa !9
  br label %201

201:                                              ; preds = %220, %200
  %202 = load i64, ptr %27, align 8, !tbaa !9
  %203 = load i64, ptr %29, align 8, !tbaa !9
  %204 = sub nsw i64 %203, 1
  %205 = icmp sle i64 %202, %204
  br i1 %205, label %206, label %223

206:                                              ; preds = %201
  %207 = load ptr, ptr %15, align 8, !tbaa !5
  %208 = load i64, ptr %31, align 8, !tbaa !9
  %209 = load i64, ptr %28, align 8, !tbaa !9
  %210 = load i64, ptr %27, align 8, !tbaa !9
  %211 = add nsw i64 %209, %210
  %212 = load ptr, ptr %24, align 8, !tbaa !5
  %213 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %207, i64 noundef %208, i64 noundef %211, ptr noundef %212)
  %214 = load ptr, ptr %32, align 8, !tbaa !5
  %215 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %214, i32 0, i32 12
  %216 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %215, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !15
  %218 = load i64, ptr %27, align 8, !tbaa !9
  %219 = getelementptr inbounds double, ptr %217, i64 %218
  store double %213, ptr %219, align 8, !tbaa !16
  br label %220

220:                                              ; preds = %206
  %221 = load i64, ptr %27, align 8, !tbaa !9
  %222 = add nsw i64 %221, 1
  store i64 %222, ptr %27, align 8, !tbaa !9
  br label %201, !llvm.loop !18

223:                                              ; preds = %201
  br label %224

224:                                              ; preds = %223, %197
  br label %225

225:                                              ; preds = %224, %176
  %226 = load ptr, ptr %32, align 8, !tbaa !5
  %227 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %226, i32 0, i32 15
  %228 = load ptr, ptr %32, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %228, i32 0, i32 11
  %230 = load ptr, ptr %32, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %230, i32 0, i32 12
  %232 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef %227, ptr noundef %229, ptr noundef %231, ptr noundef %232)
  br label %233

233:                                              ; preds = %225
  %234 = load i64, ptr %26, align 8, !tbaa !9
  %235 = add nsw i64 %234, 1
  store i64 %235, ptr %26, align 8, !tbaa !9
  br label %82, !llvm.loop !20

236:                                              ; preds = %82
  %237 = load ptr, ptr %32, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %237, i32 0, i32 15
  %239 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %238, ptr noundef %239)
  %240 = load ptr, ptr %32, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %240, i32 0, i32 15
  %242 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %241, i32 0, i32 4
  %243 = load ptr, ptr %242, align 8, !tbaa !15
  %244 = getelementptr inbounds double, ptr %243, i64 0
  %245 = load double, ptr %244, align 8, !tbaa !16
  %246 = load ptr, ptr %23, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %246, i32 0, i32 0
  store double %245, ptr %247, align 8, !tbaa !21
  %248 = load ptr, ptr %32, align 8, !tbaa !5
  %249 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %248, i32 0, i32 15
  %250 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %249, i32 0, i32 4
  %251 = load ptr, ptr %250, align 8, !tbaa !15
  %252 = getelementptr inbounds double, ptr %251, i64 1
  %253 = load double, ptr %252, align 8, !tbaa !16
  %254 = load ptr, ptr %24, align 8, !tbaa !5
  %255 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 2.000000e+00, ptr noundef %254)
  %256 = fdiv double %253, %255
  %257 = load ptr, ptr %23, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %257, i32 0, i32 1
  store double %256, ptr %258, align 8, !tbaa !23
  %259 = load ptr, ptr %32, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %259, i32 0, i32 15
  %261 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %260, i32 0, i32 4
  %262 = load ptr, ptr %261, align 8, !tbaa !15
  %263 = getelementptr inbounds double, ptr %262, i64 2
  %264 = load double, ptr %263, align 8, !tbaa !16
  %265 = load ptr, ptr %23, align 8, !tbaa !5
  %266 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %265, i32 0, i32 2
  store double %264, ptr %266, align 8, !tbaa !24
  %267 = load ptr, ptr %32, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %267, i32 0, i32 15
  %269 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %268, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !15
  %271 = getelementptr inbounds double, ptr %270, i64 3
  %272 = load double, ptr %271, align 8, !tbaa !16
  %273 = load ptr, ptr %23, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %273, i32 0, i32 3
  store double %272, ptr %274, align 8, !tbaa !25
  %275 = load ptr, ptr %32, align 8, !tbaa !5
  %276 = getelementptr inbounds %"struct.alglib_impl::mlpbuffers", ptr %275, i32 0, i32 15
  %277 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %276, i32 0, i32 4
  %278 = load ptr, ptr %277, align 8, !tbaa !15
  %279 = getelementptr inbounds double, ptr %278, i64 4
  %280 = load double, ptr %279, align 8, !tbaa !16
  %281 = load ptr, ptr %23, align 8, !tbaa !5
  %282 = getelementptr inbounds %"struct.alglib_impl::modelerrors", ptr %281, i32 0, i32 4
  store double %280, ptr %282, align 8, !tbaa !26
  %283 = load ptr, ptr %22, align 8, !tbaa !5
  %284 = 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 %283, ptr noundef %33, ptr noundef %284)
  %285 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %285)
  call void @llvm.lifetime.end.p0(i64 40, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #5
  ret void
}

declare noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !17, i64 0}
!22 = !{!"_ZTSN11alglib_impl11modelerrorsE", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32}
!23 = !{!22, !17, i64 8}
!24 = !{!22, !17, i64 16}
!25 = !{!22, !17, i64 24}
!26 = !{!22, !17, i64 32}


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

@.str.345 = external hidden unnamed_addr constant [31 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 noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl18mlpgetoutputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(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

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

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

; 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 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 void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr 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

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 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_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 uwtable
define dso_local void @_ZN11alglib_impl14mlpeallerrorsxEPNS_11mlpensembleEPNS_9ae_matrixEPNS_12sparsematrixEllPNS_9ae_vectorElllPNS_14ae_shared_poolEPNS_11modelerrorsEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr nocapture noundef readonly %5, i64 noundef %6, i64 noundef %7, i64 noundef %8, ptr noundef %9, ptr nocapture noundef writeonly %10, ptr noundef %11) local_unnamed_addr #2 {
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.alglib_impl::ae_smart_ptr", align 8
  %16 = alloca %"struct.alglib_impl::modelerrors", align 8
  %17 = alloca %"struct.alglib_impl::modelerrors", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #5
  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) %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %16, i8 0, i64 40, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %17, i8 0, i64 40, i1 false)
  call void @_ZN11alglib_impl17ae_smart_ptr_initEPNS_12ae_smart_ptrEPPvPNS_8ae_stateEb(ptr noundef nonnull %15, ptr noundef nonnull %14, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef nonnull %16, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl17_modelerrors_initEPvPNS_8ae_stateEb(ptr noundef nonnull %17, ptr noundef %11, i1 noundef zeroext true)
  %18 = getelementptr inbounds i8, ptr %0, i64 200
  %19 = call noundef i64 @_ZN11alglib_impl17mlpgetinputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %18, ptr noundef %11)
  %20 = call noundef i64 @_ZN11alglib_impl18mlpgetoutputscountEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %18, ptr noundef %11)
  %21 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %18, ptr noundef %11)
  call void @_ZN11alglib_impl23ae_shared_pool_retrieveEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %9, ptr noundef nonnull %15, ptr noundef %11)
  %22 = sub nsw i64 0, %20
  %23 = load ptr, ptr %14, align 8
  %.sink = select i1 %21, i64 %20, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 656
  call void @_ZN11alglib_impl13dserrallocateElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %.sink, ptr noundef nonnull %24, ptr noundef %11)
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 392
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %26, i64 noundef %19, ptr noundef %11)
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 456
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %28, i64 noundef %20, ptr noundef %11)
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 520
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %30, i64 noundef %20, ptr noundef %11)
  %.not.not85 = icmp slt i64 %6, %7
  br i1 %.not.not85, label %.lr.ph87, label %._crit_edge

.lr.ph87:                                         ; preds = %12
  %31 = icmp eq i64 %8, 0
  %32 = icmp eq i64 %8, 1
  %33 = getelementptr inbounds i8, ptr %5, i64 56
  %34 = icmp eq i64 %4, 0
  %35 = icmp eq i64 %4, 1
  %36 = getelementptr inbounds i8, ptr %1, i64 72
  %37 = add nsw i64 %19, -1
  %38 = add nsw i64 %20, -1
  %.not.not8283 = icmp sgt i64 %20, 0
  br label %39

39:                                               ; preds = %.lr.ph87, %.loopexit
  %.08086 = phi i64 [ %6, %.lr.ph87 ], [ %101, %.loopexit ]
  %spec.select = select i1 %31, i64 %.08086, i64 -1
  br i1 %32, label %40, label %44

40:                                               ; preds = %39
  %41 = load ptr, ptr %33, align 8, !tbaa !9
  %42 = getelementptr inbounds i64, ptr %41, i64 %.08086
  %43 = load i64, ptr %42, align 8, !tbaa !10
  br label %44

44:                                               ; preds = %40, %39
  %.1 = phi i64 [ %43, %40 ], [ %spec.select, %39 ]
  %45 = icmp sgt i64 %.1, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef nonnull @.str.345, ptr noundef %11)
  br i1 %34, label %.thread, label %53

.thread:                                          ; preds = %44
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 448
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = load ptr, ptr %36, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.1
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %37)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %48, i64 noundef 1, ptr noundef %51, i64 noundef 1, i64 noundef %52)
  br label %57

53:                                               ; preds = %44
  br i1 %35, label %54, label %57

54:                                               ; preds = %53
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 392
  call void @_ZN11alglib_impl12sparsegetrowEPNS_12sparsematrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %2, i64 noundef %.1, ptr noundef nonnull %56, ptr noundef %11)
  br label %57

57:                                               ; preds = %.thread, %54, %53
  %58 = phi i1 [ false, %.thread ], [ true, %54 ], [ false, %53 ]
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 392
  %61 = getelementptr inbounds i8, ptr %59, i64 456
  call void @_ZN11alglib_impl11mlpeprocessEPNS_11mlpensembleEPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %60, ptr noundef nonnull %61, ptr noundef %11)
  %62 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef nonnull %18, ptr noundef %11)
  br i1 %62, label %63, label %79

63:                                               ; preds = %57
  br i1 %34, label %64, label %73

64:                                               ; preds = %63
  %65 = load ptr, ptr %36, align 8, !tbaa !9
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.1
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %67, i64 %19
  %69 = load double, ptr %68, align 8, !tbaa !12
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 576
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  store double %69, ptr %72, align 8, !tbaa !12
  br label %73

73:                                               ; preds = %64, %63
  br i1 %58, label %74, label %.loopexit

74:                                               ; preds = %73
  %75 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %2, i64 noundef %.1, i64 noundef %19, ptr noundef %11)
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 576
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  store double %75, ptr %78, align 8, !tbaa !12
  br label %.loopexit

79:                                               ; preds = %57
  br i1 %34, label %80, label %89

80:                                               ; preds = %79
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 576
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = load ptr, ptr %36, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i64 %.1
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 %19
  %88 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %38)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %83, i64 noundef 1, ptr noundef %87, i64 noundef 1, i64 noundef %88)
  br label %89

89:                                               ; preds = %80, %79
  %brmerge.not = and i1 %.not.not8283, %58
  br i1 %brmerge.not, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %89, %.lr.ph
  %.08184 = phi i64 [ %96, %.lr.ph ], [ 0, %89 ]
  %90 = add nsw i64 %.08184, %19
  %91 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %2, i64 noundef %.1, i64 noundef %90, ptr noundef %11)
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 576
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds double, ptr %94, i64 %.08184
  store double %91, ptr %95, align 8, !tbaa !12
  %96 = add nuw nsw i64 %.08184, 1
  %exitcond.not = icmp eq i64 %96, %20
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph, %89, %73, %74
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 656
  %99 = getelementptr inbounds i8, ptr %97, i64 456
  %100 = getelementptr inbounds i8, ptr %97, i64 520
  call void @_ZN11alglib_impl15dserraccumulateEPNS_9ae_vectorES1_S1_PNS_8ae_stateE(ptr noundef nonnull %98, ptr noundef nonnull %99, ptr noundef nonnull %100, ptr noundef %11)
  %101 = add i64 %.08086, 1
  %exitcond88.not = icmp eq i64 %101, %7
  br i1 %exitcond88.not, label %._crit_edge, label %39, !llvm.loop !16

._crit_edge:                                      ; preds = %.loopexit, %12
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 656
  call void @_ZN11alglib_impl11dserrfinishEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %103, ptr noundef %11)
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 712
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = load double, ptr %106, align 8, !tbaa !12
  store double %107, ptr %10, align 8, !tbaa !17
  %108 = load ptr, ptr %105, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %108, i64 8
  %110 = load double, ptr %109, align 8, !tbaa !12
  %111 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 2.000000e+00, ptr noundef %11)
  %112 = fdiv double %110, %111
  %113 = getelementptr inbounds i8, ptr %10, i64 8
  store double %112, ptr %113, align 8, !tbaa !19
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %114, i64 712
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = getelementptr inbounds i8, ptr %116, i64 16
  %118 = load double, ptr %117, align 8, !tbaa !12
  %119 = getelementptr inbounds i8, ptr %10, i64 16
  store double %118, ptr %119, align 8, !tbaa !20
  %120 = load ptr, ptr %115, align 8, !tbaa !9
  %121 = getelementptr inbounds i8, ptr %120, i64 24
  %122 = load double, ptr %121, align 8, !tbaa !12
  %123 = getelementptr inbounds i8, ptr %10, i64 24
  store double %122, ptr %123, align 8, !tbaa !21
  %124 = load ptr, ptr %115, align 8, !tbaa !9
  %125 = getelementptr inbounds i8, ptr %124, i64 32
  %126 = load double, ptr %125, align 8, !tbaa !12
  %127 = getelementptr inbounds i8, ptr %10, i64 32
  store double %126, ptr %127, align 8, !tbaa !22
  call void @_ZN11alglib_impl22ae_shared_pool_recycleEPNS_14ae_shared_poolEPNS_12ae_smart_ptrEPNS_8ae_stateE(ptr noundef %9, ptr noundef nonnull %15, ptr noundef %11)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %11)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  ret void
}

declare noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nounwind }

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

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


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