; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (dataanalysis)

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

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

@_ZN11alglib_implL15logit_logitvnumE = external hidden global i64, align 8

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9mnltrainhEPKNS_9ae_matrixElllPlPNS_10logitmodelEPNS_9mnlreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #2 {
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i8, align 1
  %23 = alloca i64, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca %"struct.alglib_impl::multilayerperceptron", align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca double, align 8
  %32 = alloca %"struct.alglib_impl::ae_vector", align 8
  %33 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %34 = alloca i8, align 1
  %35 = alloca %"struct.alglib_impl::ae_vector", align 8
  %36 = alloca %"struct.alglib_impl::ae_vector", align 8
  %37 = alloca %"struct.alglib_impl::ae_vector", align 8
  %38 = alloca double, align 8
  %39 = alloca %"struct.alglib_impl::ae_vector", align 8
  %40 = alloca %"struct.alglib_impl::ae_vector", align 8
  %41 = alloca i64, align 8
  %42 = alloca %"struct.alglib_impl::logitmcstate", align 8
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca %"struct.alglib_impl::densesolverreport", align 8
  %46 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store i64 %2, ptr %11, align 8, !tbaa !9
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 2080, 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 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %39) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %40) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr %42) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #6
  %47 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %47, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 2080, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %33, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %35, i8 0, i64 64, i1 false)
  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 %37, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %39, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %40, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %42, i8 0, i64 192, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %45, i8 0, i64 24, i1 false)
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %48, align 8, !tbaa !9
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_logitmodel_clearEPv(ptr noundef %49)
  %50 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_mnlreport_clearEPv(ptr noundef %50)
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_multilayerperceptron_initEPvPNS_8ae_stateEb(ptr noundef %27, ptr noundef %51, i1 noundef zeroext true)
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %32, i64 noundef 0, i64 noundef 3, ptr noundef %52, i1 noundef zeroext true)
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %33, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %53, i1 noundef zeroext true)
  %54 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %35, i64 noundef 0, i64 noundef 3, ptr noundef %54, i1 noundef zeroext true)
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %36, i64 noundef 0, i64 noundef 3, ptr noundef %55, i1 noundef zeroext true)
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %37, i64 noundef 0, i64 noundef 3, ptr noundef %56, i1 noundef zeroext true)
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %39, i64 noundef 0, i64 noundef 3, ptr noundef %57, i1 noundef zeroext true)
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %40, i64 noundef 0, i64 noundef 3, ptr noundef %58, i1 noundef zeroext true)
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_logitmcstate_initEPvPNS_8ae_stateEb(ptr noundef %42, ptr noundef %59, i1 noundef zeroext true)
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl23_densesolverreport_initEPvPNS_8ae_stateEb(ptr noundef %45, ptr noundef %60, i1 noundef zeroext true)
  store double 1.000000e-03, ptr %24, align 8, !tbaa !11
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = load i64, ptr %11, align 8, !tbaa !9
  %63 = add nsw i64 %62, 2
  %64 = icmp slt i64 %61, %63
  br i1 %64, label %71, label %65

65:                                               ; preds = %8
  %66 = load i64, ptr %11, align 8, !tbaa !9
  %67 = icmp slt i64 %66, 1
  br i1 %67, label %71, label %68

68:                                               ; preds = %65
  %69 = load i64, ptr %12, align 8, !tbaa !9
  %70 = icmp slt i64 %69, 2
  br i1 %70, label %71, label %74

71:                                               ; preds = %68, %65, %8
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -1, ptr %72, align 8, !tbaa !9
  %73 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %73)
  store i32 1, ptr %46, align 4
  br label %820

74:                                               ; preds = %68
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %111, %74
  %76 = load i64, ptr %18, align 8, !tbaa !9
  %77 = load i64, ptr %10, align 8, !tbaa !9
  %78 = sub nsw i64 %77, 1
  %79 = icmp sle i64 %76, %78
  br i1 %79, label %80, label %114

80:                                               ; preds = %75
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %81, i32 0, i32 6
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = load i64, ptr %18, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %83, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i64, ptr %11, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !11
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %89, ptr noundef %90)
  %92 = icmp slt i64 %91, 0
  br i1 %92, label %107, label %93

93:                                               ; preds = %80
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !13
  %97 = load i64, ptr %18, align 8, !tbaa !9
  %98 = getelementptr inbounds ptr, ptr %96, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = load i64, ptr %11, align 8, !tbaa !9
  %101 = getelementptr inbounds double, ptr %99, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !11
  %103 = load ptr, ptr %16, align 8, !tbaa !5
  %104 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %102, ptr noundef %103)
  %105 = load i64, ptr %12, align 8, !tbaa !9
  %106 = icmp sge i64 %104, %105
  br i1 %106, label %107, label %110

107:                                              ; preds = %93, %80
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -2, ptr %108, align 8, !tbaa !9
  %109 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %109)
  store i32 1, ptr %46, align 4
  br label %820

110:                                              ; preds = %93
  br label %111

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

114:                                              ; preds = %75
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 1, ptr %115, align 8, !tbaa !9
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %116, i32 0, i32 0
  store i64 0, ptr %117, align 8, !tbaa !16
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %118, i32 0, i32 1
  store i64 0, ptr %119, align 8, !tbaa !18
  store i64 5, ptr %23, align 8, !tbaa !9
  %120 = load i64, ptr %11, align 8, !tbaa !9
  %121 = add nsw i64 %120, 1
  %122 = load i64, ptr %12, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = mul nsw i64 %121, %123
  %125 = add nsw i64 5, %124
  %126 = load i64, ptr %12, align 8, !tbaa !9
  %127 = add nsw i64 %125, %126
  store i64 %127, ptr %21, align 8, !tbaa !9
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %128, i32 0, i32 0
  %130 = load i64, ptr %21, align 8, !tbaa !9
  %131 = sub nsw i64 %130, 1
  %132 = add nsw i64 %131, 1
  %133 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %129, i64 noundef %132, ptr noundef %133)
  %134 = load i64, ptr %21, align 8, !tbaa !9
  %135 = sitofp i64 %134 to double
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %137, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !13
  %140 = getelementptr inbounds double, ptr %139, i64 0
  store double %135, ptr %140, align 8, !tbaa !11
  %141 = load i64, ptr @_ZN11alglib_implL15logit_logitvnumE, align 8, !tbaa !9
  %142 = sitofp i64 %141 to double
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %144, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !13
  %147 = getelementptr inbounds double, ptr %146, i64 1
  store double %142, ptr %147, align 8, !tbaa !11
  %148 = load i64, ptr %11, align 8, !tbaa !9
  %149 = sitofp i64 %148 to double
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !13
  %154 = getelementptr inbounds double, ptr %153, i64 2
  store double %149, ptr %154, align 8, !tbaa !11
  %155 = load i64, ptr %12, align 8, !tbaa !9
  %156 = sitofp i64 %155 to double
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !13
  %161 = getelementptr inbounds double, ptr %160, i64 3
  store double %156, ptr %161, align 8, !tbaa !11
  %162 = load i64, ptr %23, align 8, !tbaa !9
  %163 = sitofp i64 %162 to double
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !13
  %168 = getelementptr inbounds double, ptr %167, i64 4
  store double %163, ptr %168, align 8, !tbaa !11
  store i8 1, ptr %22, align 1, !tbaa !19
  store i64 1, ptr %18, align 8, !tbaa !9
  br label %169

169:                                              ; preds = %201, %114
  %170 = load i64, ptr %18, align 8, !tbaa !9
  %171 = load i64, ptr %10, align 8, !tbaa !9
  %172 = sub nsw i64 %171, 1
  %173 = icmp sle i64 %170, %172
  br i1 %173, label %174, label %204

174:                                              ; preds = %169
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %175, i32 0, i32 6
  %177 = load ptr, ptr %176, align 8, !tbaa !13
  %178 = load i64, ptr %18, align 8, !tbaa !9
  %179 = getelementptr inbounds ptr, ptr %177, i64 %178
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = load i64, ptr %11, align 8, !tbaa !9
  %182 = getelementptr inbounds double, ptr %180, i64 %181
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = load ptr, ptr %16, align 8, !tbaa !5
  %185 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %183, ptr noundef %184)
  %186 = load ptr, ptr %9, 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 !13
  %189 = load i64, ptr %18, align 8, !tbaa !9
  %190 = sub nsw i64 %189, 1
  %191 = getelementptr inbounds ptr, ptr %188, i64 %190
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = load i64, ptr %11, align 8, !tbaa !9
  %194 = getelementptr inbounds double, ptr %192, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !11
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  %197 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %195, ptr noundef %196)
  %198 = icmp ne i64 %185, %197
  br i1 %198, label %199, label %200

199:                                              ; preds = %174
  store i8 0, ptr %22, align 1, !tbaa !19
  br label %200

200:                                              ; preds = %199, %174
  br label %201

201:                                              ; preds = %200
  %202 = load i64, ptr %18, align 8, !tbaa !9
  %203 = add nsw i64 %202, 1
  store i64 %203, ptr %18, align 8, !tbaa !9
  br label %169, !llvm.loop !21

204:                                              ; preds = %169
  %205 = load i8, ptr %22, align 1, !tbaa !19, !range !22, !noundef !23
  %206 = trunc i8 %205 to i1
  br i1 %206, label %207, label %319

207:                                              ; preds = %204
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %208

208:                                              ; preds = %226, %207
  %209 = load i64, ptr %18, align 8, !tbaa !9
  %210 = load i64, ptr %11, align 8, !tbaa !9
  %211 = add nsw i64 %210, 1
  %212 = load i64, ptr %12, align 8, !tbaa !9
  %213 = sub nsw i64 %212, 1
  %214 = mul nsw i64 %211, %213
  %215 = sub nsw i64 %214, 1
  %216 = icmp sle i64 %209, %215
  br i1 %216, label %217, label %229

217:                                              ; preds = %208
  %218 = load ptr, ptr %14, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %219, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !13
  %222 = load i64, ptr %23, align 8, !tbaa !9
  %223 = load i64, ptr %18, align 8, !tbaa !9
  %224 = add nsw i64 %222, %223
  %225 = getelementptr inbounds double, ptr %221, i64 %224
  store double 0.000000e+00, ptr %225, align 8, !tbaa !11
  br label %226

226:                                              ; preds = %217
  %227 = load i64, ptr %18, align 8, !tbaa !9
  %228 = add nsw i64 %227, 1
  store i64 %228, ptr %18, align 8, !tbaa !9
  br label %208, !llvm.loop !24

229:                                              ; preds = %208
  %230 = load ptr, ptr %16, align 8, !tbaa !5
  %231 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e-300, ptr noundef %230)
  %232 = fmul double -2.000000e+00, %231
  store double %232, ptr %25, align 8, !tbaa !11
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %233, i32 0, i32 6
  %235 = load ptr, ptr %234, align 8, !tbaa !13
  %236 = getelementptr inbounds ptr, ptr %235, i64 0
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = load i64, ptr %11, align 8, !tbaa !9
  %239 = getelementptr inbounds double, ptr %237, i64 %238
  %240 = load double, ptr %239, align 8, !tbaa !11
  %241 = load ptr, ptr %16, align 8, !tbaa !5
  %242 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %240, ptr noundef %241)
  store i64 %242, ptr %20, align 8, !tbaa !9
  %243 = load i64, ptr %20, align 8, !tbaa !9
  %244 = load i64, ptr %12, align 8, !tbaa !9
  %245 = sub nsw i64 %244, 1
  %246 = icmp eq i64 %243, %245
  br i1 %246, label %247, label %273

247:                                              ; preds = %229
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %248

248:                                              ; preds = %269, %247
  %249 = load i64, ptr %18, align 8, !tbaa !9
  %250 = load i64, ptr %12, align 8, !tbaa !9
  %251 = sub nsw i64 %250, 2
  %252 = icmp sle i64 %249, %251
  br i1 %252, label %253, label %272

253:                                              ; preds = %248
  %254 = load double, ptr %25, align 8, !tbaa !11
  %255 = fneg double %254
  %256 = load ptr, ptr %14, align 8, !tbaa !5
  %257 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %256, i32 0, i32 0
  %258 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %257, i32 0, i32 4
  %259 = load ptr, ptr %258, align 8, !tbaa !13
  %260 = load i64, ptr %23, align 8, !tbaa !9
  %261 = load i64, ptr %18, align 8, !tbaa !9
  %262 = load i64, ptr %11, align 8, !tbaa !9
  %263 = add nsw i64 %262, 1
  %264 = mul nsw i64 %261, %263
  %265 = add nsw i64 %260, %264
  %266 = load i64, ptr %11, align 8, !tbaa !9
  %267 = add nsw i64 %265, %266
  %268 = getelementptr inbounds double, ptr %259, i64 %267
  store double %255, ptr %268, align 8, !tbaa !11
  br label %269

269:                                              ; preds = %253
  %270 = load i64, ptr %18, align 8, !tbaa !9
  %271 = add nsw i64 %270, 1
  store i64 %271, ptr %18, align 8, !tbaa !9
  br label %248, !llvm.loop !25

272:                                              ; preds = %248
  br label %317

273:                                              ; preds = %229
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %274

274:                                              ; preds = %313, %273
  %275 = load i64, ptr %18, align 8, !tbaa !9
  %276 = load i64, ptr %12, align 8, !tbaa !9
  %277 = sub nsw i64 %276, 2
  %278 = icmp sle i64 %275, %277
  br i1 %278, label %279, label %316

279:                                              ; preds = %274
  %280 = load i64, ptr %18, align 8, !tbaa !9
  %281 = load i64, ptr %20, align 8, !tbaa !9
  %282 = icmp eq i64 %280, %281
  br i1 %282, label %283, label %298

283:                                              ; preds = %279
  %284 = load double, ptr %25, align 8, !tbaa !11
  %285 = load ptr, ptr %14, align 8, !tbaa !5
  %286 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %285, i32 0, i32 0
  %287 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %286, i32 0, i32 4
  %288 = load ptr, ptr %287, align 8, !tbaa !13
  %289 = load i64, ptr %23, align 8, !tbaa !9
  %290 = load i64, ptr %18, align 8, !tbaa !9
  %291 = load i64, ptr %11, align 8, !tbaa !9
  %292 = add nsw i64 %291, 1
  %293 = mul nsw i64 %290, %292
  %294 = add nsw i64 %289, %293
  %295 = load i64, ptr %11, align 8, !tbaa !9
  %296 = add nsw i64 %294, %295
  %297 = getelementptr inbounds double, ptr %288, i64 %296
  store double %284, ptr %297, align 8, !tbaa !11
  br label %312

298:                                              ; preds = %279
  %299 = load ptr, ptr %14, align 8, !tbaa !5
  %300 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %299, i32 0, i32 0
  %301 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %300, i32 0, i32 4
  %302 = load ptr, ptr %301, align 8, !tbaa !13
  %303 = load i64, ptr %23, align 8, !tbaa !9
  %304 = load i64, ptr %18, align 8, !tbaa !9
  %305 = load i64, ptr %11, align 8, !tbaa !9
  %306 = add nsw i64 %305, 1
  %307 = mul nsw i64 %304, %306
  %308 = add nsw i64 %303, %307
  %309 = load i64, ptr %11, align 8, !tbaa !9
  %310 = add nsw i64 %308, %309
  %311 = getelementptr inbounds double, ptr %302, i64 %310
  store double 0.000000e+00, ptr %311, align 8, !tbaa !11
  br label %312

312:                                              ; preds = %298, %283
  br label %313

313:                                              ; preds = %312
  %314 = load i64, ptr %18, align 8, !tbaa !9
  %315 = add nsw i64 %314, 1
  store i64 %315, ptr %18, align 8, !tbaa !9
  br label %274, !llvm.loop !26

316:                                              ; preds = %274
  br label %317

317:                                              ; preds = %316, %272
  %318 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %318)
  store i32 1, ptr %46, align 4
  br label %820

319:                                              ; preds = %204
  %320 = load i64, ptr %11, align 8, !tbaa !9
  %321 = load i64, ptr %12, align 8, !tbaa !9
  %322 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl11mlpcreatec0EllPNS_20multilayerperceptronEPNS_8ae_stateE(i64 noundef %320, i64 noundef %321, ptr noundef %27, ptr noundef %322)
  %323 = load ptr, ptr %9, align 8, !tbaa !5
  %324 = load i64, ptr %10, align 8, !tbaa !9
  %325 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl19mlpinitpreprocessorEPNS_20multilayerperceptronEPKNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %27, ptr noundef %323, i64 noundef %324, ptr noundef %325)
  %326 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlppropertiesEPKNS_20multilayerperceptronEPlS3_S3_PNS_8ae_stateE(ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %326)
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %327

327:                                              ; preds = %344, %319
  %328 = load i64, ptr %18, align 8, !tbaa !9
  %329 = load i64, ptr %30, align 8, !tbaa !9
  %330 = sub nsw i64 %329, 1
  %331 = icmp sle i64 %328, %330
  br i1 %331, label %332, label %347

332:                                              ; preds = %327
  %333 = load ptr, ptr %16, align 8, !tbaa !5
  %334 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %333)
  %335 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %334, double -1.000000e+00)
  %336 = load i64, ptr %11, align 8, !tbaa !9
  %337 = sitofp i64 %336 to double
  %338 = fdiv double %335, %337
  %339 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %340 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %339, i32 0, i32 4
  %341 = load ptr, ptr %340, align 8, !tbaa !13
  %342 = load i64, ptr %18, align 8, !tbaa !9
  %343 = getelementptr inbounds double, ptr %341, i64 %342
  store double %338, ptr %343, align 8, !tbaa !11
  br label %344

344:                                              ; preds = %332
  %345 = load i64, ptr %18, align 8, !tbaa !9
  %346 = add nsw i64 %345, 1
  store i64 %346, ptr %18, align 8, !tbaa !9
  br label %327, !llvm.loop !27

347:                                              ; preds = %327
  %348 = load i64, ptr %30, align 8, !tbaa !9
  %349 = sub nsw i64 %348, 1
  %350 = add nsw i64 %349, 1
  %351 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %32, i64 noundef %350, ptr noundef %351)
  %352 = load i64, ptr %30, align 8, !tbaa !9
  %353 = sub nsw i64 %352, 1
  %354 = add nsw i64 %353, 1
  %355 = load i64, ptr %30, align 8, !tbaa !9
  %356 = sub nsw i64 %355, 1
  %357 = add nsw i64 %356, 1
  %358 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %33, i64 noundef %354, i64 noundef %357, ptr noundef %358)
  %359 = load i64, ptr %30, align 8, !tbaa !9
  %360 = sub nsw i64 %359, 1
  %361 = add nsw i64 %360, 1
  %362 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %37, i64 noundef %361, ptr noundef %362)
  %363 = load i64, ptr %30, align 8, !tbaa !9
  %364 = sub nsw i64 %363, 1
  %365 = add nsw i64 %364, 1
  %366 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %39, i64 noundef %365, ptr noundef %366)
  %367 = load i64, ptr %30, align 8, !tbaa !9
  %368 = sub nsw i64 %367, 1
  %369 = add nsw i64 %368, 1
  %370 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %40, i64 noundef %369, ptr noundef %370)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %371

371:                                              ; preds = %496, %347
  %372 = load i64, ptr %20, align 8, !tbaa !9
  %373 = load i64, ptr %30, align 8, !tbaa !9
  %374 = sdiv i64 %373, 3
  %375 = add nsw i64 %374, 10
  %376 = icmp sle i64 %372, %375
  br i1 %376, label %377, label %499

377:                                              ; preds = %371
  %378 = load ptr, ptr %9, align 8, !tbaa !5
  %379 = load i64, ptr %10, align 8, !tbaa !9
  %380 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %27, ptr noundef %378, i64 noundef %379, ptr noundef %31, ptr noundef %32, ptr noundef %380)
  %381 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %382 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %381, i32 0, i32 4
  %383 = load ptr, ptr %382, align 8, !tbaa !13
  %384 = getelementptr inbounds double, ptr %383, i64 0
  %385 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %386 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %385, i32 0, i32 4
  %387 = load ptr, ptr %386, align 8, !tbaa !13
  %388 = getelementptr inbounds double, ptr %387, i64 0
  %389 = load i64, ptr %30, align 8, !tbaa !9
  %390 = sub nsw i64 %389, 1
  %391 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %390)
  %392 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %384, i64 noundef 1, ptr noundef %388, i64 noundef 1, i64 noundef %391)
  store double %392, ptr %25, align 8, !tbaa !11
  %393 = load double, ptr %31, align 8, !tbaa !11
  %394 = load double, ptr %24, align 8, !tbaa !11
  %395 = fmul double 5.000000e-01, %394
  %396 = load double, ptr %25, align 8, !tbaa !11
  %397 = call double @llvm.fmuladd.f64(double %395, double %396, double %393)
  store double %397, ptr %31, align 8, !tbaa !11
  %398 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %399 = load ptr, ptr %398, align 8, !tbaa !13
  %400 = getelementptr inbounds double, ptr %399, i64 0
  %401 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %402 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %401, i32 0, i32 4
  %403 = load ptr, ptr %402, align 8, !tbaa !13
  %404 = getelementptr inbounds double, ptr %403, i64 0
  %405 = load i64, ptr %30, align 8, !tbaa !9
  %406 = sub nsw i64 %405, 1
  %407 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %406)
  %408 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %400, i64 noundef 1, ptr noundef %404, i64 noundef 1, i64 noundef %407, double noundef %408)
  %409 = load ptr, ptr %15, align 8, !tbaa !5
  %410 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %409, i32 0, i32 0
  %411 = load i64, ptr %410, align 8, !tbaa !16
  %412 = add nsw i64 %411, 1
  %413 = load ptr, ptr %15, align 8, !tbaa !5
  %414 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %413, i32 0, i32 0
  store i64 %412, ptr %414, align 8, !tbaa !16
  %415 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %416 = load ptr, ptr %415, align 8, !tbaa !13
  %417 = getelementptr inbounds double, ptr %416, i64 0
  %418 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %419 = load ptr, ptr %418, align 8, !tbaa !13
  %420 = getelementptr inbounds double, ptr %419, i64 0
  %421 = load i64, ptr %30, align 8, !tbaa !9
  %422 = sub nsw i64 %421, 1
  %423 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %422)
  call void @_ZN11alglib_impl12ae_v_movenegEPdlPKdll(ptr noundef %417, i64 noundef 1, ptr noundef %420, i64 noundef 1, i64 noundef %423)
  %424 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %425 = load ptr, ptr %424, align 8, !tbaa !13
  %426 = getelementptr inbounds double, ptr %425, i64 0
  %427 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %428 = load ptr, ptr %427, align 8, !tbaa !13
  %429 = getelementptr inbounds double, ptr %428, i64 0
  %430 = load i64, ptr %30, align 8, !tbaa !9
  %431 = sub nsw i64 %430, 1
  %432 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %431)
  %433 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %426, i64 noundef 1, ptr noundef %429, i64 noundef 1, i64 noundef %432)
  store double %433, ptr %25, align 8, !tbaa !11
  %434 = load double, ptr %25, align 8, !tbaa !11
  %435 = load ptr, ptr %16, align 8, !tbaa !5
  %436 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %434, ptr noundef %435)
  store double %436, ptr %38, align 8, !tbaa !11
  %437 = load double, ptr %25, align 8, !tbaa !11
  %438 = load ptr, ptr %16, align 8, !tbaa !5
  %439 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %437, ptr noundef %438)
  %440 = fdiv double 1.000000e+00, %439
  store double %440, ptr %25, align 8, !tbaa !11
  %441 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %442 = load ptr, ptr %441, align 8, !tbaa !13
  %443 = getelementptr inbounds double, ptr %442, i64 0
  %444 = load i64, ptr %30, align 8, !tbaa !9
  %445 = sub nsw i64 %444, 1
  %446 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %445)
  %447 = load double, ptr %25, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %443, i64 noundef 1, i64 noundef %446, double noundef %447)
  store i64 0, ptr %41, align 8, !tbaa !9
  %448 = load i64, ptr %30, align 8, !tbaa !9
  %449 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %450 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %448, ptr noundef %449, ptr noundef %31, ptr noundef %32, ptr noundef %39, ptr noundef %38, ptr noundef %43, ptr noundef %44, ptr noundef %40, ptr noundef %42, ptr noundef %41, ptr noundef %450)
  br label %451

451:                                              ; preds = %454, %377
  %452 = load i64, ptr %41, align 8, !tbaa !9
  %453 = icmp ne i64 %452, 0
  br i1 %453, label %454, label %495

454:                                              ; preds = %451
  %455 = load ptr, ptr %9, align 8, !tbaa !5
  %456 = load i64, ptr %10, align 8, !tbaa !9
  %457 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %27, ptr noundef %455, i64 noundef %456, ptr noundef %31, ptr noundef %32, ptr noundef %457)
  %458 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %459 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %458, i32 0, i32 4
  %460 = load ptr, ptr %459, align 8, !tbaa !13
  %461 = getelementptr inbounds double, ptr %460, i64 0
  %462 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %463 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %462, i32 0, i32 4
  %464 = load ptr, ptr %463, align 8, !tbaa !13
  %465 = getelementptr inbounds double, ptr %464, i64 0
  %466 = load i64, ptr %30, align 8, !tbaa !9
  %467 = sub nsw i64 %466, 1
  %468 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %467)
  %469 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %461, i64 noundef 1, ptr noundef %465, i64 noundef 1, i64 noundef %468)
  store double %469, ptr %25, align 8, !tbaa !11
  %470 = load double, ptr %31, align 8, !tbaa !11
  %471 = load double, ptr %24, align 8, !tbaa !11
  %472 = fmul double 5.000000e-01, %471
  %473 = load double, ptr %25, align 8, !tbaa !11
  %474 = call double @llvm.fmuladd.f64(double %472, double %473, double %470)
  store double %474, ptr %31, align 8, !tbaa !11
  %475 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %476 = load ptr, ptr %475, align 8, !tbaa !13
  %477 = getelementptr inbounds double, ptr %476, i64 0
  %478 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %479 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %478, i32 0, i32 4
  %480 = load ptr, ptr %479, align 8, !tbaa !13
  %481 = getelementptr inbounds double, ptr %480, i64 0
  %482 = load i64, ptr %30, align 8, !tbaa !9
  %483 = sub nsw i64 %482, 1
  %484 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %483)
  %485 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %477, i64 noundef 1, ptr noundef %481, i64 noundef 1, i64 noundef %484, double noundef %485)
  %486 = load ptr, ptr %15, align 8, !tbaa !5
  %487 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %486, i32 0, i32 0
  %488 = load i64, ptr %487, align 8, !tbaa !16
  %489 = add nsw i64 %488, 1
  %490 = load ptr, ptr %15, align 8, !tbaa !5
  %491 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %490, i32 0, i32 0
  store i64 %489, ptr %491, align 8, !tbaa !16
  %492 = load i64, ptr %30, align 8, !tbaa !9
  %493 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %494 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %492, ptr noundef %493, ptr noundef %31, ptr noundef %32, ptr noundef %39, ptr noundef %38, ptr noundef %43, ptr noundef %44, ptr noundef %40, ptr noundef %42, ptr noundef %41, ptr noundef %494)
  br label %451, !llvm.loop !28

495:                                              ; preds = %451
  br label %496

496:                                              ; preds = %495
  %497 = load i64, ptr %20, align 8, !tbaa !9
  %498 = add nsw i64 %497, 1
  store i64 %498, ptr %20, align 8, !tbaa !9
  br label %371, !llvm.loop !29

499:                                              ; preds = %371
  br label %500

500:                                              ; preds = %679, %499
  %501 = load ptr, ptr %9, align 8, !tbaa !5
  %502 = load i64, ptr %10, align 8, !tbaa !9
  %503 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl16mlphessiannbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPS2_PNS_8ae_stateE(ptr noundef %27, ptr noundef %501, i64 noundef %502, ptr noundef %31, ptr noundef %32, ptr noundef %33, ptr noundef %503)
  %504 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %505 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %504, i32 0, i32 4
  %506 = load ptr, ptr %505, align 8, !tbaa !13
  %507 = getelementptr inbounds double, ptr %506, i64 0
  %508 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %509 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %508, i32 0, i32 4
  %510 = load ptr, ptr %509, align 8, !tbaa !13
  %511 = getelementptr inbounds double, ptr %510, i64 0
  %512 = load i64, ptr %30, align 8, !tbaa !9
  %513 = sub nsw i64 %512, 1
  %514 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %513)
  %515 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %507, i64 noundef 1, ptr noundef %511, i64 noundef 1, i64 noundef %514)
  store double %515, ptr %25, align 8, !tbaa !11
  %516 = load double, ptr %31, align 8, !tbaa !11
  %517 = load double, ptr %24, align 8, !tbaa !11
  %518 = fmul double 5.000000e-01, %517
  %519 = load double, ptr %25, align 8, !tbaa !11
  %520 = call double @llvm.fmuladd.f64(double %518, double %519, double %516)
  store double %520, ptr %31, align 8, !tbaa !11
  %521 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %522 = load ptr, ptr %521, align 8, !tbaa !13
  %523 = getelementptr inbounds double, ptr %522, i64 0
  %524 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %525 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %524, i32 0, i32 4
  %526 = load ptr, ptr %525, align 8, !tbaa !13
  %527 = getelementptr inbounds double, ptr %526, i64 0
  %528 = load i64, ptr %30, align 8, !tbaa !9
  %529 = sub nsw i64 %528, 1
  %530 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %529)
  %531 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %523, i64 noundef 1, ptr noundef %527, i64 noundef 1, i64 noundef %530, double noundef %531)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %532

532:                                              ; preds = %555, %500
  %533 = load i64, ptr %20, align 8, !tbaa !9
  %534 = load i64, ptr %30, align 8, !tbaa !9
  %535 = sub nsw i64 %534, 1
  %536 = icmp sle i64 %533, %535
  br i1 %536, label %537, label %558

537:                                              ; preds = %532
  %538 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %33, i32 0, i32 6
  %539 = load ptr, ptr %538, align 8, !tbaa !13
  %540 = load i64, ptr %20, align 8, !tbaa !9
  %541 = getelementptr inbounds ptr, ptr %539, i64 %540
  %542 = load ptr, ptr %541, align 8, !tbaa !5
  %543 = load i64, ptr %20, align 8, !tbaa !9
  %544 = getelementptr inbounds double, ptr %542, i64 %543
  %545 = load double, ptr %544, align 8, !tbaa !11
  %546 = load double, ptr %24, align 8, !tbaa !11
  %547 = fadd double %545, %546
  %548 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %33, i32 0, i32 6
  %549 = load ptr, ptr %548, align 8, !tbaa !13
  %550 = load i64, ptr %20, align 8, !tbaa !9
  %551 = getelementptr inbounds ptr, ptr %549, i64 %550
  %552 = load ptr, ptr %551, align 8, !tbaa !5
  %553 = load i64, ptr %20, align 8, !tbaa !9
  %554 = getelementptr inbounds double, ptr %552, i64 %553
  store double %547, ptr %554, align 8, !tbaa !11
  br label %555

555:                                              ; preds = %537
  %556 = load i64, ptr %20, align 8, !tbaa !9
  %557 = add nsw i64 %556, 1
  store i64 %557, ptr %20, align 8, !tbaa !9
  br label %532, !llvm.loop !30

558:                                              ; preds = %532
  %559 = load ptr, ptr %15, align 8, !tbaa !5
  %560 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %559, i32 0, i32 1
  %561 = load i64, ptr %560, align 8, !tbaa !18
  %562 = add nsw i64 %561, 1
  %563 = load ptr, ptr %15, align 8, !tbaa !5
  %564 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %563, i32 0, i32 1
  store i64 %562, ptr %564, align 8, !tbaa !18
  %565 = load i64, ptr %30, align 8, !tbaa !9
  %566 = load ptr, ptr %16, align 8, !tbaa !5
  %567 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %33, i64 noundef %565, i1 noundef zeroext false, ptr noundef %566)
  %568 = zext i1 %567 to i8
  store i8 %568, ptr %34, align 1, !tbaa !19
  %569 = load i64, ptr %30, align 8, !tbaa !9
  %570 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl22spdmatrixcholeskysolveEPKNS_9ae_matrixElbPKNS_9ae_vectorEPS3_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef %33, i64 noundef %569, i1 noundef zeroext false, ptr noundef %32, ptr noundef %39, ptr noundef %45, ptr noundef %570)
  %571 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %45, i32 0, i32 0
  %572 = load i64, ptr %571, align 8, !tbaa !31
  %573 = icmp sgt i64 %572, 0
  %574 = zext i1 %573 to i8
  store i8 %574, ptr %34, align 1, !tbaa !19
  %575 = load i8, ptr %34, align 1, !tbaa !19, !range !22, !noundef !23
  %576 = trunc i8 %575 to i1
  br i1 %576, label %577, label %584

577:                                              ; preds = %558
  %578 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %579 = load ptr, ptr %578, align 8, !tbaa !13
  %580 = getelementptr inbounds double, ptr %579, i64 0
  %581 = load i64, ptr %30, align 8, !tbaa !9
  %582 = sub nsw i64 %581, 1
  %583 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %582)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %580, i64 noundef 1, i64 noundef %583, double noundef -1.000000e+00)
  store i8 1, ptr %34, align 1, !tbaa !19
  br label %594

584:                                              ; preds = %558
  %585 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %586 = load ptr, ptr %585, align 8, !tbaa !13
  %587 = getelementptr inbounds double, ptr %586, i64 0
  %588 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %589 = load ptr, ptr %588, align 8, !tbaa !13
  %590 = getelementptr inbounds double, ptr %589, i64 0
  %591 = load i64, ptr %30, align 8, !tbaa !9
  %592 = sub nsw i64 %591, 1
  %593 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %592)
  call void @_ZN11alglib_impl12ae_v_movenegEPdlPKdll(ptr noundef %587, i64 noundef 1, ptr noundef %590, i64 noundef 1, i64 noundef %593)
  store i8 0, ptr %34, align 1, !tbaa !19
  br label %594

594:                                              ; preds = %584, %577
  %595 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %596 = load ptr, ptr %595, align 8, !tbaa !13
  %597 = getelementptr inbounds double, ptr %596, i64 0
  %598 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %599 = load ptr, ptr %598, align 8, !tbaa !13
  %600 = getelementptr inbounds double, ptr %599, i64 0
  %601 = load i64, ptr %30, align 8, !tbaa !9
  %602 = sub nsw i64 %601, 1
  %603 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %602)
  %604 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %597, i64 noundef 1, ptr noundef %600, i64 noundef 1, i64 noundef %603)
  store double %604, ptr %25, align 8, !tbaa !11
  %605 = load double, ptr %25, align 8, !tbaa !11
  %606 = load ptr, ptr %16, align 8, !tbaa !5
  %607 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %605, ptr noundef %606)
  store double %607, ptr %38, align 8, !tbaa !11
  %608 = load double, ptr %25, align 8, !tbaa !11
  %609 = load ptr, ptr %16, align 8, !tbaa !5
  %610 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %608, ptr noundef %609)
  %611 = fdiv double 1.000000e+00, %610
  store double %611, ptr %25, align 8, !tbaa !11
  %612 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 4
  %613 = load ptr, ptr %612, align 8, !tbaa !13
  %614 = getelementptr inbounds double, ptr %613, i64 0
  %615 = load i64, ptr %30, align 8, !tbaa !9
  %616 = sub nsw i64 %615, 1
  %617 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %616)
  %618 = load double, ptr %25, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %614, i64 noundef 1, i64 noundef %617, double noundef %618)
  store i64 0, ptr %41, align 8, !tbaa !9
  %619 = load i64, ptr %30, align 8, !tbaa !9
  %620 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %621 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %619, ptr noundef %620, ptr noundef %31, ptr noundef %32, ptr noundef %39, ptr noundef %38, ptr noundef %43, ptr noundef %44, ptr noundef %40, ptr noundef %42, ptr noundef %41, ptr noundef %621)
  br label %622

622:                                              ; preds = %625, %594
  %623 = load i64, ptr %41, align 8, !tbaa !9
  %624 = icmp ne i64 %623, 0
  br i1 %624, label %625, label %666

625:                                              ; preds = %622
  %626 = load ptr, ptr %9, align 8, !tbaa !5
  %627 = load i64, ptr %10, align 8, !tbaa !9
  %628 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %27, ptr noundef %626, i64 noundef %627, ptr noundef %31, ptr noundef %32, ptr noundef %628)
  %629 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %630 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %629, i32 0, i32 4
  %631 = load ptr, ptr %630, align 8, !tbaa !13
  %632 = getelementptr inbounds double, ptr %631, i64 0
  %633 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %634 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %633, i32 0, i32 4
  %635 = load ptr, ptr %634, align 8, !tbaa !13
  %636 = getelementptr inbounds double, ptr %635, i64 0
  %637 = load i64, ptr %30, align 8, !tbaa !9
  %638 = sub nsw i64 %637, 1
  %639 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %638)
  %640 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %632, i64 noundef 1, ptr noundef %636, i64 noundef 1, i64 noundef %639)
  store double %640, ptr %25, align 8, !tbaa !11
  %641 = load double, ptr %31, align 8, !tbaa !11
  %642 = load double, ptr %24, align 8, !tbaa !11
  %643 = fmul double 5.000000e-01, %642
  %644 = load double, ptr %25, align 8, !tbaa !11
  %645 = call double @llvm.fmuladd.f64(double %643, double %644, double %641)
  store double %645, ptr %31, align 8, !tbaa !11
  %646 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %647 = load ptr, ptr %646, align 8, !tbaa !13
  %648 = getelementptr inbounds double, ptr %647, i64 0
  %649 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %650 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %649, i32 0, i32 4
  %651 = load ptr, ptr %650, align 8, !tbaa !13
  %652 = getelementptr inbounds double, ptr %651, i64 0
  %653 = load i64, ptr %30, align 8, !tbaa !9
  %654 = sub nsw i64 %653, 1
  %655 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %654)
  %656 = load double, ptr %24, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %648, i64 noundef 1, ptr noundef %652, i64 noundef 1, i64 noundef %655, double noundef %656)
  %657 = load ptr, ptr %15, align 8, !tbaa !5
  %658 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %657, i32 0, i32 0
  %659 = load i64, ptr %658, align 8, !tbaa !16
  %660 = add nsw i64 %659, 1
  %661 = load ptr, ptr %15, align 8, !tbaa !5
  %662 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %661, i32 0, i32 0
  store i64 %660, ptr %662, align 8, !tbaa !16
  %663 = load i64, ptr %30, align 8, !tbaa !9
  %664 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %665 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %663, ptr noundef %664, ptr noundef %31, ptr noundef %32, ptr noundef %39, ptr noundef %38, ptr noundef %43, ptr noundef %44, ptr noundef %40, ptr noundef %42, ptr noundef %41, ptr noundef %665)
  br label %622, !llvm.loop !33

666:                                              ; preds = %622
  %667 = load i8, ptr %34, align 1, !tbaa !19, !range !22, !noundef !23
  %668 = trunc i8 %667 to i1
  br i1 %668, label %669, label %679

669:                                              ; preds = %666
  %670 = load i64, ptr %43, align 8, !tbaa !9
  %671 = icmp eq i64 %670, 2
  br i1 %671, label %678, label %672

672:                                              ; preds = %669
  %673 = load i64, ptr %43, align 8, !tbaa !9
  %674 = icmp eq i64 %673, 4
  br i1 %674, label %678, label %675

675:                                              ; preds = %672
  %676 = load i64, ptr %43, align 8, !tbaa !9
  %677 = icmp eq i64 %676, 6
  br i1 %677, label %678, label %679

678:                                              ; preds = %675, %672, %669
  br label %680

679:                                              ; preds = %675, %666
  br label %500, !llvm.loop !34

680:                                              ; preds = %678
  %681 = load ptr, ptr %14, align 8, !tbaa !5
  %682 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %681, i32 0, i32 0
  %683 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %682, i32 0, i32 4
  %684 = load ptr, ptr %683, align 8, !tbaa !13
  %685 = load i64, ptr %23, align 8, !tbaa !9
  %686 = getelementptr inbounds double, ptr %684, i64 %685
  %687 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 6
  %688 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %687, i32 0, i32 4
  %689 = load ptr, ptr %688, align 8, !tbaa !13
  %690 = getelementptr inbounds double, ptr %689, i64 0
  %691 = load i64, ptr %23, align 8, !tbaa !9
  %692 = load i64, ptr %23, align 8, !tbaa !9
  %693 = load i64, ptr %30, align 8, !tbaa !9
  %694 = add nsw i64 %692, %693
  %695 = sub nsw i64 %694, 1
  %696 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %691, i64 noundef %695)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %686, i64 noundef 1, ptr noundef %690, i64 noundef 1, i64 noundef %696)
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %697

697:                                              ; preds = %777, %680
  %698 = load i64, ptr %20, align 8, !tbaa !9
  %699 = load i64, ptr %11, align 8, !tbaa !9
  %700 = sub nsw i64 %699, 1
  %701 = icmp sle i64 %698, %700
  br i1 %701, label %702, label %780

702:                                              ; preds = %697
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %703

703:                                              ; preds = %773, %702
  %704 = load i64, ptr %18, align 8, !tbaa !9
  %705 = load i64, ptr %12, align 8, !tbaa !9
  %706 = sub nsw i64 %705, 2
  %707 = icmp sle i64 %704, %706
  br i1 %707, label %708, label %776

708:                                              ; preds = %703
  %709 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 8
  %710 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %709, i32 0, i32 4
  %711 = load ptr, ptr %710, align 8, !tbaa !13
  %712 = load i64, ptr %20, align 8, !tbaa !9
  %713 = getelementptr inbounds double, ptr %711, i64 %712
  %714 = load double, ptr %713, align 8, !tbaa !11
  store double %714, ptr %26, align 8, !tbaa !11
  %715 = load double, ptr %26, align 8, !tbaa !11
  %716 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %715, double noundef 0.000000e+00)
  br i1 %716, label %717, label %718

717:                                              ; preds = %708
  store double 1.000000e+00, ptr %26, align 8, !tbaa !11
  br label %718

718:                                              ; preds = %717, %708
  %719 = load i64, ptr %23, align 8, !tbaa !9
  %720 = load i64, ptr %11, align 8, !tbaa !9
  %721 = add nsw i64 %720, 1
  %722 = load i64, ptr %18, align 8, !tbaa !9
  %723 = mul nsw i64 %721, %722
  %724 = add nsw i64 %719, %723
  store i64 %724, ptr %19, align 8, !tbaa !9
  %725 = load ptr, ptr %14, align 8, !tbaa !5
  %726 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %725, i32 0, i32 0
  %727 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %726, i32 0, i32 4
  %728 = load ptr, ptr %727, align 8, !tbaa !13
  %729 = load i64, ptr %19, align 8, !tbaa !9
  %730 = load i64, ptr %20, align 8, !tbaa !9
  %731 = add nsw i64 %729, %730
  %732 = getelementptr inbounds double, ptr %728, i64 %731
  %733 = load double, ptr %732, align 8, !tbaa !11
  store double %733, ptr %25, align 8, !tbaa !11
  %734 = load double, ptr %25, align 8, !tbaa !11
  %735 = load double, ptr %26, align 8, !tbaa !11
  %736 = fdiv double %734, %735
  %737 = load ptr, ptr %14, align 8, !tbaa !5
  %738 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %737, i32 0, i32 0
  %739 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %738, i32 0, i32 4
  %740 = load ptr, ptr %739, align 8, !tbaa !13
  %741 = load i64, ptr %19, align 8, !tbaa !9
  %742 = load i64, ptr %20, align 8, !tbaa !9
  %743 = add nsw i64 %741, %742
  %744 = getelementptr inbounds double, ptr %740, i64 %743
  store double %736, ptr %744, align 8, !tbaa !11
  %745 = load ptr, ptr %14, align 8, !tbaa !5
  %746 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %745, i32 0, i32 0
  %747 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %746, i32 0, i32 4
  %748 = load ptr, ptr %747, align 8, !tbaa !13
  %749 = load i64, ptr %19, align 8, !tbaa !9
  %750 = load i64, ptr %11, align 8, !tbaa !9
  %751 = add nsw i64 %749, %750
  %752 = getelementptr inbounds double, ptr %748, i64 %751
  %753 = load double, ptr %752, align 8, !tbaa !11
  %754 = load double, ptr %25, align 8, !tbaa !11
  %755 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %27, i32 0, i32 7
  %756 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %755, i32 0, i32 4
  %757 = load ptr, ptr %756, align 8, !tbaa !13
  %758 = load i64, ptr %20, align 8, !tbaa !9
  %759 = getelementptr inbounds double, ptr %757, i64 %758
  %760 = load double, ptr %759, align 8, !tbaa !11
  %761 = fmul double %754, %760
  %762 = load double, ptr %26, align 8, !tbaa !11
  %763 = fdiv double %761, %762
  %764 = fadd double %753, %763
  %765 = load ptr, ptr %14, align 8, !tbaa !5
  %766 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %765, i32 0, i32 0
  %767 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %766, i32 0, i32 4
  %768 = load ptr, ptr %767, align 8, !tbaa !13
  %769 = load i64, ptr %19, align 8, !tbaa !9
  %770 = load i64, ptr %11, align 8, !tbaa !9
  %771 = add nsw i64 %769, %770
  %772 = getelementptr inbounds double, ptr %768, i64 %771
  store double %764, ptr %772, align 8, !tbaa !11
  br label %773

773:                                              ; preds = %718
  %774 = load i64, ptr %18, align 8, !tbaa !9
  %775 = add nsw i64 %774, 1
  store i64 %775, ptr %18, align 8, !tbaa !9
  br label %703, !llvm.loop !35

776:                                              ; preds = %703
  br label %777

777:                                              ; preds = %776
  %778 = load i64, ptr %20, align 8, !tbaa !9
  %779 = add nsw i64 %778, 1
  store i64 %779, ptr %20, align 8, !tbaa !9
  br label %697, !llvm.loop !36

780:                                              ; preds = %697
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %781

781:                                              ; preds = %815, %780
  %782 = load i64, ptr %20, align 8, !tbaa !9
  %783 = load i64, ptr %12, align 8, !tbaa !9
  %784 = sub nsw i64 %783, 2
  %785 = icmp sle i64 %782, %784
  br i1 %785, label %786, label %818

786:                                              ; preds = %781
  %787 = load ptr, ptr %14, align 8, !tbaa !5
  %788 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %787, i32 0, i32 0
  %789 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %788, i32 0, i32 4
  %790 = load ptr, ptr %789, align 8, !tbaa !13
  %791 = load i64, ptr %23, align 8, !tbaa !9
  %792 = load i64, ptr %11, align 8, !tbaa !9
  %793 = add nsw i64 %792, 1
  %794 = load i64, ptr %20, align 8, !tbaa !9
  %795 = mul nsw i64 %793, %794
  %796 = add nsw i64 %791, %795
  %797 = load i64, ptr %11, align 8, !tbaa !9
  %798 = add nsw i64 %796, %797
  %799 = getelementptr inbounds double, ptr %790, i64 %798
  %800 = load double, ptr %799, align 8, !tbaa !11
  %801 = fneg double %800
  %802 = load ptr, ptr %14, align 8, !tbaa !5
  %803 = getelementptr inbounds %"struct.alglib_impl::logitmodel", ptr %802, i32 0, i32 0
  %804 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %803, i32 0, i32 4
  %805 = load ptr, ptr %804, align 8, !tbaa !13
  %806 = load i64, ptr %23, align 8, !tbaa !9
  %807 = load i64, ptr %11, align 8, !tbaa !9
  %808 = add nsw i64 %807, 1
  %809 = load i64, ptr %20, align 8, !tbaa !9
  %810 = mul nsw i64 %808, %809
  %811 = add nsw i64 %806, %810
  %812 = load i64, ptr %11, align 8, !tbaa !9
  %813 = add nsw i64 %811, %812
  %814 = getelementptr inbounds double, ptr %805, i64 %813
  store double %801, ptr %814, align 8, !tbaa !11
  br label %815

815:                                              ; preds = %786
  %816 = load i64, ptr %20, align 8, !tbaa !9
  %817 = add nsw i64 %816, 1
  store i64 %817, ptr %20, align 8, !tbaa !9
  br label %781, !llvm.loop !37

818:                                              ; preds = %781
  %819 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %819)
  store i32 0, ptr %46, align 4
  br label %820

820:                                              ; preds = %818, %317, %107, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, 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 2080, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  %821 = load i32, ptr %46, align 4
  switch i32 %821, label %823 [
    i32 0, label %822
    i32 1, label %822
  ]

822:                                              ; preds = %820, %820
  ret void

823:                                              ; preds = %820
  unreachable
}

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #4

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

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

declare void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) #4

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #4

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #4

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) #4

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

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

declare noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef) #4

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) #4

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

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

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

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

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

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

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

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

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


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

@_ZN11alglib_implL15logit_logitvnumE = external hidden local_unnamed_addr global i64, align 8

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl9mnltrainhEPKNS_9ae_matrixElllPlPNS_10logitmodelEPNS_9mnlreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr nocapture noundef writeonly %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #2 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::multilayerperceptron", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca double, align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca i64, align 8
  %24 = alloca %"struct.alglib_impl::logitmcstate", align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca %"struct.alglib_impl::densesolverreport", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 2080, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #6
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(2080) %10, i8 0, i64 2080, i1 false)
  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(80) %16, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, i8 0, i64 64, i1 false)
  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 8 dereferenceable(64) %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(192) %24, i8 0, i64 192, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %27, i8 0, i64 24, i1 false)
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_logitmodel_clearEPv(ptr noundef %5)
  call void @_ZN11alglib_impl16_mnlreport_clearEPv(ptr noundef %6)
  call void @_ZN11alglib_impl26_multilayerperceptron_initEPvPNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %16, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %17, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %18, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %19, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %21, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %22, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl18_logitmcstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %24, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl23_densesolverreport_initEPvPNS_8ae_stateEb(ptr noundef nonnull %27, ptr noundef %7, i1 noundef zeroext true)
  %28 = add nsw i64 %2, 2
  %29 = icmp sgt i64 %28, %1
  %30 = icmp slt i64 %2, 1
  %or.cond = or i1 %30, %29
  %31 = icmp slt i64 %3, 2
  %or.cond3 = or i1 %31, %or.cond
  br i1 %or.cond3, label %.loopexit.sink.split, label %.preheader263

.preheader263:                                    ; preds = %8
  %.not.not266 = icmp sgt i64 %1, 0
  br i1 %.not.not266, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader263
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  br label %35

33:                                               ; preds = %43
  %34 = add nuw nsw i64 %.0232267, 1
  %exitcond.not = icmp eq i64 %34, %1
  br i1 %exitcond.not, label %._crit_edge, label %35, !llvm.loop !9

35:                                               ; preds = %.lr.ph, %33
  %.0232267 = phi i64 [ 0, %.lr.ph ], [ %34, %33 ]
  %36 = load ptr, ptr %32, align 8, !tbaa !11
  %37 = getelementptr inbounds ptr, ptr %36, i64 %.0232267
  %38 = load ptr, ptr %37, align 8, !tbaa !12
  %39 = getelementptr inbounds double, ptr %38, i64 %2
  %40 = load double, ptr %39, align 8, !tbaa !14
  %41 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %40, ptr noundef %7)
  %42 = icmp slt i64 %41, 0
  br i1 %42, label %.loopexit.sink.split, label %43

43:                                               ; preds = %35
  %44 = load ptr, ptr %32, align 8, !tbaa !11
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.0232267
  %46 = load ptr, ptr %45, align 8, !tbaa !12
  %47 = getelementptr inbounds double, ptr %46, i64 %2
  %48 = load double, ptr %47, align 8, !tbaa !14
  %49 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %48, ptr noundef %7)
  %.not256 = icmp slt i64 %49, %3
  br i1 %.not256, label %33, label %.loopexit.sink.split

._crit_edge:                                      ; preds = %33, %.preheader263
  store i64 1, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %6, i64 8
  %51 = add nuw nsw i64 %2, 1
  %52 = add nsw i64 %3, -1
  %53 = mul nsw i64 %52, %51
  %54 = add nuw nsw i64 %3, 5
  %55 = add nuw nsw i64 %54, %53
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %55, ptr noundef %7)
  %56 = uitofp nneg i64 %55 to double
  %57 = getelementptr inbounds i8, ptr %5, i64 56
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  store double %56, ptr %58, align 8, !tbaa !14
  %59 = load i64, ptr @_ZN11alglib_implL15logit_logitvnumE, align 8, !tbaa !5
  %60 = sitofp i64 %59 to double
  %61 = load ptr, ptr %57, align 8, !tbaa !11
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  store double %60, ptr %62, align 8, !tbaa !14
  %63 = uitofp nneg i64 %2 to double
  %64 = load ptr, ptr %57, align 8, !tbaa !11
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store double %63, ptr %65, align 8, !tbaa !14
  %66 = uitofp nneg i64 %3 to double
  %67 = load ptr, ptr %57, align 8, !tbaa !11
  %68 = getelementptr inbounds i8, ptr %67, i64 24
  store double %66, ptr %68, align 8, !tbaa !14
  %69 = load ptr, ptr %57, align 8, !tbaa !11
  %70 = getelementptr inbounds i8, ptr %69, i64 32
  store double 5.000000e+00, ptr %70, align 8, !tbaa !14
  %.not.not244268 = icmp sgt i64 %1, 1
  br i1 %.not.not244268, label %.lr.ph272, label %.preheader259

.lr.ph272:                                        ; preds = %._crit_edge
  %71 = getelementptr inbounds i8, ptr %0, i64 72
  br label %72

72:                                               ; preds = %.lr.ph272, %72
  %.1270 = phi i64 [ 1, %.lr.ph272 ], [ %86, %72 ]
  %.0237269 = phi i1 [ true, %.lr.ph272 ], [ %spec.select, %72 ]
  %73 = load ptr, ptr %71, align 8, !tbaa !11
  %74 = getelementptr inbounds ptr, ptr %73, i64 %.1270
  %75 = load ptr, ptr %74, align 8, !tbaa !12
  %76 = getelementptr inbounds double, ptr %75, i64 %2
  %77 = load double, ptr %76, align 8, !tbaa !14
  %78 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %77, ptr noundef %7)
  %79 = load ptr, ptr %71, align 8, !tbaa !11
  %80 = getelementptr ptr, ptr %79, i64 %.1270
  %81 = getelementptr i8, ptr %80, i64 -8
  %82 = load ptr, ptr %81, align 8, !tbaa !12
  %83 = getelementptr inbounds double, ptr %82, i64 %2
  %84 = load double, ptr %83, align 8, !tbaa !14
  %85 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %84, ptr noundef %7)
  %.not255 = icmp eq i64 %78, %85
  %spec.select = select i1 %.not255, i1 %.0237269, i1 false
  %86 = add nuw nsw i64 %.1270, 1
  %exitcond321.not = icmp eq i64 %86, %1
  br i1 %exitcond321.not, label %._crit_edge273, label %72, !llvm.loop !16

._crit_edge273:                                   ; preds = %72
  br i1 %spec.select, label %.preheader259, label %174

.preheader259:                                    ; preds = %._crit_edge, %._crit_edge273
  %.not252.not308 = icmp sgt i64 %53, 0
  br i1 %.not252.not308, label %.lr.ph310.preheader, label %._crit_edge311

.lr.ph310.preheader:                              ; preds = %.preheader259
  %xtraiter343 = and i64 %53, 7
  %87 = icmp ult i64 %53, 8
  br i1 %87, label %._crit_edge311.loopexit.unr-lcssa, label %.lr.ph310.preheader.new

.lr.ph310.preheader.new:                          ; preds = %.lr.ph310.preheader
  %unroll_iter345 = and i64 %53, 9223372036854775800
  br label %.lr.ph310

.lr.ph310:                                        ; preds = %.lr.ph310, %.lr.ph310.preheader.new
  %.2309 = phi i64 [ 0, %.lr.ph310.preheader.new ], [ %119, %.lr.ph310 ]
  %niter346 = phi i64 [ 0, %.lr.ph310.preheader.new ], [ %niter346.next.7, %.lr.ph310 ]
  %88 = load ptr, ptr %57, align 8, !tbaa !11
  %89 = getelementptr inbounds double, ptr %88, i64 %.2309
  %90 = getelementptr inbounds i8, ptr %89, i64 40
  store double 0.000000e+00, ptr %90, align 8, !tbaa !14
  %91 = or disjoint i64 %.2309, 1
  %92 = load ptr, ptr %57, align 8, !tbaa !11
  %93 = getelementptr inbounds double, ptr %92, i64 %91
  %94 = getelementptr inbounds i8, ptr %93, i64 40
  store double 0.000000e+00, ptr %94, align 8, !tbaa !14
  %95 = or disjoint i64 %.2309, 2
  %96 = load ptr, ptr %57, align 8, !tbaa !11
  %97 = getelementptr inbounds double, ptr %96, i64 %95
  %98 = getelementptr inbounds i8, ptr %97, i64 40
  store double 0.000000e+00, ptr %98, align 8, !tbaa !14
  %99 = or disjoint i64 %.2309, 3
  %100 = load ptr, ptr %57, align 8, !tbaa !11
  %101 = getelementptr inbounds double, ptr %100, i64 %99
  %102 = getelementptr inbounds i8, ptr %101, i64 40
  store double 0.000000e+00, ptr %102, align 8, !tbaa !14
  %103 = or disjoint i64 %.2309, 4
  %104 = load ptr, ptr %57, align 8, !tbaa !11
  %105 = getelementptr inbounds double, ptr %104, i64 %103
  %106 = getelementptr inbounds i8, ptr %105, i64 40
  store double 0.000000e+00, ptr %106, align 8, !tbaa !14
  %107 = or disjoint i64 %.2309, 5
  %108 = load ptr, ptr %57, align 8, !tbaa !11
  %109 = getelementptr inbounds double, ptr %108, i64 %107
  %110 = getelementptr inbounds i8, ptr %109, i64 40
  store double 0.000000e+00, ptr %110, align 8, !tbaa !14
  %111 = or disjoint i64 %.2309, 6
  %112 = load ptr, ptr %57, align 8, !tbaa !11
  %113 = getelementptr inbounds double, ptr %112, i64 %111
  %114 = getelementptr inbounds i8, ptr %113, i64 40
  store double 0.000000e+00, ptr %114, align 8, !tbaa !14
  %115 = or disjoint i64 %.2309, 7
  %116 = load ptr, ptr %57, align 8, !tbaa !11
  %117 = getelementptr inbounds double, ptr %116, i64 %115
  %118 = getelementptr inbounds i8, ptr %117, i64 40
  store double 0.000000e+00, ptr %118, align 8, !tbaa !14
  %119 = add nuw nsw i64 %.2309, 8
  %niter346.next.7 = add i64 %niter346, 8
  %niter346.ncmp.7 = icmp eq i64 %niter346.next.7, %unroll_iter345
  br i1 %niter346.ncmp.7, label %._crit_edge311.loopexit.unr-lcssa, label %.lr.ph310, !llvm.loop !17

._crit_edge311.loopexit.unr-lcssa:                ; preds = %.lr.ph310, %.lr.ph310.preheader
  %.2309.unr = phi i64 [ 0, %.lr.ph310.preheader ], [ %119, %.lr.ph310 ]
  %lcmp.mod344.not = icmp eq i64 %xtraiter343, 0
  br i1 %lcmp.mod344.not, label %._crit_edge311, label %.lr.ph310.epil

.lr.ph310.epil:                                   ; preds = %._crit_edge311.loopexit.unr-lcssa, %.lr.ph310.epil
  %.2309.epil = phi i64 [ %123, %.lr.ph310.epil ], [ %.2309.unr, %._crit_edge311.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph310.epil ], [ 0, %._crit_edge311.loopexit.unr-lcssa ]
  %120 = load ptr, ptr %57, align 8, !tbaa !11
  %121 = getelementptr inbounds double, ptr %120, i64 %.2309.epil
  %122 = getelementptr inbounds i8, ptr %121, i64 40
  store double 0.000000e+00, ptr %122, align 8, !tbaa !14
  %123 = add nuw nsw i64 %.2309.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter343
  br i1 %epil.iter.cmp.not, label %._crit_edge311, label %.lr.ph310.epil, !llvm.loop !18

._crit_edge311:                                   ; preds = %._crit_edge311.loopexit.unr-lcssa, %.lr.ph310.epil, %.preheader259
  %124 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e-300, ptr noundef %7)
  %125 = fmul double %124, -2.000000e+00
  %126 = getelementptr inbounds i8, ptr %0, i64 72
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = load ptr, ptr %127, align 8, !tbaa !12
  %129 = getelementptr inbounds double, ptr %128, i64 %2
  %130 = load double, ptr %129, align 8, !tbaa !14
  %131 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %130, ptr noundef %7)
  %132 = icmp eq i64 %131, %52
  br i1 %132, label %.lr.ph317, label %.lr.ph314.preheader

.lr.ph314.preheader:                              ; preds = %._crit_edge311
  %xtraiter347 = and i64 %52, 1
  %133 = icmp eq i64 %3, 2
  br i1 %133, label %.loopexit.loopexit337.unr-lcssa, label %.lr.ph314.preheader.new

.lr.ph314.preheader.new:                          ; preds = %.lr.ph314.preheader
  %unroll_iter350 = and i64 %52, -2
  br label %.lr.ph314

.lr.ph317:                                        ; preds = %._crit_edge311
  %134 = fneg double %125
  %135 = add nsw i64 %3, -2
  %xtraiter352 = and i64 %52, 3
  %136 = icmp ult i64 %135, 3
  br i1 %136, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph317.new

.lr.ph317.new:                                    ; preds = %.lr.ph317
  %unroll_iter355 = and i64 %52, -4
  br label %137

137:                                              ; preds = %137, %.lr.ph317.new
  %.3316 = phi i64 [ 0, %.lr.ph317.new ], [ %161, %137 ]
  %niter356 = phi i64 [ 0, %.lr.ph317.new ], [ %niter356.next.3, %137 ]
  %138 = load ptr, ptr %57, align 8, !tbaa !11
  %139 = mul nuw nsw i64 %.3316, %51
  %140 = getelementptr inbounds double, ptr %138, i64 %139
  %141 = getelementptr inbounds i8, ptr %140, i64 40
  %142 = getelementptr inbounds double, ptr %141, i64 %2
  store double %134, ptr %142, align 8, !tbaa !14
  %143 = or disjoint i64 %.3316, 1
  %144 = load ptr, ptr %57, align 8, !tbaa !11
  %145 = mul nuw nsw i64 %143, %51
  %146 = getelementptr inbounds double, ptr %144, i64 %145
  %147 = getelementptr inbounds i8, ptr %146, i64 40
  %148 = getelementptr inbounds double, ptr %147, i64 %2
  store double %134, ptr %148, align 8, !tbaa !14
  %149 = or disjoint i64 %.3316, 2
  %150 = load ptr, ptr %57, align 8, !tbaa !11
  %151 = mul nuw nsw i64 %149, %51
  %152 = getelementptr inbounds double, ptr %150, i64 %151
  %153 = getelementptr inbounds i8, ptr %152, i64 40
  %154 = getelementptr inbounds double, ptr %153, i64 %2
  store double %134, ptr %154, align 8, !tbaa !14
  %155 = or disjoint i64 %.3316, 3
  %156 = load ptr, ptr %57, align 8, !tbaa !11
  %157 = mul nuw nsw i64 %155, %51
  %158 = getelementptr inbounds double, ptr %156, i64 %157
  %159 = getelementptr inbounds i8, ptr %158, i64 40
  %160 = getelementptr inbounds double, ptr %159, i64 %2
  store double %134, ptr %160, align 8, !tbaa !14
  %161 = add nuw i64 %.3316, 4
  %niter356.next.3 = add i64 %niter356, 4
  %niter356.ncmp.3 = icmp eq i64 %niter356.next.3, %unroll_iter355
  br i1 %niter356.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %137, !llvm.loop !20

.lr.ph314:                                        ; preds = %.lr.ph314, %.lr.ph314.preheader.new
  %.4313 = phi i64 [ 0, %.lr.ph314.preheader.new ], [ %173, %.lr.ph314 ]
  %niter351 = phi i64 [ 0, %.lr.ph314.preheader.new ], [ %niter351.next.1, %.lr.ph314 ]
  %162 = icmp eq i64 %.4313, %131
  %163 = load ptr, ptr %57, align 8, !tbaa !11
  %.sink333 = mul nuw nsw i64 %.4313, %51
  %.sink = select i1 %162, double %125, double 0.000000e+00
  %164 = getelementptr inbounds double, ptr %163, i64 %.sink333
  %165 = getelementptr inbounds i8, ptr %164, i64 40
  %166 = getelementptr inbounds double, ptr %165, i64 %2
  store double %.sink, ptr %166, align 8, !tbaa !14
  %167 = or disjoint i64 %.4313, 1
  %168 = icmp eq i64 %167, %131
  %169 = load ptr, ptr %57, align 8, !tbaa !11
  %.sink333.1 = mul nuw nsw i64 %167, %51
  %.sink.1 = select i1 %168, double %125, double 0.000000e+00
  %170 = getelementptr inbounds double, ptr %169, i64 %.sink333.1
  %171 = getelementptr inbounds i8, ptr %170, i64 40
  %172 = getelementptr inbounds double, ptr %171, i64 %2
  store double %.sink.1, ptr %172, align 8, !tbaa !14
  %173 = add nuw i64 %.4313, 2
  %niter351.next.1 = add i64 %niter351, 2
  %niter351.ncmp.1 = icmp eq i64 %niter351.next.1, %unroll_iter350
  br i1 %niter351.ncmp.1, label %.loopexit.loopexit337.unr-lcssa, label %.lr.ph314, !llvm.loop !21

174:                                              ; preds = %._crit_edge273
  call void @_ZN11alglib_impl11mlpcreatec0EllPNS_20multilayerperceptronEPNS_8ae_stateE(i64 noundef %2, i64 noundef %3, ptr noundef nonnull %10, ptr noundef %7)
  call void @_ZN11alglib_impl19mlpinitpreprocessorEPNS_20multilayerperceptronEPKNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %0, i64 noundef %1, ptr noundef %7)
  call void @_ZN11alglib_impl13mlppropertiesEPKNS_20multilayerperceptronEPlS3_S3_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %7)
  %175 = load i64, ptr %13, align 8, !tbaa !5
  %.not.not245274 = icmp sgt i64 %175, 0
  br i1 %.not.not245274, label %.lr.ph277, label %._crit_edge278

.lr.ph277:                                        ; preds = %174
  %176 = getelementptr inbounds i8, ptr %10, i64 328
  br label %177

177:                                              ; preds = %.lr.ph277, %177
  %.5275 = phi i64 [ 0, %.lr.ph277 ], [ %183, %177 ]
  %178 = call noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef %7)
  %179 = call double @llvm.fmuladd.f64(double %178, double 2.000000e+00, double -1.000000e+00)
  %180 = fdiv double %179, %63
  %181 = load ptr, ptr %176, align 8, !tbaa !11
  %182 = getelementptr inbounds double, ptr %181, i64 %.5275
  store double %180, ptr %182, align 8, !tbaa !14
  %183 = add nuw nsw i64 %.5275, 1
  %184 = load i64, ptr %13, align 8, !tbaa !5
  %.not.not245 = icmp slt i64 %183, %184
  br i1 %.not.not245, label %177, label %._crit_edge278, !llvm.loop !22

._crit_edge278:                                   ; preds = %177, %174
  %.lcssa265 = phi i64 [ %175, %174 ], [ %184, %177 ]
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %.lcssa265, ptr noundef %7)
  %185 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %185, i64 noundef %185, ptr noundef %7)
  %186 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %19, i64 noundef %186, ptr noundef %7)
  %187 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %21, i64 noundef %187, ptr noundef %7)
  %188 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %22, i64 noundef %188, ptr noundef %7)
  %189 = load i64, ptr %13, align 8, !tbaa !5
  %.not284 = icmp slt i64 %189, -32
  br i1 %.not284, label %.preheader262, label %.lr.ph287

.lr.ph287:                                        ; preds = %._crit_edge278
  %190 = getelementptr inbounds i8, ptr %10, i64 272
  %191 = getelementptr inbounds i8, ptr %10, i64 328
  %192 = getelementptr inbounds i8, ptr %15, i64 56
  %193 = getelementptr inbounds i8, ptr %21, i64 56
  br label %199

.preheader262:                                    ; preds = %._crit_edge283, %._crit_edge278
  %194 = getelementptr inbounds i8, ptr %10, i64 272
  %195 = getelementptr inbounds i8, ptr %10, i64 328
  %196 = getelementptr inbounds i8, ptr %15, i64 56
  %197 = getelementptr inbounds i8, ptr %16, i64 72
  %198 = getelementptr inbounds i8, ptr %21, i64 56
  br label %253

199:                                              ; preds = %.lr.ph287, %._crit_edge283
  %.0233285 = phi i64 [ 0, %.lr.ph287 ], [ %249, %._crit_edge283 ]
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef %0, i64 noundef %1, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %7)
  %200 = load ptr, ptr %191, align 8, !tbaa !11
  %201 = load i64, ptr %13, align 8, !tbaa !5
  %202 = add nsw i64 %201, -1
  %203 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %202)
  %204 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %200, i64 noundef 1, ptr noundef %200, i64 noundef 1, i64 noundef %203)
  %205 = load double, ptr %14, align 8, !tbaa !14
  %206 = call double @llvm.fmuladd.f64(double %204, double 5.000000e-04, double %205)
  store double %206, ptr %14, align 8, !tbaa !14
  %207 = load ptr, ptr %192, align 8, !tbaa !11
  %208 = load ptr, ptr %191, align 8, !tbaa !11
  %209 = load i64, ptr %13, align 8, !tbaa !5
  %210 = add nsw i64 %209, -1
  %211 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %210)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %207, i64 noundef 1, ptr noundef %208, i64 noundef 1, i64 noundef %211, double noundef 1.000000e-03)
  %212 = load i64, ptr %6, align 8, !tbaa !23
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %6, align 8, !tbaa !23
  %214 = load ptr, ptr %193, align 8, !tbaa !11
  %215 = load ptr, ptr %192, align 8, !tbaa !11
  %216 = load i64, ptr %13, align 8, !tbaa !5
  %217 = add nsw i64 %216, -1
  %218 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %217)
  call void @_ZN11alglib_impl12ae_v_movenegEPdlPKdll(ptr noundef %214, i64 noundef 1, ptr noundef %215, i64 noundef 1, i64 noundef %218)
  %219 = load ptr, ptr %193, align 8, !tbaa !11
  %220 = load i64, ptr %13, align 8, !tbaa !5
  %221 = add nsw i64 %220, -1
  %222 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %221)
  %223 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %219, i64 noundef 1, ptr noundef %219, i64 noundef 1, i64 noundef %222)
  %224 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %223, ptr noundef %7)
  store double %224, ptr %20, align 8, !tbaa !14
  %225 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %223, ptr noundef %7)
  %226 = fdiv double 1.000000e+00, %225
  %227 = load ptr, ptr %193, align 8, !tbaa !11
  %228 = load i64, ptr %13, align 8, !tbaa !5
  %229 = add nsw i64 %228, -1
  %230 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %229)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %227, i64 noundef 1, i64 noundef %230, double noundef %226)
  store i64 0, ptr %23, align 8, !tbaa !5
  %231 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %231, ptr noundef nonnull %190, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %21, ptr noundef nonnull %20, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %22, ptr noundef nonnull %24, ptr noundef nonnull %23, ptr noundef %7)
  %232 = load i64, ptr %23, align 8, !tbaa !5
  %.not251280 = icmp eq i64 %232, 0
  br i1 %.not251280, label %._crit_edge283, label %.lr.ph282

.lr.ph282:                                        ; preds = %199, %.lr.ph282
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef %0, i64 noundef %1, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %7)
  %233 = load ptr, ptr %191, align 8, !tbaa !11
  %234 = load i64, ptr %13, align 8, !tbaa !5
  %235 = add nsw i64 %234, -1
  %236 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %235)
  %237 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %233, i64 noundef 1, ptr noundef %233, i64 noundef 1, i64 noundef %236)
  %238 = load double, ptr %14, align 8, !tbaa !14
  %239 = call double @llvm.fmuladd.f64(double %237, double 5.000000e-04, double %238)
  store double %239, ptr %14, align 8, !tbaa !14
  %240 = load ptr, ptr %192, align 8, !tbaa !11
  %241 = load ptr, ptr %191, align 8, !tbaa !11
  %242 = load i64, ptr %13, align 8, !tbaa !5
  %243 = add nsw i64 %242, -1
  %244 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %243)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %240, i64 noundef 1, ptr noundef %241, i64 noundef 1, i64 noundef %244, double noundef 1.000000e-03)
  %245 = load i64, ptr %6, align 8, !tbaa !23
  %246 = add nsw i64 %245, 1
  store i64 %246, ptr %6, align 8, !tbaa !23
  %247 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %247, ptr noundef nonnull %190, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %21, ptr noundef nonnull %20, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %22, ptr noundef nonnull %24, ptr noundef nonnull %23, ptr noundef %7)
  %248 = load i64, ptr %23, align 8, !tbaa !5
  %.not251 = icmp eq i64 %248, 0
  br i1 %.not251, label %._crit_edge283, label %.lr.ph282, !llvm.loop !25

._crit_edge283:                                   ; preds = %.lr.ph282, %199
  %249 = add nuw nsw i64 %.0233285, 1
  %250 = load i64, ptr %13, align 8, !tbaa !5
  %251 = sdiv i64 %250, 3
  %252 = add nsw i64 %251, 10
  %.not.not318 = icmp slt i64 %.0233285, %252
  br i1 %.not.not318, label %199, label %.preheader262, !llvm.loop !26

253:                                              ; preds = %.backedge, %.preheader262
  call void @_ZN11alglib_impl16mlphessiannbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPS2_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef %0, i64 noundef %1, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %7)
  %254 = load ptr, ptr %195, align 8, !tbaa !11
  %255 = load i64, ptr %13, align 8, !tbaa !5
  %256 = add nsw i64 %255, -1
  %257 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %256)
  %258 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %254, i64 noundef 1, ptr noundef %254, i64 noundef 1, i64 noundef %257)
  %259 = load double, ptr %14, align 8, !tbaa !14
  %260 = call double @llvm.fmuladd.f64(double %258, double 5.000000e-04, double %259)
  store double %260, ptr %14, align 8, !tbaa !14
  %261 = load ptr, ptr %196, align 8, !tbaa !11
  %262 = load ptr, ptr %195, align 8, !tbaa !11
  %263 = load i64, ptr %13, align 8, !tbaa !5
  %264 = add nsw i64 %263, -1
  %265 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %264)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %261, i64 noundef 1, ptr noundef %262, i64 noundef 1, i64 noundef %265, double noundef 1.000000e-03)
  %266 = load i64, ptr %13, align 8, !tbaa !5
  %.not246.not288 = icmp sgt i64 %266, 0
  br i1 %.not246.not288, label %.lr.ph291.preheader, label %._crit_edge292

.lr.ph291.preheader:                              ; preds = %253
  %xtraiter = and i64 %266, 1
  %267 = icmp eq i64 %266, 1
  br i1 %267, label %._crit_edge292.loopexit.unr-lcssa, label %.lr.ph291.preheader.new

.lr.ph291.preheader.new:                          ; preds = %.lr.ph291.preheader
  %unroll_iter = and i64 %266, 9223372036854775806
  br label %.lr.ph291

.lr.ph291:                                        ; preds = %.lr.ph291, %.lr.ph291.preheader.new
  %.1234289 = phi i64 [ 0, %.lr.ph291.preheader.new ], [ %281, %.lr.ph291 ]
  %niter = phi i64 [ 0, %.lr.ph291.preheader.new ], [ %niter.next.1, %.lr.ph291 ]
  %268 = load ptr, ptr %197, align 8, !tbaa !11
  %269 = getelementptr inbounds ptr, ptr %268, i64 %.1234289
  %270 = load ptr, ptr %269, align 8, !tbaa !12
  %271 = getelementptr inbounds double, ptr %270, i64 %.1234289
  %272 = load double, ptr %271, align 8, !tbaa !14
  %273 = fadd double %272, 1.000000e-03
  store double %273, ptr %271, align 8, !tbaa !14
  %274 = or disjoint i64 %.1234289, 1
  %275 = load ptr, ptr %197, align 8, !tbaa !11
  %276 = getelementptr inbounds ptr, ptr %275, i64 %274
  %277 = load ptr, ptr %276, align 8, !tbaa !12
  %278 = getelementptr inbounds double, ptr %277, i64 %274
  %279 = load double, ptr %278, align 8, !tbaa !14
  %280 = fadd double %279, 1.000000e-03
  store double %280, ptr %278, align 8, !tbaa !14
  %281 = add nuw nsw i64 %.1234289, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge292.loopexit.unr-lcssa, label %.lr.ph291, !llvm.loop !27

._crit_edge292.loopexit.unr-lcssa:                ; preds = %.lr.ph291, %.lr.ph291.preheader
  %.1234289.unr = phi i64 [ 0, %.lr.ph291.preheader ], [ %281, %.lr.ph291 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge292, label %.lr.ph291.epil

.lr.ph291.epil:                                   ; preds = %._crit_edge292.loopexit.unr-lcssa
  %282 = load ptr, ptr %197, align 8, !tbaa !11
  %283 = getelementptr inbounds ptr, ptr %282, i64 %.1234289.unr
  %284 = load ptr, ptr %283, align 8, !tbaa !12
  %285 = getelementptr inbounds double, ptr %284, i64 %.1234289.unr
  %286 = load double, ptr %285, align 8, !tbaa !14
  %287 = fadd double %286, 1.000000e-03
  store double %287, ptr %285, align 8, !tbaa !14
  br label %._crit_edge292

._crit_edge292:                                   ; preds = %.lr.ph291.epil, %._crit_edge292.loopexit.unr-lcssa, %253
  %288 = load i64, ptr %50, align 8, !tbaa !28
  %289 = add nsw i64 %288, 1
  store i64 %289, ptr %50, align 8, !tbaa !28
  %290 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %266, i1 noundef zeroext false, ptr noundef %7)
  %291 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl22spdmatrixcholeskysolveEPKNS_9ae_matrixElbPKNS_9ae_vectorEPS3_PNS_17densesolverreportEPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %291, i1 noundef zeroext false, ptr noundef nonnull %15, ptr noundef nonnull %21, ptr noundef nonnull %27, ptr noundef %7)
  %292 = load i64, ptr %27, align 8, !tbaa !29
  %293 = icmp sgt i64 %292, 0
  %294 = load ptr, ptr %198, align 8, !tbaa !11
  br i1 %293, label %295, label %299

295:                                              ; preds = %._crit_edge292
  %296 = load i64, ptr %13, align 8, !tbaa !5
  %297 = add nsw i64 %296, -1
  %298 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %297)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %294, i64 noundef 1, i64 noundef %298, double noundef -1.000000e+00)
  br label %304

299:                                              ; preds = %._crit_edge292
  %300 = load ptr, ptr %196, align 8, !tbaa !11
  %301 = load i64, ptr %13, align 8, !tbaa !5
  %302 = add nsw i64 %301, -1
  %303 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %302)
  call void @_ZN11alglib_impl12ae_v_movenegEPdlPKdll(ptr noundef %294, i64 noundef 1, ptr noundef %300, i64 noundef 1, i64 noundef %303)
  br label %304

304:                                              ; preds = %299, %295
  %305 = load ptr, ptr %198, align 8, !tbaa !11
  %306 = load i64, ptr %13, align 8, !tbaa !5
  %307 = add nsw i64 %306, -1
  %308 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %307)
  %309 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %305, i64 noundef 1, ptr noundef %305, i64 noundef 1, i64 noundef %308)
  %310 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %309, ptr noundef %7)
  store double %310, ptr %20, align 8, !tbaa !14
  %311 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %309, ptr noundef %7)
  %312 = fdiv double 1.000000e+00, %311
  %313 = load ptr, ptr %198, align 8, !tbaa !11
  %314 = load i64, ptr %13, align 8, !tbaa !5
  %315 = add nsw i64 %314, -1
  %316 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %315)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %313, i64 noundef 1, i64 noundef %316, double noundef %312)
  store i64 0, ptr %23, align 8, !tbaa !5
  %317 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %317, ptr noundef nonnull %194, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %21, ptr noundef nonnull %20, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %22, ptr noundef nonnull %24, ptr noundef nonnull %23, ptr noundef %7)
  %318 = load i64, ptr %23, align 8, !tbaa !5
  %.not247294 = icmp eq i64 %318, 0
  br i1 %.not247294, label %._crit_edge297, label %.lr.ph296

.lr.ph296:                                        ; preds = %304, %.lr.ph296
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPKNS_9ae_matrixElPdPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef %0, i64 noundef %1, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %7)
  %319 = load ptr, ptr %195, align 8, !tbaa !11
  %320 = load i64, ptr %13, align 8, !tbaa !5
  %321 = add nsw i64 %320, -1
  %322 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %321)
  %323 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %319, i64 noundef 1, ptr noundef %319, i64 noundef 1, i64 noundef %322)
  %324 = load double, ptr %14, align 8, !tbaa !14
  %325 = call double @llvm.fmuladd.f64(double %323, double 5.000000e-04, double %324)
  store double %325, ptr %14, align 8, !tbaa !14
  %326 = load ptr, ptr %196, align 8, !tbaa !11
  %327 = load ptr, ptr %195, align 8, !tbaa !11
  %328 = load i64, ptr %13, align 8, !tbaa !5
  %329 = add nsw i64 %328, -1
  %330 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %329)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %326, i64 noundef 1, ptr noundef %327, i64 noundef 1, i64 noundef %330, double noundef 1.000000e-03)
  %331 = load i64, ptr %6, align 8, !tbaa !23
  %332 = add nsw i64 %331, 1
  store i64 %332, ptr %6, align 8, !tbaa !23
  %333 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_PKS0_S2_PlS5_S1_PNS_12logitmcstateES5_PNS_8ae_stateE(i64 noundef %333, ptr noundef nonnull %194, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %21, ptr noundef nonnull %20, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %22, ptr noundef nonnull %24, ptr noundef nonnull %23, ptr noundef %7)
  %334 = load i64, ptr %23, align 8, !tbaa !5
  %.not247 = icmp eq i64 %334, 0
  br i1 %.not247, label %._crit_edge297, label %.lr.ph296, !llvm.loop !31

._crit_edge297:                                   ; preds = %.lr.ph296, %304
  br i1 %293, label %335, label %.backedge

335:                                              ; preds = %._crit_edge297
  %336 = load i64, ptr %25, align 8
  switch i64 %336, label %.backedge [
    i64 6, label %337
    i64 4, label %337
    i64 2, label %337
  ]

.backedge:                                        ; preds = %335, %._crit_edge297
  br label %253, !llvm.loop !32

337:                                              ; preds = %335, %335, %335
  %338 = load ptr, ptr %57, align 8, !tbaa !11
  %339 = getelementptr inbounds i8, ptr %338, i64 40
  %340 = load ptr, ptr %195, align 8, !tbaa !11
  %341 = load i64, ptr %13, align 8, !tbaa !5
  %342 = add nsw i64 %341, 4
  %343 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 5, i64 noundef %342)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %339, i64 noundef 1, ptr noundef %340, i64 noundef 1, i64 noundef %343)
  %.not248.not302 = icmp sgt i64 %2, 0
  br i1 %.not248.not302, label %.preheader261.preheader, label %.lr.ph306.preheader

.preheader261.preheader:                          ; preds = %337
  %344 = getelementptr inbounds i8, ptr %10, i64 456
  %345 = getelementptr inbounds i8, ptr %10, i64 392
  br label %.preheader261

.preheader261:                                    ; preds = %.preheader261.preheader, %._crit_edge301
  %.2235303 = phi i64 [ %369, %._crit_edge301 ], [ 0, %.preheader261.preheader ]
  br label %346

346:                                              ; preds = %.preheader261, %346
  %.6299 = phi i64 [ 0, %.preheader261 ], [ %368, %346 ]
  %347 = load ptr, ptr %344, align 8, !tbaa !11
  %348 = getelementptr inbounds double, ptr %347, i64 %.2235303
  %349 = load double, ptr %348, align 8, !tbaa !14
  %350 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %349, double noundef 0.000000e+00)
  %.0231 = select i1 %350, double 1.000000e+00, double %349
  %351 = mul nuw nsw i64 %.6299, %51
  %352 = add nuw nsw i64 %351, 5
  %353 = load ptr, ptr %57, align 8, !tbaa !11
  %354 = getelementptr inbounds double, ptr %353, i64 %352
  %355 = getelementptr inbounds double, ptr %354, i64 %.2235303
  %356 = load double, ptr %355, align 8, !tbaa !14
  %357 = fdiv double %356, %.0231
  store double %357, ptr %355, align 8, !tbaa !14
  %358 = load ptr, ptr %57, align 8, !tbaa !11
  %359 = getelementptr inbounds double, ptr %358, i64 %352
  %360 = getelementptr inbounds double, ptr %359, i64 %2
  %361 = load double, ptr %360, align 8, !tbaa !14
  %362 = load ptr, ptr %345, align 8, !tbaa !11
  %363 = getelementptr inbounds double, ptr %362, i64 %.2235303
  %364 = load double, ptr %363, align 8, !tbaa !14
  %365 = fmul double %356, %364
  %366 = fdiv double %365, %.0231
  %367 = fadd double %361, %366
  store double %367, ptr %360, align 8, !tbaa !14
  %368 = add nuw i64 %.6299, 1
  %exitcond323.not = icmp eq i64 %368, %52
  br i1 %exitcond323.not, label %._crit_edge301, label %346, !llvm.loop !33

._crit_edge301:                                   ; preds = %346
  %369 = add nuw nsw i64 %.2235303, 1
  %exitcond324.not = icmp eq i64 %369, %2
  br i1 %exitcond324.not, label %.lr.ph306.preheader, label %.preheader261, !llvm.loop !34

.lr.ph306.preheader:                              ; preds = %._crit_edge301, %337
  %xtraiter339 = and i64 %52, 1
  %370 = icmp eq i64 %3, 2
  br i1 %370, label %.loopexit.loopexit338.unr-lcssa, label %.lr.ph306.preheader.new

.lr.ph306.preheader.new:                          ; preds = %.lr.ph306.preheader
  %unroll_iter341 = and i64 %52, -2
  br label %.lr.ph306

.lr.ph306:                                        ; preds = %.lr.ph306, %.lr.ph306.preheader.new
  %.3236305 = phi i64 [ 0, %.lr.ph306.preheader.new ], [ %386, %.lr.ph306 ]
  %niter342 = phi i64 [ 0, %.lr.ph306.preheader.new ], [ %niter342.next.1, %.lr.ph306 ]
  %371 = load ptr, ptr %57, align 8, !tbaa !11
  %372 = mul nuw nsw i64 %.3236305, %51
  %373 = getelementptr inbounds double, ptr %371, i64 %372
  %374 = getelementptr inbounds i8, ptr %373, i64 40
  %375 = getelementptr inbounds double, ptr %374, i64 %2
  %376 = load double, ptr %375, align 8, !tbaa !14
  %377 = fneg double %376
  store double %377, ptr %375, align 8, !tbaa !14
  %378 = or disjoint i64 %.3236305, 1
  %379 = load ptr, ptr %57, align 8, !tbaa !11
  %380 = mul nuw nsw i64 %378, %51
  %381 = getelementptr inbounds double, ptr %379, i64 %380
  %382 = getelementptr inbounds i8, ptr %381, i64 40
  %383 = getelementptr inbounds double, ptr %382, i64 %2
  %384 = load double, ptr %383, align 8, !tbaa !14
  %385 = fneg double %384
  store double %385, ptr %383, align 8, !tbaa !14
  %386 = add nuw i64 %.3236305, 2
  %niter342.next.1 = add i64 %niter342, 2
  %niter342.ncmp.1 = icmp eq i64 %niter342.next.1, %unroll_iter341
  br i1 %niter342.ncmp.1, label %.loopexit.loopexit338.unr-lcssa, label %.lr.ph306, !llvm.loop !35

.loopexit.sink.split:                             ; preds = %35, %43, %8
  %.sink334 = phi i64 [ -1, %8 ], [ -2, %43 ], [ -2, %35 ]
  store i64 %.sink334, ptr %4, align 8, !tbaa !5
  br label %.loopexit

.loopexit.loopexit.unr-lcssa:                     ; preds = %137, %.lr.ph317
  %.3316.unr = phi i64 [ 0, %.lr.ph317 ], [ %161, %137 ]
  %lcmp.mod354.not = icmp eq i64 %xtraiter352, 0
  br i1 %lcmp.mod354.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %.3316.epil = phi i64 [ %392, %.epil.preheader ], [ %.3316.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter353 = phi i64 [ %epil.iter353.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %387 = load ptr, ptr %57, align 8, !tbaa !11
  %388 = mul nuw nsw i64 %.3316.epil, %51
  %389 = getelementptr inbounds double, ptr %387, i64 %388
  %390 = getelementptr inbounds i8, ptr %389, i64 40
  %391 = getelementptr inbounds double, ptr %390, i64 %2
  store double %134, ptr %391, align 8, !tbaa !14
  %392 = add nuw i64 %.3316.epil, 1
  %epil.iter353.next = add i64 %epil.iter353, 1
  %epil.iter353.cmp.not = icmp eq i64 %epil.iter353.next, %xtraiter352
  br i1 %epil.iter353.cmp.not, label %.loopexit, label %.epil.preheader, !llvm.loop !36

.loopexit.loopexit337.unr-lcssa:                  ; preds = %.lr.ph314, %.lr.ph314.preheader
  %.4313.unr = phi i64 [ 0, %.lr.ph314.preheader ], [ %173, %.lr.ph314 ]
  %lcmp.mod349.not = icmp eq i64 %xtraiter347, 0
  br i1 %lcmp.mod349.not, label %.loopexit, label %.lr.ph314.epil

.lr.ph314.epil:                                   ; preds = %.loopexit.loopexit337.unr-lcssa
  %393 = icmp eq i64 %.4313.unr, %131
  %394 = load ptr, ptr %57, align 8, !tbaa !11
  %.sink333.epil = mul nuw nsw i64 %.4313.unr, %51
  %.sink.epil = select i1 %393, double %125, double 0.000000e+00
  %395 = getelementptr inbounds double, ptr %394, i64 %.sink333.epil
  %396 = getelementptr inbounds i8, ptr %395, i64 40
  %397 = getelementptr inbounds double, ptr %396, i64 %2
  store double %.sink.epil, ptr %397, align 8, !tbaa !14
  br label %.loopexit

.loopexit.loopexit338.unr-lcssa:                  ; preds = %.lr.ph306, %.lr.ph306.preheader
  %.3236305.unr = phi i64 [ 0, %.lr.ph306.preheader ], [ %386, %.lr.ph306 ]
  %lcmp.mod340.not = icmp eq i64 %xtraiter339, 0
  br i1 %lcmp.mod340.not, label %.loopexit, label %.lr.ph306.epil

.lr.ph306.epil:                                   ; preds = %.loopexit.loopexit338.unr-lcssa
  %398 = load ptr, ptr %57, align 8, !tbaa !11
  %399 = mul nuw nsw i64 %.3236305.unr, %51
  %400 = getelementptr inbounds double, ptr %398, i64 %399
  %401 = getelementptr inbounds i8, ptr %400, i64 40
  %402 = getelementptr inbounds double, ptr %401, i64 %2
  %403 = load double, ptr %402, align 8, !tbaa !14
  %404 = fneg double %403
  store double %404, ptr %402, align 8, !tbaa !14
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph306.epil, %.loopexit.loopexit338.unr-lcssa, %.lr.ph314.epil, %.loopexit.loopexit337.unr-lcssa, %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %.loopexit.sink.split
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2080, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  ret void
}

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #4

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #4

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #4

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

declare noundef double @_ZN11alglib_impl13ae_randomrealEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{!24, !6, i64 0}
!24 = !{!"_ZTSN11alglib_impl9mnlreportE", !6, i64 0, !6, i64 8}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = !{!24, !6, i64 8}
!29 = !{!30, !6, i64 0}
!30 = !{!"_ZTSN11alglib_impl17densesolverreportE", !6, i64 0, !15, i64 8, !15, i64 16}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !19}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass