; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src/linalg.ll (ZN11alglib_impl13cmatrixrcond1EPKNS_9ae_matrixElPNS_8ae_stateE)

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

@.str.454 = external hidden unnamed_addr constant [20 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 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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

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

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

32:                                               ; preds = %27
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = load i64, ptr %9, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %34, i64 %35
  store double 0.000000e+00, ptr %36, align 8, !tbaa !12
  br label %37

37:                                               ; preds = %32
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %9, align 8, !tbaa !9
  br label %27, !llvm.loop !14

40:                                               ; preds = %27
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %80, %40
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = load i64, ptr %5, align 8, !tbaa !9
  %44 = sub nsw i64 %43, 1
  %45 = icmp sle i64 %42, %44
  br i1 %45, label %46, label %83

46:                                               ; preds = %41
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %76, %46
  %48 = load i64, ptr %10, align 8, !tbaa !9
  %49 = load i64, ptr %5, align 8, !tbaa !9
  %50 = sub nsw i64 %49, 1
  %51 = icmp sle i64 %48, %50
  br i1 %51, label %52, label %79

52:                                               ; preds = %47
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = getelementptr inbounds double, ptr %54, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !12
  %58 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %8, i32 0, i32 6
  %59 = load ptr, ptr %58, align 8, !tbaa !11
  %60 = load i64, ptr %9, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %59, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %62, i64 %63
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %64, i64 16, i1 false), !tbaa.struct !16
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %67 = load double, ptr %66, align 8
  %68 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %69 = load double, ptr %68, align 8
  %70 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %67, double %69, ptr noundef %65)
  %71 = fadd double %57, %70
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  store double %71, ptr %75, align 8, !tbaa !12
  br label %76

76:                                               ; preds = %52
  %77 = load i64, ptr %10, align 8, !tbaa !9
  %78 = add nsw i64 %77, 1
  store i64 %78, ptr %10, align 8, !tbaa !9
  br label %47, !llvm.loop !17

79:                                               ; preds = %47
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %9, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %9, align 8, !tbaa !9
  br label %41, !llvm.loop !18

83:                                               ; preds = %41
  store double 0.000000e+00, ptr %12, align 8, !tbaa !12
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %84

84:                                               ; preds = %98, %83
  %85 = load i64, ptr %9, align 8, !tbaa !9
  %86 = load i64, ptr %5, align 8, !tbaa !9
  %87 = sub nsw i64 %86, 1
  %88 = icmp sle i64 %85, %87
  br i1 %88, label %89, label %101

89:                                               ; preds = %84
  %90 = load double, ptr %12, align 8, !tbaa !12
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = load i64, ptr %9, align 8, !tbaa !9
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !12
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %90, double noundef %95, ptr noundef %96)
  store double %97, ptr %12, align 8, !tbaa !12
  br label %98

98:                                               ; preds = %89
  %99 = load i64, ptr %9, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %9, align 8, !tbaa !9
  br label %84, !llvm.loop !19

101:                                              ; preds = %84
  %102 = load i64, ptr %5, align 8, !tbaa !9
  %103 = load i64, ptr %5, align 8, !tbaa !9
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9cmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %8, i64 noundef %102, i64 noundef %103, ptr noundef %13, ptr noundef %104)
  %105 = load i64, ptr %5, align 8, !tbaa !9
  %106 = load double, ptr %12, align 8, !tbaa !12
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_cmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef %8, i64 noundef %105, i1 noundef zeroext true, i1 noundef zeroext true, double noundef %106, ptr noundef %11, ptr noundef %107)
  %108 = load double, ptr %11, align 8, !tbaa !12
  store double %108, ptr %15, align 8, !tbaa !12
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %109)
  %110 = load double, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  ret double %110
}

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #3

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28rcond_cmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, double noundef, ptr noundef, ptr noundef) #4

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

@.str.454 = external hidden unnamed_addr constant [20 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 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_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl13cmatrixrcond1EPKNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = alloca %"struct.alglib_impl::ae_frame", align 8
  %5 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %6 = alloca double, align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %2, ptr noundef nonnull %4)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %5, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %5, ptr noundef %0, ptr noundef %2, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 2, ptr noundef %2, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %2, i1 noundef zeroext true)
  %9 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.454, ptr noundef %2)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, ptr noundef %2)
  br i1 %9, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %10 = getelementptr inbounds i8, ptr %8, i64 56
  %xtraiter = and i64 %1, 3
  %11 = icmp ult i64 %1, 4
  br i1 %11, label %.preheader44.unr-lcssa, label %.lr.ph.new

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

.preheader44.unr-lcssa:                           ; preds = %31, %.lr.ph
  %.046.unr = phi i64 [ 0, %.lr.ph ], [ %43, %31 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader44, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader44.unr-lcssa, %.epil.preheader
  %.046.epil = phi i64 [ %14, %.epil.preheader ], [ %.046.unr, %.preheader44.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader44.unr-lcssa ]
  %12 = load ptr, ptr %10, align 8, !tbaa !5
  %13 = getelementptr inbounds double, ptr %12, i64 %.046.epil
  store double 0.000000e+00, ptr %13, align 8, !tbaa !8
  %14 = add nuw nsw i64 %.046.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 %.preheader44, label %.epil.preheader, !llvm.loop !10

.preheader44:                                     ; preds = %.epil.preheader, %.preheader44.unr-lcssa
  br i1 %9, label %.preheader43.lr.ph, label %._crit_edge

.preheader43.lr.ph:                               ; preds = %.preheader44
  %15 = getelementptr inbounds i8, ptr %8, i64 56
  %16 = getelementptr inbounds i8, ptr %5, i64 72
  br label %.preheader43.us

.preheader43.us:                                  ; preds = %._crit_edge.us, %.preheader43.lr.ph
  %.151.us = phi i64 [ 0, %.preheader43.lr.ph ], [ %30, %._crit_edge.us ]
  br label %17

17:                                               ; preds = %.preheader43.us, %17
  %.03748.us = phi i64 [ 0, %.preheader43.us ], [ %29, %17 ]
  %18 = load ptr, ptr %15, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 %.03748.us
  %20 = load double, ptr %19, align 8, !tbaa !8
  %21 = load ptr, ptr %16, align 8, !tbaa !5
  %22 = getelementptr inbounds ptr, ptr %21, i64 %.151.us
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %23, i64 %.03748.us
  %.sroa.0.0.copyload.us = load double, ptr %24, align 8, !tbaa !8
  %.sroa.2.0..sroa_idx.us = getelementptr inbounds i8, ptr %24, i64 8
  %.sroa.2.0.copyload.us = load double, ptr %.sroa.2.0..sroa_idx.us, align 8, !tbaa !8
  %25 = 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 %2)
  %26 = fadd double %20, %25
  %27 = load ptr, ptr %15, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 %.03748.us
  store double %26, ptr %28, align 8, !tbaa !8
  %29 = add nuw nsw i64 %.03748.us, 1
  %exitcond56.not = icmp eq i64 %29, %1
  br i1 %exitcond56.not, label %._crit_edge.us, label %17, !llvm.loop !14

._crit_edge.us:                                   ; preds = %17
  %30 = add nuw nsw i64 %.151.us, 1
  %exitcond57.not = icmp eq i64 %30, %1
  br i1 %exitcond57.not, label %.preheader, label %.preheader43.us, !llvm.loop !16

31:                                               ; preds = %31, %.lr.ph.new
  %.046 = phi i64 [ 0, %.lr.ph.new ], [ %43, %31 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %31 ]
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i64 %.046
  store double 0.000000e+00, ptr %33, align 8, !tbaa !8
  %34 = or disjoint i64 %.046, 1
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %35, i64 %34
  store double 0.000000e+00, ptr %36, align 8, !tbaa !8
  %37 = or disjoint i64 %.046, 2
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %38, i64 %37
  store double 0.000000e+00, ptr %39, align 8, !tbaa !8
  %40 = or disjoint i64 %.046, 3
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %41, i64 %40
  store double 0.000000e+00, ptr %42, align 8, !tbaa !8
  %43 = add nuw nsw i64 %.046, 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 %.preheader44.unr-lcssa, label %31, !llvm.loop !17

.preheader:                                       ; preds = %._crit_edge.us
  br i1 %9, label %.lr.ph55, label %._crit_edge

.lr.ph55:                                         ; preds = %.preheader
  %44 = getelementptr inbounds i8, ptr %8, i64 56
  br label %45

45:                                               ; preds = %.lr.ph55, %45
  %.254 = phi i64 [ 0, %.lr.ph55 ], [ %50, %45 ]
  %.03853 = phi double [ 0.000000e+00, %.lr.ph55 ], [ %49, %45 ]
  %46 = load ptr, ptr %44, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %46, i64 %.254
  %48 = load double, ptr %47, align 8, !tbaa !8
  %49 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03853, double noundef %48, ptr noundef %2)
  %50 = add nuw nsw i64 %.254, 1
  %exitcond58.not = icmp eq i64 %50, %1
  br i1 %exitcond58.not, label %._crit_edge, label %45, !llvm.loop !18

._crit_edge:                                      ; preds = %45, %3, %.preheader44, %.preheader
  %.038.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader44 ], [ 0.000000e+00, %3 ], [ %49, %45 ]
  call void @_ZN11alglib_impl9cmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %5, i64 noundef %1, i64 noundef %1, ptr noundef nonnull %7, ptr noundef %2)
  call void @_ZN11alglib_implL28rcond_cmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef nonnull %5, i64 noundef %1, i1 noundef zeroext true, i1 noundef zeroext true, double noundef %.038.lcssa, ptr noundef nonnull %6, ptr noundef %2)
  %51 = load double, ptr %6, align 8, !tbaa !8
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret double %51
}

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr 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_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_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28rcond_cmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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


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