; 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.273 = external hidden unnamed_addr constant [24 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

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

29:                                               ; preds = %99, %5
  %30 = load i64, ptr %12, align 8, !tbaa !9
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = sub nsw i64 %31, 1
  %33 = icmp sle i64 %30, %32
  br i1 %33, label %34, label %102

34:                                               ; preds = %29
  %35 = load i8, ptr %8, align 1, !tbaa !11, !range !15, !noundef !16
  %36 = trunc i8 %35 to i1
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  %38 = load i64, ptr %12, align 8, !tbaa !9
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %17, align 8, !tbaa !9
  %40 = load i64, ptr %7, align 8, !tbaa !9
  %41 = sub nsw i64 %40, 1
  store i64 %41, ptr %18, align 8, !tbaa !9
  br label %45

42:                                               ; preds = %34
  store i64 0, ptr %17, align 8, !tbaa !9
  %43 = load i64, ptr %12, align 8, !tbaa !9
  %44 = sub nsw i64 %43, 1
  store i64 %44, ptr %18, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %42, %37
  store double 0.000000e+00, ptr %14, align 8, !tbaa !13
  %46 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %46, ptr %13, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %68, %45
  %48 = load i64, ptr %13, align 8, !tbaa !9
  %49 = load i64, ptr %18, align 8, !tbaa !9
  %50 = icmp sle i64 %48, %49
  br i1 %50, label %51, label %71

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

68:                                               ; preds = %51
  %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 %47, !llvm.loop !19

71:                                               ; preds = %47
  %72 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %77

74:                                               ; preds = %71
  %75 = load double, ptr %14, align 8, !tbaa !13
  %76 = fadd double %75, 1.000000e+00
  store double %76, ptr %14, align 8, !tbaa !13
  br label %94

77:                                               ; preds = %71
  %78 = load double, ptr %14, align 8, !tbaa !13
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %79, i32 0, i32 6
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  %82 = load i64, ptr %12, align 8, !tbaa !9
  %83 = getelementptr inbounds ptr, ptr %81, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = load i64, ptr %12, align 8, !tbaa !9
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %84, i64 %85
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %86, i64 16, i1 false), !tbaa.struct !18
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %89 = load double, ptr %88, align 8
  %90 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %91 = load double, ptr %90, align 8
  %92 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %89, double %91, ptr noundef %87)
  %93 = fadd double %78, %92
  store double %93, ptr %14, align 8, !tbaa !13
  br label %94

94:                                               ; preds = %77, %74
  %95 = load double, ptr %15, align 8, !tbaa !13
  %96 = load double, ptr %14, align 8, !tbaa !13
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %95, double noundef %96, ptr noundef %97)
  store double %98, ptr %15, align 8, !tbaa !13
  br label %99

99:                                               ; preds = %94
  %100 = load i64, ptr %12, align 8, !tbaa !9
  %101 = add nsw i64 %100, 1
  store i64 %101, ptr %12, align 8, !tbaa !9
  br label %29, !llvm.loop !21

102:                                              ; preds = %29
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load i64, ptr %7, align 8, !tbaa !9
  %105 = load i8, ptr %8, align 1, !tbaa !11, !range !15, !noundef !16
  %106 = trunc i8 %105 to i1
  %107 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %108 = trunc i8 %107 to i1
  %109 = load double, ptr %15, align 8, !tbaa !13
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_cmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %103, i64 noundef %104, i1 noundef zeroext %106, i1 noundef zeroext %108, i1 noundef zeroext false, double noundef %109, ptr noundef %14, ptr noundef %110)
  %111 = load double, ptr %14, align 8, !tbaa !13
  store double %111, ptr %19, align 8, !tbaa !13
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %112)
  %113 = load double, ptr %19, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 64, 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 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  ret double %113
}

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 noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28rcond_cmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, 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: 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 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!7, !7, i64 0}
!18 = !{i64 0, i64 8, !13, i64 8, i64 8, !13}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


; 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.273 = external hidden unnamed_addr constant [24 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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl17cmatrixtrrcondinfEPNS_9ae_matrixElbbPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca double, align 8
  %8 = 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 8, 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 %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 2, ptr noundef %4, 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.273, ptr noundef %4)
  br i1 %9, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %3, label %.lr.ph47.split.us, label %.lr.ph47.split

.lr.ph47.split.us:                                ; preds = %.lr.ph47
  br i1 %2, label %.lr.ph47.split.us.split.us, label %.lr.ph47.split.us.split

.lr.ph47.split.us.split.us:                       ; preds = %.lr.ph47.split.us, %._crit_edge.us.us
  %.045.us.us = phi i64 [ %11, %._crit_edge.us.us ], [ 0, %.lr.ph47.split.us ]
  %.03644.us.us = phi double [ %14, %._crit_edge.us.us ], [ 0.000000e+00, %.lr.ph47.split.us ]
  %11 = add nuw nsw i64 %.045.us.us, 1
  %.not.not4041.us.us = icmp slt i64 %11, %1
  br i1 %.not.not4041.us.us, label %.lr.ph.us.us, label %._crit_edge.us.us

._crit_edge.us.us:                                ; preds = %.lr.ph.us.us, %.lr.ph47.split.us.split.us
  %12 = phi double [ 0.000000e+00, %.lr.ph47.split.us.split.us ], [ %21, %.lr.ph.us.us ]
  %13 = fadd double %12, 1.000000e+00
  store double %13, ptr %7, align 8, !tbaa !5
  %14 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03644.us.us, double noundef %13, ptr noundef %4)
  %exitcond74.not = icmp eq i64 %11, %1
  br i1 %exitcond74.not, label %._crit_edge48, label %.lr.ph47.split.us.split.us, !llvm.loop !9

.lr.ph.us.us:                                     ; preds = %.lr.ph47.split.us.split.us, %.lr.ph.us.us
  %15 = phi double [ %21, %.lr.ph.us.us ], [ 0.000000e+00, %.lr.ph47.split.us.split.us ]
  %.03542.us.us = phi i64 [ %22, %.lr.ph.us.us ], [ %11, %.lr.ph47.split.us.split.us ]
  %16 = load ptr, ptr %10, align 8, !tbaa !11
  %17 = getelementptr inbounds ptr, ptr %16, i64 %.045.us.us
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %18, i64 %.03542.us.us
  %.sroa.01.0.copyload.us.us = load double, ptr %19, align 8, !tbaa !5
  %.sroa.22.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %19, i64 8
  %.sroa.22.0.copyload.us.us = load double, ptr %.sroa.22.0..sroa_idx.us.us, align 8, !tbaa !5
  %20 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.01.0.copyload.us.us, double %.sroa.22.0.copyload.us.us, ptr noundef %4)
  %21 = fadd double %15, %20
  %22 = add nuw nsw i64 %.03542.us.us, 1
  %.not.not40.us.us = icmp slt i64 %22, %1
  br i1 %.not.not40.us.us, label %.lr.ph.us.us, label %._crit_edge.us.us, !llvm.loop !14

.lr.ph47.split.us.split:                          ; preds = %.lr.ph47.split.us, %._crit_edge.us
  %.045.us = phi i64 [ %23, %._crit_edge.us ], [ 0, %.lr.ph47.split.us ]
  %.03644.us = phi double [ %26, %._crit_edge.us ], [ 0.000000e+00, %.lr.ph47.split.us ]
  %23 = add nuw nsw i64 %.045.us, 1
  %.not.not4041.us.not = icmp eq i64 %.045.us, 0
  br i1 %.not.not4041.us.not, label %._crit_edge.us, label %.lr.ph.us

._crit_edge.us:                                   ; preds = %.lr.ph.us, %.lr.ph47.split.us.split
  %24 = phi double [ 0.000000e+00, %.lr.ph47.split.us.split ], [ %33, %.lr.ph.us ]
  %25 = fadd double %24, 1.000000e+00
  store double %25, ptr %7, align 8, !tbaa !5
  %26 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03644.us, double noundef %25, ptr noundef %4)
  %exitcond73.not = icmp eq i64 %23, %1
  br i1 %exitcond73.not, label %._crit_edge48, label %.lr.ph47.split.us.split, !llvm.loop !9

.lr.ph.us:                                        ; preds = %.lr.ph47.split.us.split, %.lr.ph.us
  %27 = phi double [ %33, %.lr.ph.us ], [ 0.000000e+00, %.lr.ph47.split.us.split ]
  %.03542.us = phi i64 [ %34, %.lr.ph.us ], [ 0, %.lr.ph47.split.us.split ]
  %28 = load ptr, ptr %10, align 8, !tbaa !11
  %29 = getelementptr inbounds ptr, ptr %28, i64 %.045.us
  %30 = load ptr, ptr %29, align 8, !tbaa !12
  %31 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %30, i64 %.03542.us
  %.sroa.01.0.copyload.us = load double, ptr %31, align 8, !tbaa !5
  %.sroa.22.0..sroa_idx.us = getelementptr inbounds i8, ptr %31, i64 8
  %.sroa.22.0.copyload.us = load double, ptr %.sroa.22.0..sroa_idx.us, align 8, !tbaa !5
  %32 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.01.0.copyload.us, double %.sroa.22.0.copyload.us, ptr noundef %4)
  %33 = fadd double %27, %32
  %34 = add nuw nsw i64 %.03542.us, 1
  %exitcond72.not = icmp eq i64 %34, %.045.us
  br i1 %exitcond72.not, label %._crit_edge.us, label %.lr.ph.us, !llvm.loop !14

.lr.ph47.split:                                   ; preds = %.lr.ph47
  br i1 %2, label %.lr.ph47.split.split.us, label %.lr.ph47.split.split

.lr.ph47.split.split.us:                          ; preds = %.lr.ph47.split, %._crit_edge.us58
  %.045.us49 = phi i64 [ %35, %._crit_edge.us58 ], [ 0, %.lr.ph47.split ]
  %.03644.us50 = phi double [ %43, %._crit_edge.us58 ], [ 0.000000e+00, %.lr.ph47.split ]
  %35 = add nuw nsw i64 %.045.us49, 1
  %.not.not4041.us60 = icmp slt i64 %35, %1
  br i1 %.not.not4041.us60, label %.lr.ph.us57, label %._crit_edge.us58

._crit_edge.us58:                                 ; preds = %.lr.ph.us57, %.lr.ph47.split.split.us
  %36 = phi double [ 0.000000e+00, %.lr.ph47.split.split.us ], [ %50, %.lr.ph.us57 ]
  %37 = load ptr, ptr %10, align 8, !tbaa !11
  %38 = getelementptr inbounds ptr, ptr %37, i64 %.045.us49
  %39 = load ptr, ptr %38, align 8, !tbaa !12
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %39, i64 %.045.us49
  %.sroa.0.0.copyload.us = load double, ptr %40, align 8, !tbaa !5
  %.sroa.2.0..sroa_idx.us = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.2.0.copyload.us = load double, ptr %.sroa.2.0..sroa_idx.us, align 8, !tbaa !5
  %41 = 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)
  %42 = fadd double %36, %41
  store double %42, ptr %7, align 8, !tbaa !5
  %43 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03644.us50, double noundef %42, ptr noundef %4)
  %exitcond71.not = icmp eq i64 %35, %1
  br i1 %exitcond71.not, label %._crit_edge48, label %.lr.ph47.split.split.us, !llvm.loop !9

.lr.ph.us57:                                      ; preds = %.lr.ph47.split.split.us, %.lr.ph.us57
  %44 = phi double [ %50, %.lr.ph.us57 ], [ 0.000000e+00, %.lr.ph47.split.split.us ]
  %.03542.us52 = phi i64 [ %51, %.lr.ph.us57 ], [ %35, %.lr.ph47.split.split.us ]
  %45 = load ptr, ptr %10, align 8, !tbaa !11
  %46 = getelementptr inbounds ptr, ptr %45, i64 %.045.us49
  %47 = load ptr, ptr %46, align 8, !tbaa !12
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %47, i64 %.03542.us52
  %.sroa.01.0.copyload.us53 = load double, ptr %48, align 8, !tbaa !5
  %.sroa.22.0..sroa_idx.us54 = getelementptr inbounds i8, ptr %48, i64 8
  %.sroa.22.0.copyload.us55 = load double, ptr %.sroa.22.0..sroa_idx.us54, align 8, !tbaa !5
  %49 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.01.0.copyload.us53, double %.sroa.22.0.copyload.us55, ptr noundef %4)
  %50 = fadd double %44, %49
  %51 = add nuw nsw i64 %.03542.us52, 1
  %.not.not40.us56 = icmp slt i64 %51, %1
  br i1 %.not.not40.us56, label %.lr.ph.us57, label %._crit_edge.us58, !llvm.loop !14

.lr.ph47.split.split:                             ; preds = %.lr.ph47.split, %._crit_edge
  %.045 = phi i64 [ %52, %._crit_edge ], [ 0, %.lr.ph47.split ]
  %.03644 = phi double [ %68, %._crit_edge ], [ 0.000000e+00, %.lr.ph47.split ]
  %52 = add nuw nsw i64 %.045, 1
  %.not.not4041.not = icmp eq i64 %.045, 0
  br i1 %.not.not4041.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph47.split.split, %.lr.ph
  %53 = phi double [ %59, %.lr.ph ], [ 0.000000e+00, %.lr.ph47.split.split ]
  %.03542 = phi i64 [ %60, %.lr.ph ], [ 0, %.lr.ph47.split.split ]
  %54 = load ptr, ptr %10, align 8, !tbaa !11
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.045
  %56 = load ptr, ptr %55, align 8, !tbaa !12
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %56, i64 %.03542
  %.sroa.01.0.copyload = load double, ptr %57, align 8, !tbaa !5
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %57, i64 8
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !5
  %58 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, ptr noundef %4)
  %59 = fadd double %53, %58
  %60 = add nuw nsw i64 %.03542, 1
  %exitcond.not = icmp eq i64 %60, %.045
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph47.split.split
  %61 = phi double [ 0.000000e+00, %.lr.ph47.split.split ], [ %59, %.lr.ph ]
  %62 = load ptr, ptr %10, align 8, !tbaa !11
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.045
  %64 = load ptr, ptr %63, align 8, !tbaa !12
  %65 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %64, i64 %.045
  %.sroa.0.0.copyload = load double, ptr %65, align 8, !tbaa !5
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %65, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  %66 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef %4)
  %67 = fadd double %61, %66
  store double %67, ptr %7, align 8, !tbaa !5
  %68 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03644, double noundef %67, ptr noundef %4)
  %exitcond70.not = icmp eq i64 %52, %1
  br i1 %exitcond70.not, label %._crit_edge48, label %.lr.ph47.split.split, !llvm.loop !9

._crit_edge48:                                    ; preds = %._crit_edge, %._crit_edge.us58, %._crit_edge.us, %._crit_edge.us.us, %5
  %.036.lcssa = phi double [ 0.000000e+00, %5 ], [ %14, %._crit_edge.us.us ], [ %26, %._crit_edge.us ], [ %43, %._crit_edge.us58 ], [ %68, %._crit_edge ]
  call void @_ZN11alglib_implL28rcond_cmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext false, double noundef %.036.lcssa, ptr noundef nonnull %7, ptr noundef %4)
  %69 = load double, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret double %69
}

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 noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) 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_cmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !10}


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