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

@_ZN11alglib_implL15mlpbase_mlpvnumE = 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: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15mlpserializeoldEPNS_20multilayerperceptronEPNS_9ae_vectorEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %16)
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 0, ptr %17, align 8, !tbaa !9
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %18, i32 0, i32 5
  %20 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds i64, ptr %21, i64 0
  %23 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %23, ptr %10, align 8, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %24, i32 0, i32 5
  %26 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 4
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds i64, ptr %27, i64 1
  %29 = load i64, ptr %28, align 8, !tbaa !9
  store i64 %29, ptr %11, align 8, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %30, i32 0, i32 5
  %32 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %31, i32 0, i32 4
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds i64, ptr %33, i64 2
  %35 = load i64, ptr %34, align 8, !tbaa !9
  store i64 %35, ptr %12, align 8, !tbaa !9
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %36, i32 0, i32 5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds i64, ptr %39, i64 4
  %41 = load i64, ptr %40, align 8, !tbaa !9
  store i64 %41, ptr %13, align 8, !tbaa !9
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %42, ptr noundef %43)
  br i1 %44, label %45, label %47

45:                                               ; preds = %4
  %46 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %46, ptr %14, align 8, !tbaa !9
  br label %51

47:                                               ; preds = %4
  %48 = load i64, ptr %11, align 8, !tbaa !9
  %49 = load i64, ptr %12, align 8, !tbaa !9
  %50 = add nsw i64 %48, %49
  store i64 %50, ptr %14, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %47, %45
  %52 = load i64, ptr %10, align 8, !tbaa !9
  %53 = add nsw i64 3, %52
  %54 = load i64, ptr %13, align 8, !tbaa !9
  %55 = add nsw i64 %53, %54
  %56 = load i64, ptr %14, align 8, !tbaa !9
  %57 = mul nsw i64 2, %56
  %58 = add nsw i64 %55, %57
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %58, ptr %59, align 8, !tbaa !9
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = sub nsw i64 %62, 1
  %64 = add nsw i64 %63, 1
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %60, i64 noundef %64, ptr noundef %65)
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = sitofp i64 %67 to double
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %69, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds double, ptr %71, i64 0
  store double %68, ptr %72, align 8, !tbaa !12
  %73 = load i64, ptr @_ZN11alglib_implL15mlpbase_mlpvnumE, align 8, !tbaa !9
  %74 = sitofp i64 %73 to double
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = getelementptr inbounds double, ptr %77, i64 1
  store double %74, ptr %78, align 8, !tbaa !12
  %79 = load i64, ptr %10, align 8, !tbaa !9
  %80 = sitofp i64 %79 to double
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = getelementptr inbounds double, ptr %83, i64 2
  store double %80, ptr %84, align 8, !tbaa !12
  store i64 3, ptr %15, align 8, !tbaa !9
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %106, %51
  %86 = load i64, ptr %9, align 8, !tbaa !9
  %87 = load i64, ptr %10, align 8, !tbaa !9
  %88 = sub nsw i64 %87, 1
  %89 = icmp sle i64 %86, %88
  br i1 %89, label %90, label %109

90:                                               ; preds = %85
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %91, i32 0, i32 5
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %92, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = load i64, ptr %9, align 8, !tbaa !9
  %96 = getelementptr inbounds i64, ptr %94, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = sitofp i64 %97 to double
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = load i64, ptr %15, align 8, !tbaa !9
  %103 = load i64, ptr %9, align 8, !tbaa !9
  %104 = add nsw i64 %102, %103
  %105 = getelementptr inbounds double, ptr %101, i64 %104
  store double %98, ptr %105, align 8, !tbaa !12
  br label %106

106:                                              ; preds = %90
  %107 = load i64, ptr %9, align 8, !tbaa !9
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %9, align 8, !tbaa !9
  br label %85, !llvm.loop !14

109:                                              ; preds = %85
  %110 = load i64, ptr %15, align 8, !tbaa !9
  %111 = load i64, ptr %10, align 8, !tbaa !9
  %112 = add nsw i64 %110, %111
  store i64 %112, ptr %15, align 8, !tbaa !9
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = load i64, ptr %15, align 8, !tbaa !9
  %117 = getelementptr inbounds double, ptr %115, i64 %116
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %118, i32 0, i32 6
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = getelementptr inbounds double, ptr %121, i64 0
  %123 = load i64, ptr %15, align 8, !tbaa !9
  %124 = load i64, ptr %15, align 8, !tbaa !9
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = add nsw i64 %124, %125
  %127 = sub nsw i64 %126, 1
  %128 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %123, i64 noundef %127)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %117, i64 noundef 1, ptr noundef %122, i64 noundef 1, i64 noundef %128)
  %129 = load i64, ptr %15, align 8, !tbaa !9
  %130 = load i64, ptr %13, align 8, !tbaa !9
  %131 = add nsw i64 %129, %130
  store i64 %131, ptr %15, align 8, !tbaa !9
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = load i64, ptr %15, align 8, !tbaa !9
  %136 = getelementptr inbounds double, ptr %134, i64 %135
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %137, i32 0, i32 7
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  %141 = getelementptr inbounds double, ptr %140, i64 0
  %142 = load i64, ptr %15, align 8, !tbaa !9
  %143 = load i64, ptr %15, align 8, !tbaa !9
  %144 = load i64, ptr %14, align 8, !tbaa !9
  %145 = add nsw i64 %143, %144
  %146 = sub nsw i64 %145, 1
  %147 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %142, i64 noundef %146)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %136, i64 noundef 1, ptr noundef %141, i64 noundef 1, i64 noundef %147)
  %148 = load i64, ptr %15, align 8, !tbaa !9
  %149 = load i64, ptr %14, align 8, !tbaa !9
  %150 = add nsw i64 %148, %149
  store i64 %150, ptr %15, align 8, !tbaa !9
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !11
  %154 = load i64, ptr %15, align 8, !tbaa !9
  %155 = getelementptr inbounds double, ptr %153, i64 %154
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::multilayerperceptron", ptr %156, i32 0, i32 8
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %157, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !11
  %160 = getelementptr inbounds double, ptr %159, i64 0
  %161 = load i64, ptr %15, align 8, !tbaa !9
  %162 = load i64, ptr %15, align 8, !tbaa !9
  %163 = load i64, ptr %14, align 8, !tbaa !9
  %164 = add nsw i64 %162, %163
  %165 = sub nsw i64 %164, 1
  %166 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %161, i64 noundef %165)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %155, i64 noundef 1, ptr noundef %160, i64 noundef 1, i64 noundef %166)
  %167 = load i64, ptr %15, align 8, !tbaa !9
  %168 = load i64, ptr %14, align 8, !tbaa !9
  %169 = add nsw i64 %167, %168
  store i64 %169, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

@_ZN11alglib_implL15mlpbase_mlpvnumE = external hidden local_unnamed_addr global i64, align 8

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15mlpserializeoldEPNS_20multilayerperceptronEPNS_9ae_vectorEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr nocapture noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  tail call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %1)
  store i64 0, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 264
  %6 = load ptr, ptr %5, align 8, !tbaa !9
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %6, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %6, i64 16
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %6, i64 32
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = tail call noundef zeroext i1 @_ZN11alglib_impl12mlpissoftmaxEPNS_20multilayerperceptronEPNS_8ae_stateE(ptr noundef %0, ptr noundef %3)
  %15 = select i1 %14, i64 0, i64 %11
  %.0 = add nsw i64 %15, %9
  %16 = add nsw i64 %7, 3
  %17 = add nsw i64 %13, %16
  %18 = shl nsw i64 %.0, 1
  %19 = add nsw i64 %18, %17
  store i64 %19, ptr %2, align 8, !tbaa !5
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %1, i64 noundef %19, ptr noundef %3)
  %20 = load i64, ptr %2, align 8, !tbaa !5
  %21 = sitofp i64 %20 to double
  %22 = getelementptr inbounds i8, ptr %1, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store double %21, ptr %23, align 8, !tbaa !10
  %24 = load i64, ptr @_ZN11alglib_implL15mlpbase_mlpvnumE, align 8, !tbaa !5
  %25 = sitofp i64 %24 to double
  %26 = load ptr, ptr %22, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  store double %25, ptr %27, align 8, !tbaa !10
  %28 = sitofp i64 %7 to double
  %29 = load ptr, ptr %22, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store double %28, ptr %30, align 8, !tbaa !10
  %.not.not57 = icmp sgt i64 %7, 0
  br i1 %.not.not57, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %4
  %xtraiter = and i64 %7, 3
  %31 = icmp ult i64 %7, 4
  br i1 %31, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.05658 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %63, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds i64, ptr %32, i64 %.05658
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = sitofp i64 %34 to double
  %36 = load ptr, ptr %22, align 8, !tbaa !9
  %37 = getelementptr inbounds double, ptr %36, i64 %.05658
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  store double %35, ptr %38, align 8, !tbaa !10
  %39 = or disjoint i64 %.05658, 1
  %40 = load ptr, ptr %5, align 8, !tbaa !9
  %41 = getelementptr inbounds i64, ptr %40, i64 %39
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = sitofp i64 %42 to double
  %44 = load ptr, ptr %22, align 8, !tbaa !9
  %45 = getelementptr inbounds double, ptr %44, i64 %39
  %46 = getelementptr inbounds i8, ptr %45, i64 24
  store double %43, ptr %46, align 8, !tbaa !10
  %47 = or disjoint i64 %.05658, 2
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = getelementptr inbounds i64, ptr %48, i64 %47
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = sitofp i64 %50 to double
  %52 = load ptr, ptr %22, align 8, !tbaa !9
  %53 = getelementptr inbounds double, ptr %52, i64 %47
  %54 = getelementptr inbounds i8, ptr %53, i64 24
  store double %51, ptr %54, align 8, !tbaa !10
  %55 = or disjoint i64 %.05658, 3
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = getelementptr inbounds i64, ptr %56, i64 %55
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = sitofp i64 %58 to double
  %60 = load ptr, ptr %22, align 8, !tbaa !9
  %61 = getelementptr inbounds double, ptr %60, i64 %55
  %62 = getelementptr inbounds i8, ptr %61, i64 24
  store double %59, ptr %62, align 8, !tbaa !10
  %63 = add nuw nsw i64 %.05658, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !12

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

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.05658.epil = phi i64 [ %71, %.lr.ph.epil ], [ %.05658.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = getelementptr inbounds i64, ptr %64, i64 %.05658.epil
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = sitofp i64 %66 to double
  %68 = load ptr, ptr %22, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %68, i64 %.05658.epil
  %70 = getelementptr inbounds i8, ptr %69, i64 24
  store double %67, ptr %70, align 8, !tbaa !10
  %71 = add nuw nsw i64 %.05658.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %4
  %72 = load ptr, ptr %22, align 8, !tbaa !9
  %73 = getelementptr inbounds double, ptr %72, i64 %16
  %74 = getelementptr inbounds i8, ptr %0, i64 328
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = add nsw i64 %17, -1
  %77 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %16, i64 noundef %76)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %73, i64 noundef 1, ptr noundef %75, i64 noundef 1, i64 noundef %77)
  %78 = load ptr, ptr %22, align 8, !tbaa !9
  %79 = getelementptr inbounds double, ptr %78, i64 %17
  %80 = getelementptr inbounds i8, ptr %0, i64 392
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = add nsw i64 %.0, %17
  %83 = add nsw i64 %82, -1
  %84 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %17, i64 noundef %83)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %79, i64 noundef 1, ptr noundef %81, i64 noundef 1, i64 noundef %84)
  %85 = load ptr, ptr %22, align 8, !tbaa !9
  %86 = getelementptr inbounds double, ptr %85, i64 %82
  %87 = getelementptr inbounds i8, ptr %0, i64 456
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = add i64 %.0, -1
  %90 = add i64 %89, %82
  %91 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %82, i64 noundef %90)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %86, i64 noundef 1, ptr noundef %88, i64 noundef 1, i64 noundef %91)
  ret void
}

attributes #0 = { 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 #1 = { "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 #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" }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}


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