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

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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"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 }

; 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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl20dsgetmeanmindistanceEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) #3 {
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, 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 64, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %18, ptr noundef %10)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %13, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %20, i1 noundef zeroext true)
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = icmp sle i64 %21, 0
  br i1 %22, label %26, label %23

23:                                               ; preds = %4
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = icmp slt i64 %24, 1
  br i1 %25, label %26, label %29

26:                                               ; preds = %23, %4
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %27)
  %28 = load double, ptr %16, align 8, !tbaa !11
  store double %28, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %159

29:                                               ; preds = %23
  %30 = load i64, ptr %7, align 8, !tbaa !9
  %31 = sub nsw i64 %30, 1
  %32 = add nsw i64 %31, 1
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %13, i64 noundef %32, ptr noundef %33)
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %44, %29
  %35 = load i64, ptr %11, align 8, !tbaa !9
  %36 = load i64, ptr %7, align 8, !tbaa !9
  %37 = sub nsw i64 %36, 1
  %38 = icmp sle i64 %35, %37
  br i1 %38, label %39, label %47

39:                                               ; preds = %34
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = load i64, ptr %11, align 8, !tbaa !9
  %43 = getelementptr inbounds double, ptr %41, i64 %42
  store double 1.000000e+300, ptr %43, align 8, !tbaa !11
  br label %44

44:                                               ; preds = %39
  %45 = load i64, ptr %11, align 8, !tbaa !9
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %11, align 8, !tbaa !9
  br label %34, !llvm.loop !14

47:                                               ; preds = %34
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = sub nsw i64 %48, 1
  %50 = add nsw i64 %49, 1
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %50, ptr noundef %51)
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %133, %47
  %53 = load i64, ptr %11, align 8, !tbaa !9
  %54 = load i64, ptr %7, align 8, !tbaa !9
  %55 = sub nsw i64 %54, 1
  %56 = icmp sle i64 %53, %55
  br i1 %56, label %57, label %136

57:                                               ; preds = %52
  %58 = load i64, ptr %11, align 8, !tbaa !9
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %12, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %129, %57
  %61 = load i64, ptr %12, align 8, !tbaa !9
  %62 = load i64, ptr %7, align 8, !tbaa !9
  %63 = sub nsw i64 %62, 1
  %64 = icmp sle i64 %61, %63
  br i1 %64, label %65, label %132

65:                                               ; preds = %60
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !13
  %68 = getelementptr inbounds double, ptr %67, i64 0
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %69, i32 0, i32 6
  %71 = load ptr, ptr %70, align 8, !tbaa !13
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 0
  %76 = load i64, ptr %8, align 8, !tbaa !9
  %77 = sub nsw i64 %76, 1
  %78 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %77)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %68, i64 noundef 1, ptr noundef %75, i64 noundef 1, i64 noundef %78)
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  %81 = getelementptr inbounds double, ptr %80, i64 0
  %82 = load ptr, ptr %6, 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 %12, align 8, !tbaa !9
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = getelementptr inbounds double, ptr %87, i64 0
  %89 = load i64, ptr %8, align 8, !tbaa !9
  %90 = sub nsw i64 %89, 1
  %91 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %90)
  call void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef %81, i64 noundef 1, ptr noundef %88, i64 noundef 1, i64 noundef %91)
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %93 = load ptr, ptr %92, align 8, !tbaa !13
  %94 = getelementptr inbounds double, ptr %93, i64 0
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !13
  %97 = getelementptr inbounds double, ptr %96, i64 0
  %98 = load i64, ptr %8, align 8, !tbaa !9
  %99 = sub nsw i64 %98, 1
  %100 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %99)
  %101 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %94, i64 noundef 1, ptr noundef %97, i64 noundef 1, i64 noundef %100)
  store double %101, ptr %15, align 8, !tbaa !11
  %102 = load double, ptr %15, align 8, !tbaa !11
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %102, ptr noundef %103)
  store double %104, ptr %15, align 8, !tbaa !11
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  %107 = load i64, ptr %11, align 8, !tbaa !9
  %108 = getelementptr inbounds double, ptr %106, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = load double, ptr %15, align 8, !tbaa !11
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %109, double noundef %110, ptr noundef %111)
  %113 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %114 = load ptr, ptr %113, align 8, !tbaa !13
  %115 = load i64, ptr %11, align 8, !tbaa !9
  %116 = getelementptr inbounds double, ptr %114, i64 %115
  store double %112, ptr %116, align 8, !tbaa !11
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = load i64, ptr %12, align 8, !tbaa !9
  %120 = getelementptr inbounds double, ptr %118, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !11
  %122 = load double, ptr %15, align 8, !tbaa !11
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %121, double noundef %122, ptr noundef %123)
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !13
  %127 = load i64, ptr %12, align 8, !tbaa !9
  %128 = getelementptr inbounds double, ptr %126, i64 %127
  store double %124, ptr %128, align 8, !tbaa !11
  br label %129

129:                                              ; preds = %65
  %130 = load i64, ptr %12, align 8, !tbaa !9
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %12, align 8, !tbaa !9
  br label %60, !llvm.loop !16

132:                                              ; preds = %60
  br label %133

133:                                              ; preds = %132
  %134 = load i64, ptr %11, align 8, !tbaa !9
  %135 = add nsw i64 %134, 1
  store i64 %135, ptr %11, align 8, !tbaa !9
  br label %52, !llvm.loop !17

136:                                              ; preds = %52
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %137

137:                                              ; preds = %153, %136
  %138 = load i64, ptr %11, align 8, !tbaa !9
  %139 = load i64, ptr %7, align 8, !tbaa !9
  %140 = sub nsw i64 %139, 1
  %141 = icmp sle i64 %138, %140
  br i1 %141, label %142, label %156

142:                                              ; preds = %137
  %143 = load double, ptr %16, align 8, !tbaa !11
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !13
  %146 = load i64, ptr %11, align 8, !tbaa !9
  %147 = getelementptr inbounds double, ptr %145, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = load i64, ptr %7, align 8, !tbaa !9
  %150 = sitofp i64 %149 to double
  %151 = fdiv double %148, %150
  %152 = fadd double %143, %151
  store double %152, ptr %16, align 8, !tbaa !11
  br label %153

153:                                              ; preds = %142
  %154 = load i64, ptr %11, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %11, align 8, !tbaa !9
  br label %137, !llvm.loop !18

156:                                              ; preds = %137
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %157)
  %158 = load double, ptr %16, align 8, !tbaa !11
  store double %158, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %159

159:                                              ; preds = %156, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 64, 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 32, ptr %10) #4
  %160 = load double, ptr %5, align 8
  ret double %160
}

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !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::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

; 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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

declare void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl20dsgetmeanmindistanceEPNS_9ae_matrixEllPNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %8 = icmp slt i64 %1, 1
  %9 = icmp slt i64 %2, 1
  %or.cond = or i1 %8, %9
  br i1 %or.cond, label %._crit_edge, label %10

10:                                               ; preds = %4
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, ptr noundef %3)
  %11 = getelementptr inbounds i8, ptr %6, i64 56
  %12 = add nsw i64 %1, -1
  %xtraiter = and i64 %1, 3
  %13 = icmp ult i64 %12, 3
  br i1 %13, label %.unr-lcssa, label %.new

.new:                                             ; preds = %10
  %unroll_iter = and i64 %1, 9223372036854775804
  br label %14

14:                                               ; preds = %14, %.new
  %.05057 = phi i64 [ 0, %.new ], [ %26, %14 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.3, %14 ]
  %15 = load ptr, ptr %11, align 8, !tbaa !5
  %16 = getelementptr inbounds double, ptr %15, i64 %.05057
  store double 1.000000e+300, ptr %16, align 8, !tbaa !8
  %17 = or disjoint i64 %.05057, 1
  %18 = load ptr, ptr %11, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 %17
  store double 1.000000e+300, ptr %19, align 8, !tbaa !8
  %20 = or disjoint i64 %.05057, 2
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  %22 = getelementptr inbounds double, ptr %21, i64 %20
  store double 1.000000e+300, ptr %22, align 8, !tbaa !8
  %23 = or disjoint i64 %.05057, 3
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = getelementptr inbounds double, ptr %24, i64 %23
  store double 1.000000e+300, ptr %25, align 8, !tbaa !8
  %26 = add nuw nsw i64 %.05057, 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 %.unr-lcssa, label %14, !llvm.loop !10

.unr-lcssa:                                       ; preds = %14, %10
  %.05057.unr = phi i64 [ 0, %10 ], [ %26, %14 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %.05057.epil = phi i64 [ %29, %.epil.preheader ], [ %.05057.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 %.05057.epil
  store double 1.000000e+300, ptr %28, align 8, !tbaa !8
  %29 = add nuw nsw i64 %.05057.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 %.epilog-lcssa, label %.epil.preheader, !llvm.loop !12

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %30 = add nsw i64 %2, -1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %2, ptr noundef %3)
  %.not.not5460 = icmp sgt i64 %1, 0
  br i1 %.not.not5460, label %.lr.ph62, label %._crit_edge

.lr.ph62:                                         ; preds = %.epilog-lcssa
  %31 = getelementptr inbounds i8, ptr %7, i64 56
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  br label %36

.loopexit:                                        ; preds = %.lr.ph, %36
  %exitcond67.not = icmp eq i64 %37, %1
  br i1 %exitcond67.not, label %.preheader, label %36, !llvm.loop !14

.preheader:                                       ; preds = %.loopexit
  br i1 %.not.not5460, label %.lr.ph66, label %._crit_edge

.lr.ph66:                                         ; preds = %.preheader
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = uitofp nneg i64 %1 to double
  %xtraiter70 = and i64 %1, 3
  %35 = icmp ult i64 %1, 4
  br i1 %35, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph66.new

.lr.ph66.new:                                     ; preds = %.lr.ph66
  %unroll_iter74 = and i64 %1, 9223372036854775804
  br label %65

36:                                               ; preds = %.lr.ph62, %.loopexit
  %.161 = phi i64 [ 0, %.lr.ph62 ], [ %37, %.loopexit ]
  %37 = add nuw nsw i64 %.161, 1
  %.not.not5658 = icmp slt i64 %37, %1
  br i1 %.not.not5658, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %36, %.lr.ph
  %.04959 = phi i64 [ %64, %.lr.ph ], [ %37, %36 ]
  %38 = load ptr, ptr %31, align 8, !tbaa !5
  %39 = load ptr, ptr %32, align 8, !tbaa !5
  %40 = getelementptr inbounds ptr, ptr %39, i64 %.161
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %30)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %38, i64 noundef 1, ptr noundef %41, i64 noundef 1, i64 noundef %42)
  %43 = load ptr, ptr %31, align 8, !tbaa !5
  %44 = load ptr, ptr %32, align 8, !tbaa !5
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.04959
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %30)
  call void @_ZN11alglib_impl8ae_v_subEPdlPKdll(ptr noundef %43, i64 noundef 1, ptr noundef %46, i64 noundef 1, i64 noundef %47)
  %48 = load ptr, ptr %31, align 8, !tbaa !5
  %49 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %30)
  %50 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %48, i64 noundef 1, ptr noundef %48, i64 noundef 1, i64 noundef %49)
  %51 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %50, ptr noundef %3)
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %52, i64 %.161
  %54 = load double, ptr %53, align 8, !tbaa !8
  %55 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %54, double noundef %51, ptr noundef %3)
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %56, i64 %.161
  store double %55, ptr %57, align 8, !tbaa !8
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i64 %.04959
  %60 = load double, ptr %59, align 8, !tbaa !8
  %61 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %60, double noundef %51, ptr noundef %3)
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 %.04959
  store double %61, ptr %63, align 8, !tbaa !8
  %64 = add nuw nsw i64 %.04959, 1
  %.not.not56 = icmp slt i64 %64, %1
  br i1 %.not.not56, label %.lr.ph, label %.loopexit, !llvm.loop !17

65:                                               ; preds = %65, %.lr.ph66.new
  %.065 = phi double [ 0.000000e+00, %.lr.ph66.new ], [ %84, %65 ]
  %.264 = phi i64 [ 0, %.lr.ph66.new ], [ %85, %65 ]
  %niter75 = phi i64 [ 0, %.lr.ph66.new ], [ %niter75.next.3, %65 ]
  %66 = getelementptr inbounds double, ptr %33, i64 %.264
  %67 = load double, ptr %66, align 8, !tbaa !8
  %68 = fdiv double %67, %34
  %69 = fadd double %.065, %68
  %70 = or disjoint i64 %.264, 1
  %71 = getelementptr inbounds double, ptr %33, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !8
  %73 = fdiv double %72, %34
  %74 = fadd double %69, %73
  %75 = or disjoint i64 %.264, 2
  %76 = getelementptr inbounds double, ptr %33, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !8
  %78 = fdiv double %77, %34
  %79 = fadd double %74, %78
  %80 = or disjoint i64 %.264, 3
  %81 = getelementptr inbounds double, ptr %33, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !8
  %83 = fdiv double %82, %34
  %84 = fadd double %79, %83
  %85 = add nuw nsw i64 %.264, 4
  %niter75.next.3 = add i64 %niter75, 4
  %niter75.ncmp.3 = icmp eq i64 %niter75.next.3, %unroll_iter74
  br i1 %niter75.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %65, !llvm.loop !18

._crit_edge.loopexit.unr-lcssa:                   ; preds = %65, %.lr.ph66
  %.lcssa.ph = phi double [ poison, %.lr.ph66 ], [ %84, %65 ]
  %.065.unr = phi double [ 0.000000e+00, %.lr.ph66 ], [ %84, %65 ]
  %.264.unr = phi i64 [ 0, %.lr.ph66 ], [ %85, %65 ]
  %lcmp.mod72.not = icmp eq i64 %xtraiter70, 0
  br i1 %lcmp.mod72.not, label %._crit_edge, label %.epil.preheader69

.epil.preheader69:                                ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader69
  %.065.epil = phi double [ %89, %.epil.preheader69 ], [ %.065.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.264.epil = phi i64 [ %90, %.epil.preheader69 ], [ %.264.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter71 = phi i64 [ %epil.iter71.next, %.epil.preheader69 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %86 = getelementptr inbounds double, ptr %33, i64 %.264.epil
  %87 = load double, ptr %86, align 8, !tbaa !8
  %88 = fdiv double %87, %34
  %89 = fadd double %.065.epil, %88
  %90 = add nuw nsw i64 %.264.epil, 1
  %epil.iter71.next = add i64 %epil.iter71, 1
  %epil.iter71.cmp.not = icmp eq i64 %epil.iter71.next, %xtraiter70
  br i1 %epil.iter71.cmp.not, label %._crit_edge, label %.epil.preheader69, !llvm.loop !19

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader69, %.preheader, %.epilog-lcssa, %4
  %.048 = phi double [ 0.000000e+00, %4 ], [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.epilog-lcssa ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %89, %.epil.preheader69 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret double %.048
}

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !11}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !6, i64 0}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !13}


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