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

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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::multilayerperceptron" = type { i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::modelerrors", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_shared_pool", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::modelerrors" = type { double, double, double, double, double }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::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 { 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_20multilayerperceptronEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPNS_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_20multilayerperceptronEPNS_9ae_matrixElPdPNS_9ae_vectorES3_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_impl9mnltrainhEPNS_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 i64, align 8
  %46 = alloca %"struct.alglib_impl::densesolverreport", align 8
  %47 = 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 2104, 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 8, ptr %45) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #6
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %48, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 2104, 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 %46, i8 0, i64 16, i1 false)
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %49, align 8, !tbaa !9
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_logitmodel_clearEPv(ptr noundef %50)
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_mnlreport_clearEPv(ptr noundef %51)
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_multilayerperceptron_initEPvPNS_8ae_stateEb(ptr noundef %27, ptr noundef %52, i1 noundef zeroext true)
  %53 = 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 %53, i1 noundef zeroext true)
  %54 = 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 %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 %35, 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 %36, 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 %37, 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 %39, 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_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %40, i64 noundef 0, i64 noundef 3, ptr noundef %59, i1 noundef zeroext true)
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_logitmcstate_initEPvPNS_8ae_stateEb(ptr noundef %42, ptr noundef %60, i1 noundef zeroext true)
  %61 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl23_densesolverreport_initEPvPNS_8ae_stateEb(ptr noundef %46, ptr noundef %61, i1 noundef zeroext true)
  store double 1.000000e-03, ptr %24, align 8, !tbaa !11
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = load i64, ptr %11, align 8, !tbaa !9
  %64 = add nsw i64 %63, 2
  %65 = icmp slt i64 %62, %64
  br i1 %65, label %72, label %66

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

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

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

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

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

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

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

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

111:                                              ; preds = %94
  br label %112

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

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

170:                                              ; preds = %202, %115
  %171 = load i64, ptr %18, align 8, !tbaa !9
  %172 = load i64, ptr %10, align 8, !tbaa !9
  %173 = sub nsw i64 %172, 1
  %174 = icmp sle i64 %171, %173
  br i1 %174, label %175, label %205

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

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

201:                                              ; preds = %200, %175
  br label %202

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

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

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

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

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

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

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

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

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

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

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

273:                                              ; preds = %249
  br label %318

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

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

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

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

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

313:                                              ; preds = %299, %284
  br label %314

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

317:                                              ; preds = %275
  br label %318

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

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

328:                                              ; preds = %345, %320
  %329 = load i64, ptr %18, align 8, !tbaa !9
  %330 = load i64, ptr %30, align 8, !tbaa !9
  %331 = sub nsw i64 %330, 1
  %332 = icmp sle i64 %329, %331
  br i1 %332, label %333, label %348

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

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

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

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

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

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

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

496:                                              ; preds = %452
  br label %497

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

500:                                              ; preds = %372
  br label %501

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

533:                                              ; preds = %556, %501
  %534 = load i64, ptr %20, align 8, !tbaa !9
  %535 = load i64, ptr %30, align 8, !tbaa !9
  %536 = sub nsw i64 %535, 1
  %537 = icmp sle i64 %534, %536
  br i1 %537, label %538, label %559

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

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

559:                                              ; preds = %533
  %560 = load ptr, ptr %15, align 8, !tbaa !5
  %561 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %560, i32 0, i32 1
  %562 = load i64, ptr %561, align 8, !tbaa !18
  %563 = add nsw i64 %562, 1
  %564 = load ptr, ptr %15, align 8, !tbaa !5
  %565 = getelementptr inbounds %"struct.alglib_impl::mnlreport", ptr %564, i32 0, i32 1
  store i64 %563, ptr %565, align 8, !tbaa !18
  %566 = load i64, ptr %30, align 8, !tbaa !9
  %567 = load ptr, ptr %16, align 8, !tbaa !5
  %568 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %33, i64 noundef %566, i1 noundef zeroext false, ptr noundef %567)
  %569 = zext i1 %568 to i8
  store i8 %569, ptr %34, align 1, !tbaa !19
  %570 = load i64, ptr %30, align 8, !tbaa !9
  %571 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl22spdmatrixcholeskysolveEPNS_9ae_matrixElbPNS_9ae_vectorEPlPNS_17densesolverreportES3_PNS_8ae_stateE(ptr noundef %33, i64 noundef %570, i1 noundef zeroext false, ptr noundef %32, ptr noundef %45, ptr noundef %46, ptr noundef %39, ptr noundef %571)
  %572 = load i64, ptr %45, align 8, !tbaa !9
  %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 = %559
  %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 = %559
  %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_S1_S2_PlS3_S1_PNS_12logitmcstateES3_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_20multilayerperceptronEPNS_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_S1_S2_PlS3_S1_PNS_12logitmcstateES3_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 !31

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 %501, !llvm.loop !32

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 !33

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 !34

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 !35

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 %47, align 4
  br label %820

820:                                              ; preds = %818, %318, %108, %72
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, 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 2104, 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 %47, 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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #4

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

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

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

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

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_S1_S2_PlS3_S1_PNS_12logitmcstateES3_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_impl22spdmatrixcholeskysolveEPNS_9ae_matrixElbPNS_9ae_vectorEPlPNS_17densesolverreportES3_PNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, 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 = distinct !{!31, !15}
!32 = distinct !{!32, !15}
!33 = distinct !{!33, !15}
!34 = distinct !{!34, !15}
!35 = distinct !{!35, !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, 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 { 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_20multilayerperceptronEPNS_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_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_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_20multilayerperceptronEPNS_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_20multilayerperceptronEPNS_9ae_matrixElPdPNS_9ae_vectorES3_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_impl9mnltrainhEPNS_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 i64, align 8
  %28 = 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 2104, 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 8, ptr nonnull %27) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #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(2104) %10, i8 0, i64 2104, 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(16) %28, i8 0, i64 16, 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 %28, ptr noundef %7, i1 noundef zeroext true)
  %29 = add nsw i64 %2, 2
  %30 = icmp sgt i64 %29, %1
  %31 = icmp slt i64 %2, 1
  %or.cond = or i1 %31, %30
  %32 = icmp slt i64 %3, 2
  %or.cond3 = or i1 %32, %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
  %33 = getelementptr inbounds i8, ptr %0, i64 72
  br label %36

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

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

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

._crit_edge:                                      ; preds = %34, %.preheader263
  store i64 1, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %6, i64 8
  %52 = add nuw nsw i64 %2, 1
  %53 = add nsw i64 %3, -1
  %54 = mul nsw i64 %53, %52
  %55 = add nuw nsw i64 %3, 5
  %56 = add nuw nsw i64 %55, %54
  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 %56, ptr noundef %7)
  %57 = uitofp nneg i64 %56 to double
  %58 = getelementptr inbounds i8, ptr %5, i64 56
  %59 = load ptr, ptr %58, align 8, !tbaa !11
  store double %57, ptr %59, align 8, !tbaa !14
  %60 = load i64, ptr @_ZN11alglib_implL15logit_logitvnumE, align 8, !tbaa !5
  %61 = sitofp i64 %60 to double
  %62 = load ptr, ptr %58, align 8, !tbaa !11
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  store double %61, ptr %63, align 8, !tbaa !14
  %64 = uitofp nneg i64 %2 to double
  %65 = load ptr, ptr %58, align 8, !tbaa !11
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  store double %64, ptr %66, align 8, !tbaa !14
  %67 = uitofp nneg i64 %3 to double
  %68 = load ptr, ptr %58, align 8, !tbaa !11
  %69 = getelementptr inbounds i8, ptr %68, i64 24
  store double %67, ptr %69, align 8, !tbaa !14
  %70 = load ptr, ptr %58, align 8, !tbaa !11
  %71 = getelementptr inbounds i8, ptr %70, i64 32
  store double 5.000000e+00, ptr %71, 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
  %72 = getelementptr inbounds i8, ptr %0, i64 72
  br label %73

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

._crit_edge273:                                   ; preds = %73
  br i1 %spec.select, label %.preheader259, label %175

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

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

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

.lr.ph310:                                        ; preds = %.lr.ph310, %.lr.ph310.preheader.new
  %.2309 = phi i64 [ 0, %.lr.ph310.preheader.new ], [ %120, %.lr.ph310 ]
  %niter346 = phi i64 [ 0, %.lr.ph310.preheader.new ], [ %niter346.next.7, %.lr.ph310 ]
  %89 = load ptr, ptr %58, align 8, !tbaa !11
  %90 = getelementptr inbounds double, ptr %89, i64 %.2309
  %91 = getelementptr inbounds i8, ptr %90, i64 40
  store double 0.000000e+00, ptr %91, align 8, !tbaa !14
  %92 = or disjoint i64 %.2309, 1
  %93 = load ptr, ptr %58, align 8, !tbaa !11
  %94 = getelementptr inbounds double, ptr %93, i64 %92
  %95 = getelementptr inbounds i8, ptr %94, i64 40
  store double 0.000000e+00, ptr %95, align 8, !tbaa !14
  %96 = or disjoint i64 %.2309, 2
  %97 = load ptr, ptr %58, align 8, !tbaa !11
  %98 = getelementptr inbounds double, ptr %97, i64 %96
  %99 = getelementptr inbounds i8, ptr %98, i64 40
  store double 0.000000e+00, ptr %99, align 8, !tbaa !14
  %100 = or disjoint i64 %.2309, 3
  %101 = load ptr, ptr %58, align 8, !tbaa !11
  %102 = getelementptr inbounds double, ptr %101, i64 %100
  %103 = getelementptr inbounds i8, ptr %102, i64 40
  store double 0.000000e+00, ptr %103, align 8, !tbaa !14
  %104 = or disjoint i64 %.2309, 4
  %105 = load ptr, ptr %58, align 8, !tbaa !11
  %106 = getelementptr inbounds double, ptr %105, i64 %104
  %107 = getelementptr inbounds i8, ptr %106, i64 40
  store double 0.000000e+00, ptr %107, align 8, !tbaa !14
  %108 = or disjoint i64 %.2309, 5
  %109 = load ptr, ptr %58, align 8, !tbaa !11
  %110 = getelementptr inbounds double, ptr %109, i64 %108
  %111 = getelementptr inbounds i8, ptr %110, i64 40
  store double 0.000000e+00, ptr %111, align 8, !tbaa !14
  %112 = or disjoint i64 %.2309, 6
  %113 = load ptr, ptr %58, align 8, !tbaa !11
  %114 = getelementptr inbounds double, ptr %113, i64 %112
  %115 = getelementptr inbounds i8, ptr %114, i64 40
  store double 0.000000e+00, ptr %115, align 8, !tbaa !14
  %116 = or disjoint i64 %.2309, 7
  %117 = load ptr, ptr %58, align 8, !tbaa !11
  %118 = getelementptr inbounds double, ptr %117, i64 %116
  %119 = getelementptr inbounds i8, ptr %118, i64 40
  store double 0.000000e+00, ptr %119, align 8, !tbaa !14
  %120 = 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 ], [ %120, %.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 [ %124, %.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 ]
  %121 = load ptr, ptr %58, align 8, !tbaa !11
  %122 = getelementptr inbounds double, ptr %121, i64 %.2309.epil
  %123 = getelementptr inbounds i8, ptr %122, i64 40
  store double 0.000000e+00, ptr %123, align 8, !tbaa !14
  %124 = 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
  %125 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e-300, ptr noundef %7)
  %126 = fmul double %125, -2.000000e+00
  %127 = getelementptr inbounds i8, ptr %0, i64 72
  %128 = load ptr, ptr %127, align 8, !tbaa !11
  %129 = load ptr, ptr %128, align 8, !tbaa !12
  %130 = getelementptr inbounds double, ptr %129, i64 %2
  %131 = load double, ptr %130, align 8, !tbaa !14
  %132 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %131, ptr noundef %7)
  %133 = icmp eq i64 %132, %53
  br i1 %133, label %.lr.ph317, label %.lr.ph314.preheader

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

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

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

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

138:                                              ; preds = %138, %.lr.ph317.new
  %.3316 = phi i64 [ 0, %.lr.ph317.new ], [ %162, %138 ]
  %niter356 = phi i64 [ 0, %.lr.ph317.new ], [ %niter356.next.3, %138 ]
  %139 = load ptr, ptr %58, align 8, !tbaa !11
  %140 = mul nuw nsw i64 %.3316, %52
  %141 = getelementptr inbounds double, ptr %139, i64 %140
  %142 = getelementptr inbounds i8, ptr %141, i64 40
  %143 = getelementptr inbounds double, ptr %142, i64 %2
  store double %135, ptr %143, align 8, !tbaa !14
  %144 = or disjoint i64 %.3316, 1
  %145 = load ptr, ptr %58, align 8, !tbaa !11
  %146 = mul nuw nsw i64 %144, %52
  %147 = getelementptr inbounds double, ptr %145, i64 %146
  %148 = getelementptr inbounds i8, ptr %147, i64 40
  %149 = getelementptr inbounds double, ptr %148, i64 %2
  store double %135, ptr %149, align 8, !tbaa !14
  %150 = or disjoint i64 %.3316, 2
  %151 = load ptr, ptr %58, align 8, !tbaa !11
  %152 = mul nuw nsw i64 %150, %52
  %153 = getelementptr inbounds double, ptr %151, i64 %152
  %154 = getelementptr inbounds i8, ptr %153, i64 40
  %155 = getelementptr inbounds double, ptr %154, i64 %2
  store double %135, ptr %155, align 8, !tbaa !14
  %156 = or disjoint i64 %.3316, 3
  %157 = load ptr, ptr %58, align 8, !tbaa !11
  %158 = mul nuw nsw i64 %156, %52
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  %160 = getelementptr inbounds i8, ptr %159, i64 40
  %161 = getelementptr inbounds double, ptr %160, i64 %2
  store double %135, ptr %161, align 8, !tbaa !14
  %162 = 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 %138, !llvm.loop !20

.lr.ph314:                                        ; preds = %.lr.ph314, %.lr.ph314.preheader.new
  %.4313 = phi i64 [ 0, %.lr.ph314.preheader.new ], [ %174, %.lr.ph314 ]
  %niter351 = phi i64 [ 0, %.lr.ph314.preheader.new ], [ %niter351.next.1, %.lr.ph314 ]
  %163 = icmp eq i64 %.4313, %132
  %164 = load ptr, ptr %58, align 8, !tbaa !11
  %.sink333 = mul nuw nsw i64 %.4313, %52
  %.sink = select i1 %163, double %126, double 0.000000e+00
  %165 = getelementptr inbounds double, ptr %164, i64 %.sink333
  %166 = getelementptr inbounds i8, ptr %165, i64 40
  %167 = getelementptr inbounds double, ptr %166, i64 %2
  store double %.sink, ptr %167, align 8, !tbaa !14
  %168 = or disjoint i64 %.4313, 1
  %169 = icmp eq i64 %168, %132
  %170 = load ptr, ptr %58, align 8, !tbaa !11
  %.sink333.1 = mul nuw nsw i64 %168, %52
  %.sink.1 = select i1 %169, double %126, double 0.000000e+00
  %171 = getelementptr inbounds double, ptr %170, i64 %.sink333.1
  %172 = getelementptr inbounds i8, ptr %171, i64 40
  %173 = getelementptr inbounds double, ptr %172, i64 %2
  store double %.sink.1, ptr %173, align 8, !tbaa !14
  %174 = 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

175:                                              ; 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_20multilayerperceptronEPNS_9ae_matrixElPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %0, i64 noundef %1, ptr noundef %7)
  call void @_ZN11alglib_impl13mlppropertiesEPNS_20multilayerperceptronEPlS2_S2_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %7)
  %176 = load i64, ptr %13, align 8, !tbaa !5
  %.not.not245274 = icmp sgt i64 %176, 0
  br i1 %.not.not245274, label %.lr.ph277, label %._crit_edge278

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

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

._crit_edge278:                                   ; preds = %178, %175
  %.lcssa265 = phi i64 [ %176, %175 ], [ %185, %178 ]
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %.lcssa265, ptr noundef %7)
  %186 = 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 %186, 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 %19, 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 %21, i64 noundef %188, ptr noundef %7)
  %189 = 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 %189, ptr noundef %7)
  %190 = load i64, ptr %13, align 8, !tbaa !5
  %.not284 = icmp slt i64 %190, -32
  br i1 %.not284, label %.preheader262, label %.lr.ph287

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

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

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

.lr.ph282:                                        ; preds = %200, %.lr.ph282
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPNS_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)
  %234 = load ptr, ptr %192, align 8, !tbaa !11
  %235 = load i64, ptr %13, align 8, !tbaa !5
  %236 = add nsw i64 %235, -1
  %237 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %236)
  %238 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %234, i64 noundef 1, ptr noundef %234, i64 noundef 1, i64 noundef %237)
  %239 = load double, ptr %14, align 8, !tbaa !14
  %240 = call double @llvm.fmuladd.f64(double %238, double 5.000000e-04, double %239)
  store double %240, ptr %14, align 8, !tbaa !14
  %241 = load ptr, ptr %193, align 8, !tbaa !11
  %242 = load ptr, ptr %192, align 8, !tbaa !11
  %243 = load i64, ptr %13, align 8, !tbaa !5
  %244 = add nsw i64 %243, -1
  %245 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %244)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %241, i64 noundef 1, ptr noundef %242, i64 noundef 1, i64 noundef %245, double noundef 1.000000e-03)
  %246 = load i64, ptr %6, align 8, !tbaa !23
  %247 = add nsw i64 %246, 1
  store i64 %247, ptr %6, align 8, !tbaa !23
  %248 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_S1_S2_PlS3_S1_PNS_12logitmcstateES3_PNS_8ae_stateE(i64 noundef %248, ptr noundef nonnull %191, 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)
  %249 = load i64, ptr %23, align 8, !tbaa !5
  %.not251 = icmp eq i64 %249, 0
  br i1 %.not251, label %._crit_edge283, label %.lr.ph282, !llvm.loop !25

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

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

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

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

.lr.ph291:                                        ; preds = %.lr.ph291, %.lr.ph291.preheader.new
  %.1234289 = phi i64 [ 0, %.lr.ph291.preheader.new ], [ %282, %.lr.ph291 ]
  %niter = phi i64 [ 0, %.lr.ph291.preheader.new ], [ %niter.next.1, %.lr.ph291 ]
  %269 = load ptr, ptr %198, align 8, !tbaa !11
  %270 = getelementptr inbounds ptr, ptr %269, i64 %.1234289
  %271 = load ptr, ptr %270, align 8, !tbaa !12
  %272 = getelementptr inbounds double, ptr %271, i64 %.1234289
  %273 = load double, ptr %272, align 8, !tbaa !14
  %274 = fadd double %273, 1.000000e-03
  store double %274, ptr %272, align 8, !tbaa !14
  %275 = or disjoint i64 %.1234289, 1
  %276 = load ptr, ptr %198, align 8, !tbaa !11
  %277 = getelementptr inbounds ptr, ptr %276, i64 %275
  %278 = load ptr, ptr %277, align 8, !tbaa !12
  %279 = getelementptr inbounds double, ptr %278, i64 %275
  %280 = load double, ptr %279, align 8, !tbaa !14
  %281 = fadd double %280, 1.000000e-03
  store double %281, ptr %279, align 8, !tbaa !14
  %282 = 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 ], [ %282, %.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
  %283 = load ptr, ptr %198, align 8, !tbaa !11
  %284 = getelementptr inbounds ptr, ptr %283, i64 %.1234289.unr
  %285 = load ptr, ptr %284, align 8, !tbaa !12
  %286 = getelementptr inbounds double, ptr %285, i64 %.1234289.unr
  %287 = load double, ptr %286, align 8, !tbaa !14
  %288 = fadd double %287, 1.000000e-03
  store double %288, ptr %286, align 8, !tbaa !14
  br label %._crit_edge292

._crit_edge292:                                   ; preds = %.lr.ph291.epil, %._crit_edge292.loopexit.unr-lcssa, %254
  %289 = load i64, ptr %51, align 8, !tbaa !28
  %290 = add nsw i64 %289, 1
  store i64 %290, ptr %51, align 8, !tbaa !28
  %291 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %267, i1 noundef zeroext false, ptr noundef %7)
  %292 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl22spdmatrixcholeskysolveEPNS_9ae_matrixElbPNS_9ae_vectorEPlPNS_17densesolverreportES3_PNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %292, i1 noundef zeroext false, ptr noundef nonnull %15, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef nonnull %21, ptr noundef %7)
  %293 = load i64, ptr %27, align 8, !tbaa !5
  %294 = icmp sgt i64 %293, 0
  %295 = load ptr, ptr %199, align 8, !tbaa !11
  br i1 %294, label %296, label %300

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

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

305:                                              ; preds = %300, %296
  %306 = load ptr, ptr %199, align 8, !tbaa !11
  %307 = load i64, ptr %13, align 8, !tbaa !5
  %308 = add nsw i64 %307, -1
  %309 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %308)
  %310 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %306, i64 noundef 1, ptr noundef %306, i64 noundef 1, i64 noundef %309)
  %311 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %310, ptr noundef %7)
  store double %311, ptr %20, align 8, !tbaa !14
  %312 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %310, ptr noundef %7)
  %313 = fdiv double 1.000000e+00, %312
  %314 = load ptr, ptr %199, align 8, !tbaa !11
  %315 = load i64, ptr %13, align 8, !tbaa !5
  %316 = add nsw i64 %315, -1
  %317 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %316)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %314, i64 noundef 1, i64 noundef %317, double noundef %313)
  store i64 0, ptr %23, align 8, !tbaa !5
  %318 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_S1_S2_PlS3_S1_PNS_12logitmcstateES3_PNS_8ae_stateE(i64 noundef %318, ptr noundef nonnull %195, 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)
  %319 = load i64, ptr %23, align 8, !tbaa !5
  %.not247294 = icmp eq i64 %319, 0
  br i1 %.not247294, label %._crit_edge297, label %.lr.ph296

.lr.ph296:                                        ; preds = %305, %.lr.ph296
  call void @_ZN11alglib_impl13mlpgradnbatchEPNS_20multilayerperceptronEPNS_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)
  %320 = load ptr, ptr %196, align 8, !tbaa !11
  %321 = load i64, ptr %13, align 8, !tbaa !5
  %322 = add nsw i64 %321, -1
  %323 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %322)
  %324 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %320, i64 noundef 1, ptr noundef %320, i64 noundef 1, i64 noundef %323)
  %325 = load double, ptr %14, align 8, !tbaa !14
  %326 = call double @llvm.fmuladd.f64(double %324, double 5.000000e-04, double %325)
  store double %326, ptr %14, align 8, !tbaa !14
  %327 = load ptr, ptr %197, align 8, !tbaa !11
  %328 = load ptr, ptr %196, align 8, !tbaa !11
  %329 = load i64, ptr %13, align 8, !tbaa !5
  %330 = add nsw i64 %329, -1
  %331 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %330)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %327, i64 noundef 1, ptr noundef %328, i64 noundef 1, i64 noundef %331, double noundef 1.000000e-03)
  %332 = load i64, ptr %6, align 8, !tbaa !23
  %333 = add nsw i64 %332, 1
  store i64 %333, ptr %6, align 8, !tbaa !23
  %334 = load i64, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_implL15logit_mnlmcsrchElPNS_9ae_vectorEPdS1_S1_S2_PlS3_S1_PNS_12logitmcstateES3_PNS_8ae_stateE(i64 noundef %334, ptr noundef nonnull %195, 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)
  %335 = load i64, ptr %23, align 8, !tbaa !5
  %.not247 = icmp eq i64 %335, 0
  br i1 %.not247, label %._crit_edge297, label %.lr.ph296, !llvm.loop !29

._crit_edge297:                                   ; preds = %.lr.ph296, %305
  br i1 %294, label %336, label %.backedge

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

.backedge:                                        ; preds = %336, %._crit_edge297
  br label %254, !llvm.loop !30

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

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

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

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

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

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

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

.lr.ph306:                                        ; preds = %.lr.ph306, %.lr.ph306.preheader.new
  %.3236305 = phi i64 [ 0, %.lr.ph306.preheader.new ], [ %387, %.lr.ph306 ]
  %niter342 = phi i64 [ 0, %.lr.ph306.preheader.new ], [ %niter342.next.1, %.lr.ph306 ]
  %372 = load ptr, ptr %58, align 8, !tbaa !11
  %373 = mul nuw nsw i64 %.3236305, %52
  %374 = getelementptr inbounds double, ptr %372, i64 %373
  %375 = getelementptr inbounds i8, ptr %374, i64 40
  %376 = getelementptr inbounds double, ptr %375, i64 %2
  %377 = load double, ptr %376, align 8, !tbaa !14
  %378 = fneg double %377
  store double %378, ptr %376, align 8, !tbaa !14
  %379 = or disjoint i64 %.3236305, 1
  %380 = load ptr, ptr %58, align 8, !tbaa !11
  %381 = mul nuw nsw i64 %379, %52
  %382 = getelementptr inbounds double, ptr %380, i64 %381
  %383 = getelementptr inbounds i8, ptr %382, i64 40
  %384 = getelementptr inbounds double, ptr %383, i64 %2
  %385 = load double, ptr %384, align 8, !tbaa !14
  %386 = fneg double %385
  store double %386, ptr %384, align 8, !tbaa !14
  %387 = 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 !33

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

.loopexit.loopexit.unr-lcssa:                     ; preds = %138, %.lr.ph317
  %.3316.unr = phi i64 [ 0, %.lr.ph317 ], [ %162, %138 ]
  %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 [ %393, %.epil.preheader ], [ %.3316.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter353 = phi i64 [ %epil.iter353.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %388 = load ptr, ptr %58, align 8, !tbaa !11
  %389 = mul nuw nsw i64 %.3316.epil, %52
  %390 = getelementptr inbounds double, ptr %388, i64 %389
  %391 = getelementptr inbounds i8, ptr %390, i64 40
  %392 = getelementptr inbounds double, ptr %391, i64 %2
  store double %135, ptr %392, align 8, !tbaa !14
  %393 = 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 !34

.loopexit.loopexit337.unr-lcssa:                  ; preds = %.lr.ph314, %.lr.ph314.preheader
  %.4313.unr = phi i64 [ 0, %.lr.ph314.preheader ], [ %174, %.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
  %394 = icmp eq i64 %.4313.unr, %132
  %395 = load ptr, ptr %58, align 8, !tbaa !11
  %.sink333.epil = mul nuw nsw i64 %.4313.unr, %52
  %.sink.epil = select i1 %394, double %126, double 0.000000e+00
  %396 = getelementptr inbounds double, ptr %395, i64 %.sink333.epil
  %397 = getelementptr inbounds i8, ptr %396, i64 40
  %398 = getelementptr inbounds double, ptr %397, i64 %2
  store double %.sink.epil, ptr %398, 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 ], [ %387, %.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
  %399 = load ptr, ptr %58, align 8, !tbaa !11
  %400 = mul nuw nsw i64 %.3236305.unr, %52
  %401 = getelementptr inbounds double, ptr %399, i64 %400
  %402 = getelementptr inbounds i8, ptr %401, i64 40
  %403 = getelementptr inbounds double, ptr %402, i64 %2
  %404 = load double, ptr %403, align 8, !tbaa !14
  %405 = fneg double %404
  store double %405, ptr %403, 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 16, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 8, 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 2104, 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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #4

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

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

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

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

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_S1_S2_PlS3_S1_PNS_12logitmcstateES3_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_impl22spdmatrixcholeskysolveEPNS_9ae_matrixElbPNS_9ae_vectorEPlPNS_17densesolverreportES3_PNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, 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 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !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