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

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

@.str.266 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.267 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) #2

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

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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10rmatrixpluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  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
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 64, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %17 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %17, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %18)
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %12, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  %20 = load i64, ptr %7, align 8, !tbaa !9
  %21 = icmp sgt i64 %20, 0
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef @.str.266, ptr noundef %22)
  %23 = load i64, ptr %8, align 8, !tbaa !9
  %24 = icmp sgt i64 %23, 0
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef @.str.267, ptr noundef %25)
  %26 = load i64, ptr %7, align 8, !tbaa !9
  %27 = load i64, ptr %8, align 8, !tbaa !9
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %26, i64 noundef %27, ptr noundef %28)
  %30 = mul nsw i64 2, %29
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %30, ptr noundef %31)
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = load i64, ptr %8, align 8, !tbaa !9
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %33, i64 noundef %34, ptr noundef %35)
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %32, i64 noundef %36, ptr noundef %37)
  store double 0.000000e+00, ptr %15, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %68, %5
  %39 = load i64, ptr %13, align 8, !tbaa !9
  %40 = load i64, ptr %7, align 8, !tbaa !9
  %41 = sub nsw i64 %40, 1
  %42 = icmp sle i64 %39, %41
  br i1 %42, label %43, label %71

43:                                               ; preds = %38
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %64, %43
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = load i64, ptr %8, align 8, !tbaa !9
  %47 = sub nsw i64 %46, 1
  %48 = icmp sle i64 %45, %47
  br i1 %48, label %49, label %67

49:                                               ; preds = %44
  %50 = load double, ptr %15, align 8, !tbaa !11
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %51, i32 0, i32 6
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = load i64, ptr %13, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %53, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = load i64, ptr %14, align 8, !tbaa !9
  %58 = getelementptr inbounds double, ptr %56, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !11
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %59, ptr noundef %60)
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %50, double noundef %61, ptr noundef %62)
  store double %63, ptr %15, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %49
  %65 = load i64, ptr %14, align 8, !tbaa !9
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %14, align 8, !tbaa !9
  br label %44, !llvm.loop !14

67:                                               ; preds = %44
  br label %68

68:                                               ; preds = %67
  %69 = load i64, ptr %13, align 8, !tbaa !9
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %13, align 8, !tbaa !9
  br label %38, !llvm.loop !16

71:                                               ; preds = %38
  %72 = load double, ptr %15, align 8, !tbaa !11
  %73 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %72, double noundef 0.000000e+00)
  br i1 %73, label %74, label %98

74:                                               ; preds = %71
  %75 = load double, ptr %15, align 8, !tbaa !11
  %76 = fdiv double 1.000000e+00, %75
  store double %76, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %94, %74
  %78 = load i64, ptr %13, align 8, !tbaa !9
  %79 = load i64, ptr %7, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  %81 = icmp sle i64 %78, %80
  br i1 %81, label %82, label %97

82:                                               ; preds = %77
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !13
  %86 = load i64, ptr %13, align 8, !tbaa !9
  %87 = getelementptr inbounds ptr, ptr %85, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %88, i64 0
  %90 = load i64, ptr %8, align 8, !tbaa !9
  %91 = sub nsw i64 %90, 1
  %92 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %91)
  %93 = load double, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %89, i64 noundef 1, i64 noundef %92, double noundef %93)
  br label %94

94:                                               ; preds = %82
  %95 = load i64, ptr %13, align 8, !tbaa !9
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %13, align 8, !tbaa !9
  br label %77, !llvm.loop !17

97:                                               ; preds = %77
  br label %98

98:                                               ; preds = %97, %71
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load i64, ptr %7, align 8, !tbaa !9
  %101 = load i64, ptr %8, align 8, !tbaa !9
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13rmatrixplurecEPNS_9ae_matrixElllPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %99, i64 noundef 0, i64 noundef %100, i64 noundef %101, ptr noundef %102, ptr noundef %12, ptr noundef %103)
  %104 = load double, ptr %15, align 8, !tbaa !11
  %105 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %104, double noundef 0.000000e+00)
  br i1 %105, label %106, label %134

106:                                              ; preds = %98
  %107 = load double, ptr %15, align 8, !tbaa !11
  store double %107, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %130, %106
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = load i64, ptr %7, align 8, !tbaa !9
  %111 = load i64, ptr %8, align 8, !tbaa !9
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %110, i64 noundef %111, ptr noundef %112)
  %114 = sub nsw i64 %113, 1
  %115 = icmp sle i64 %109, %114
  br i1 %115, label %116, label %133

116:                                              ; preds = %108
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %117, i32 0, i32 6
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %120 = load i64, ptr %13, align 8, !tbaa !9
  %121 = getelementptr inbounds ptr, ptr %119, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = load i64, ptr %13, align 8, !tbaa !9
  %124 = getelementptr inbounds double, ptr %122, i64 %123
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = load i64, ptr %8, align 8, !tbaa !9
  %127 = sub nsw i64 %126, 1
  %128 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %125, i64 noundef %127)
  %129 = load double, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %124, i64 noundef 1, i64 noundef %128, double noundef %129)
  br label %130

130:                                              ; preds = %116
  %131 = load i64, ptr %13, align 8, !tbaa !9
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %13, align 8, !tbaa !9
  br label %108, !llvm.loop !18

133:                                              ; preds = %108
  br label %134

134:                                              ; preds = %133, %98
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %135)
  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 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  ret void
}

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.0 }
%union.anon.0 = type { ptr }

@.str.266 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.267 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) local_unnamed_addr #2

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

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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10rmatrixpluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, 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 %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %8 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.266, ptr noundef %4)
  %9 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.267, ptr noundef %4)
  %10 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %11 = shl nsw i64 %10, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %11, ptr noundef %4)
  %12 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %12, ptr noundef %4)
  br i1 %8, label %.preheader63.lr.ph, label %._crit_edge70.thread

.preheader63.lr.ph:                               ; preds = %5
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %9, label %.preheader63.us, label %._crit_edge70.thread84

.preheader63.us:                                  ; preds = %.preheader63.lr.ph, %._crit_edge.us
  %.069.us = phi double [ %21, %._crit_edge.us ], [ 0.000000e+00, %.preheader63.lr.ph ]
  %.05668.us = phi i64 [ %23, %._crit_edge.us ], [ 0, %.preheader63.lr.ph ]
  br label %14

14:                                               ; preds = %.preheader63.us, %14
  %.166.us = phi double [ %.069.us, %.preheader63.us ], [ %21, %14 ]
  %.05565.us = phi i64 [ 0, %.preheader63.us ], [ %22, %14 ]
  %15 = load ptr, ptr %13, align 8, !tbaa !5
  %16 = getelementptr inbounds ptr, ptr %15, i64 %.05668.us
  %17 = load ptr, ptr %16, align 8, !tbaa !8
  %18 = getelementptr inbounds double, ptr %17, i64 %.05565.us
  %19 = load double, ptr %18, align 8, !tbaa !10
  %20 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %19, ptr noundef %4)
  %21 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.166.us, double noundef %20, ptr noundef %4)
  %22 = add nuw nsw i64 %.05565.us, 1
  %exitcond.not = icmp eq i64 %22, %2
  br i1 %exitcond.not, label %._crit_edge.us, label %14, !llvm.loop !12

._crit_edge.us:                                   ; preds = %14
  %23 = add nuw nsw i64 %.05668.us, 1
  %exitcond78.not = icmp eq i64 %23, %1
  br i1 %exitcond78.not, label %._crit_edge70, label %.preheader63.us, !llvm.loop !14

._crit_edge70:                                    ; preds = %._crit_edge.us
  %24 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %21, double noundef 0.000000e+00)
  br i1 %24, label %27, label %.loopexit62

._crit_edge70.thread84:                           ; preds = %.preheader63.lr.ph
  %25 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef 0.000000e+00, double noundef 0.000000e+00)
  br i1 %25, label %.lr.ph, label %.loopexit62

._crit_edge70.thread:                             ; preds = %5
  %26 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef 0.000000e+00, double noundef 0.000000e+00)
  br label %.loopexit62

27:                                               ; preds = %._crit_edge70
  %28 = fdiv double 1.000000e+00, %21
  br i1 %8, label %.lr.ph, label %.loopexit62

.lr.ph:                                           ; preds = %._crit_edge70.thread84, %27
  %29 = phi double [ %28, %27 ], [ 0x7FF0000000000000, %._crit_edge70.thread84 ]
  %.0.lcssa8288 = phi double [ %21, %27 ], [ 0.000000e+00, %._crit_edge70.thread84 ]
  %30 = getelementptr inbounds i8, ptr %0, i64 72
  %31 = add nsw i64 %2, -1
  br label %32

32:                                               ; preds = %.lr.ph, %32
  %.15773 = phi i64 [ 0, %.lr.ph ], [ %37, %32 ]
  %33 = load ptr, ptr %30, align 8, !tbaa !5
  %34 = getelementptr inbounds ptr, ptr %33, i64 %.15773
  %35 = load ptr, ptr %34, align 8, !tbaa !8
  %36 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %31)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %35, i64 noundef 1, i64 noundef %36, double noundef %29)
  %37 = add nuw nsw i64 %.15773, 1
  %exitcond79.not = icmp eq i64 %37, %1
  br i1 %exitcond79.not, label %.loopexit62, label %32, !llvm.loop !15

.loopexit62:                                      ; preds = %32, %._crit_edge70.thread, %._crit_edge70.thread84, %27, %._crit_edge70
  %.0.lcssa81 = phi double [ %21, %27 ], [ %21, %._crit_edge70 ], [ 0.000000e+00, %._crit_edge70.thread84 ], [ 0.000000e+00, %._crit_edge70.thread ], [ %.0.lcssa8288, %32 ]
  call void @_ZN11alglib_impl13rmatrixplurecEPNS_9ae_matrixElllPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %0, i64 noundef 0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef nonnull %7, ptr noundef %4)
  %38 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %.0.lcssa81, double noundef 0.000000e+00)
  br i1 %38, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.loopexit62
  %39 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %.not.not6074 = icmp sgt i64 %39, 0
  br i1 %.not.not6074, label %.lr.ph76, label %.loopexit

.lr.ph76:                                         ; preds = %.preheader
  %40 = getelementptr inbounds i8, ptr %0, i64 72
  %41 = add nsw i64 %2, -1
  br label %42

42:                                               ; preds = %.lr.ph76, %42
  %.275 = phi i64 [ 0, %.lr.ph76 ], [ %48, %42 ]
  %43 = load ptr, ptr %40, align 8, !tbaa !5
  %44 = getelementptr inbounds ptr, ptr %43, i64 %.275
  %45 = load ptr, ptr %44, align 8, !tbaa !8
  %46 = getelementptr inbounds double, ptr %45, i64 %.275
  %47 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %.275, i64 noundef %41)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %46, i64 noundef 1, i64 noundef %47, double noundef %.0.lcssa81)
  %48 = add nuw nsw i64 %.275, 1
  %49 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %.not.not60 = icmp slt i64 %48, %49
  br i1 %.not.not60, label %42, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %42, %.preheader, %.loopexit62
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret void
}

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


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass