; 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_complex" = type { double, double }
%"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.264 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.265 = 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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10cmatrixlupEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #4 {
  %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
  %17 = alloca %"struct.alglib_impl::ae_complex", 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) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %18, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %19)
  %20 = 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 4, ptr noundef %20, i1 noundef zeroext true)
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = icmp sgt i64 %21, 0
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef @.str.264, ptr noundef %23)
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = icmp sgt i64 %24, 0
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.265, ptr noundef %26)
  store double 0.000000e+00, ptr %15, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %60, %5
  %28 = load i64, ptr %13, align 8, !tbaa !9
  %29 = load i64, ptr %7, align 8, !tbaa !9
  %30 = sub nsw i64 %29, 1
  %31 = icmp sle i64 %28, %30
  br i1 %31, label %32, label %63

32:                                               ; preds = %27
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %56, %32
  %34 = load i64, ptr %14, align 8, !tbaa !9
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = sub nsw i64 %35, 1
  %37 = icmp sle i64 %34, %36
  br i1 %37, label %38, label %59

38:                                               ; preds = %33
  %39 = load double, ptr %15, align 8, !tbaa !11
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %40, i32 0, i32 6
  %42 = load ptr, ptr %41, align 8, !tbaa !13
  %43 = load i64, ptr %13, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %42, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = load i64, ptr %14, align 8, !tbaa !9
  %47 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %45, i64 %46
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %47, i64 16, i1 false), !tbaa.struct !14
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %50 = load double, ptr %49, align 8
  %51 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %52 = load double, ptr %51, align 8
  %53 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %50, double %52, ptr noundef %48)
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %39, double noundef %53, ptr noundef %54)
  store double %55, ptr %15, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %38
  %57 = load i64, ptr %14, align 8, !tbaa !9
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %14, align 8, !tbaa !9
  br label %33, !llvm.loop !15

59:                                               ; preds = %33
  br label %60

60:                                               ; preds = %59
  %61 = load i64, ptr %13, align 8, !tbaa !9
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %13, align 8, !tbaa !9
  br label %27, !llvm.loop !17

63:                                               ; preds = %27
  %64 = load double, ptr %15, align 8, !tbaa !11
  %65 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %64, double noundef 0.000000e+00)
  br i1 %65, label %66, label %90

66:                                               ; preds = %63
  %67 = load double, ptr %15, align 8, !tbaa !11
  %68 = fdiv double 1.000000e+00, %67
  store double %68, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %86, %66
  %70 = load i64, ptr %13, align 8, !tbaa !9
  %71 = load i64, ptr %7, align 8, !tbaa !9
  %72 = sub nsw i64 %71, 1
  %73 = icmp sle i64 %70, %72
  br i1 %73, label %74, label %89

74:                                               ; preds = %69
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %75, i32 0, i32 6
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = load i64, ptr %13, align 8, !tbaa !9
  %79 = getelementptr inbounds ptr, ptr %77, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %80, i64 0
  %82 = load i64, ptr %8, align 8, !tbaa !9
  %83 = sub nsw i64 %82, 1
  %84 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %83)
  %85 = load double, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl10ae_v_cmuldEPNS_10ae_complexElld(ptr noundef %81, i64 noundef 1, i64 noundef %84, double noundef %85)
  br label %86

86:                                               ; preds = %74
  %87 = load i64, ptr %13, align 8, !tbaa !9
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %13, align 8, !tbaa !9
  br label %69, !llvm.loop !18

89:                                               ; preds = %69
  br label %90

90:                                               ; preds = %89, %63
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = load i64, ptr %7, align 8, !tbaa !9
  %93 = load i64, ptr %8, align 8, !tbaa !9
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %92, i64 noundef %93, ptr noundef %94)
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %91, i64 noundef %95, ptr noundef %96)
  %97 = load i64, ptr %7, align 8, !tbaa !9
  %98 = load i64, ptr %8, align 8, !tbaa !9
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %97, i64 noundef %98, ptr noundef %99)
  %101 = mul nsw i64 2, %100
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %101, ptr noundef %102)
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i64, ptr %7, align 8, !tbaa !9
  %105 = load i64, ptr %8, align 8, !tbaa !9
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13cmatrixluprecEPNS_9ae_matrixElllPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %103, i64 noundef 0, i64 noundef %104, i64 noundef %105, ptr noundef %106, ptr noundef %12, ptr noundef %107)
  %108 = load double, ptr %15, align 8, !tbaa !11
  %109 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %108, double noundef 0.000000e+00)
  br i1 %109, label %110, label %136

110:                                              ; preds = %90
  %111 = load double, ptr %15, align 8, !tbaa !11
  store double %111, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %132, %110
  %113 = load i64, ptr %13, align 8, !tbaa !9
  %114 = load i64, ptr %7, align 8, !tbaa !9
  %115 = sub nsw i64 %114, 1
  %116 = icmp sle i64 %113, %115
  br i1 %116, label %117, label %135

117:                                              ; preds = %112
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = load i64, ptr %13, align 8, !tbaa !9
  %122 = getelementptr inbounds ptr, ptr %120, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %123, i64 0
  %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 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %125, i64 noundef %127, ptr noundef %128)
  %130 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %129)
  %131 = load double, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl10ae_v_cmuldEPNS_10ae_complexElld(ptr noundef %124, i64 noundef 1, i64 noundef %130, double noundef %131)
  br label %132

132:                                              ; preds = %117
  %133 = load i64, ptr %13, align 8, !tbaa !9
  %134 = add nsw i64 %133, 1
  store i64 %134, ptr %13, align 8, !tbaa !9
  br label %112, !llvm.loop !19

135:                                              ; preds = %112
  br label %136

136:                                              ; preds = %135, %90
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %137)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  ret void
}

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

declare void @_ZN11alglib_impl10ae_v_cmuldEPNS_10ae_complexElld(ptr noundef, i64 noundef, i64 noundef, double 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{i64 0, i64 8, !11, i64 8, i64 8, !11}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


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

@.str.264 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.265 = 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl13cmatrixluprecEPNS_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_impl10cmatrixlupEPNS_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 4, 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.264, ptr noundef %4)
  %9 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.265, ptr noundef %4)
  br i1 %8, label %.preheader61.lr.ph, label %._crit_edge68.thread

.preheader61.lr.ph:                               ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %9, label %.preheader61.us, label %._crit_edge68.thread83

.preheader61.us:                                  ; preds = %.preheader61.lr.ph, %._crit_edge.us
  %.067.us = phi i64 [ %19, %._crit_edge.us ], [ 0, %.preheader61.lr.ph ]
  %.05466.us = phi double [ %17, %._crit_edge.us ], [ 0.000000e+00, %.preheader61.lr.ph ]
  br label %11

11:                                               ; preds = %.preheader61.us, %11
  %.05364.us = phi i64 [ 0, %.preheader61.us ], [ %18, %11 ]
  %.15563.us = phi double [ %.05466.us, %.preheader61.us ], [ %17, %11 ]
  %12 = load ptr, ptr %10, align 8, !tbaa !5
  %13 = getelementptr inbounds ptr, ptr %12, i64 %.067.us
  %14 = load ptr, ptr %13, align 8, !tbaa !8
  %15 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %14, i64 %.05364.us
  %.sroa.0.0.copyload.us = load double, ptr %15, align 8, !tbaa !10
  %.sroa.2.0..sroa_idx.us = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.2.0.copyload.us = load double, ptr %.sroa.2.0..sroa_idx.us, align 8, !tbaa !10
  %16 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.0.0.copyload.us, double %.sroa.2.0.copyload.us, ptr noundef %4)
  %17 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.15563.us, double noundef %16, ptr noundef %4)
  %18 = add nuw nsw i64 %.05364.us, 1
  %exitcond.not = icmp eq i64 %18, %2
  br i1 %exitcond.not, label %._crit_edge.us, label %11, !llvm.loop !12

._crit_edge.us:                                   ; preds = %11
  %19 = add nuw nsw i64 %.067.us, 1
  %exitcond76.not = icmp eq i64 %19, %1
  br i1 %exitcond76.not, label %._crit_edge68, label %.preheader61.us, !llvm.loop !14

._crit_edge68:                                    ; preds = %._crit_edge.us
  %20 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %17, double noundef 0.000000e+00)
  br i1 %20, label %23, label %.loopexit60

._crit_edge68.thread83:                           ; preds = %.preheader61.lr.ph
  %21 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef 0.000000e+00, double noundef 0.000000e+00)
  br i1 %21, label %.lr.ph, label %.loopexit60

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

23:                                               ; preds = %._crit_edge68
  %24 = fdiv double 1.000000e+00, %17
  br i1 %8, label %.lr.ph, label %.loopexit60

.lr.ph:                                           ; preds = %._crit_edge68.thread83, %23
  %25 = phi double [ %24, %23 ], [ 0x7FF0000000000000, %._crit_edge68.thread83 ]
  %.054.lcssa8187 = phi double [ %17, %23 ], [ 0.000000e+00, %._crit_edge68.thread83 ]
  %26 = getelementptr inbounds i8, ptr %0, i64 72
  %27 = add nsw i64 %2, -1
  br label %28

28:                                               ; preds = %.lr.ph, %28
  %.171 = phi i64 [ 0, %.lr.ph ], [ %33, %28 ]
  %29 = load ptr, ptr %26, align 8, !tbaa !5
  %30 = getelementptr inbounds ptr, ptr %29, i64 %.171
  %31 = load ptr, ptr %30, align 8, !tbaa !8
  %32 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %27)
  call void @_ZN11alglib_impl10ae_v_cmuldEPNS_10ae_complexElld(ptr noundef %31, i64 noundef 1, i64 noundef %32, double noundef %25)
  %33 = add nuw nsw i64 %.171, 1
  %exitcond77.not = icmp eq i64 %33, %1
  br i1 %exitcond77.not, label %.loopexit60, label %28, !llvm.loop !15

.loopexit60:                                      ; preds = %28, %._crit_edge68.thread, %._crit_edge68.thread83, %23, %._crit_edge68
  %.054.lcssa80 = phi double [ %17, %23 ], [ %17, %._crit_edge68 ], [ 0.000000e+00, %._crit_edge68.thread83 ], [ 0.000000e+00, %._crit_edge68.thread ], [ %.054.lcssa8187, %28 ]
  %34 = 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 %34, ptr noundef %4)
  %35 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %36 = shl nsw i64 %35, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %36, ptr noundef %4)
  call void @_ZN11alglib_impl13cmatrixluprecEPNS_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)
  %37 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %.054.lcssa80, double noundef 0.000000e+00)
  %or.cond = and i1 %37, %8
  br i1 %or.cond, label %.lr.ph74, label %.loopexit

.lr.ph74:                                         ; preds = %.loopexit60
  %38 = getelementptr inbounds i8, ptr %0, i64 72
  %39 = add nsw i64 %2, -1
  br label %40

40:                                               ; preds = %.lr.ph74, %40
  %.273 = phi i64 [ 0, %.lr.ph74 ], [ %46, %40 ]
  %41 = load ptr, ptr %38, align 8, !tbaa !5
  %42 = getelementptr inbounds ptr, ptr %41, i64 %.273
  %43 = load ptr, ptr %42, align 8, !tbaa !8
  %44 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.273, i64 noundef %39, ptr noundef %4)
  %45 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %44)
  call void @_ZN11alglib_impl10ae_v_cmuldEPNS_10ae_complexElld(ptr noundef %43, i64 noundef 1, i64 noundef %45, double noundef %.054.lcssa80)
  %46 = add nuw nsw i64 %.273, 1
  %exitcond78.not = icmp eq i64 %46, %1
  br i1 %exitcond78.not, label %.loopexit, label %40, !llvm.loop !16

.loopexit:                                        ; preds = %40, %.loopexit60
  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
}

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

declare void @_ZN11alglib_impl10ae_v_cmuldEPNS_10ae_complexElld(ptr noundef, i64 noundef, i64 noundef, double 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 = !{!"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