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

27:                                               ; preds = %91, %5
  %28 = load i64, ptr %12, 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 %94

32:                                               ; preds = %27
  %33 = load i8, ptr %8, align 1, !tbaa !11, !range !15, !noundef !16
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %40

35:                                               ; preds = %32
  %36 = load i64, ptr %12, align 8, !tbaa !9
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr %17, align 8, !tbaa !9
  %38 = load i64, ptr %7, align 8, !tbaa !9
  %39 = sub nsw i64 %38, 1
  store i64 %39, ptr %18, align 8, !tbaa !9
  br label %43

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

43:                                               ; preds = %40, %35
  store double 0.000000e+00, ptr %14, align 8, !tbaa !13
  %44 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %44, ptr %13, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %63, %43
  %46 = load i64, ptr %13, align 8, !tbaa !9
  %47 = load i64, ptr %18, align 8, !tbaa !9
  %48 = icmp sle i64 %46, %47
  br i1 %48, label %49, label %66

49:                                               ; preds = %45
  %50 = load double, ptr %14, align 8, !tbaa !13
  %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 !17
  %54 = load i64, ptr %12, 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 %13, align 8, !tbaa !9
  %58 = getelementptr inbounds double, ptr %56, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !13
  %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 = fadd double %50, %61
  store double %62, ptr %14, align 8, !tbaa !13
  br label %63

63:                                               ; preds = %49
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %13, align 8, !tbaa !9
  br label %45, !llvm.loop !18

66:                                               ; preds = %45
  %67 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = load double, ptr %14, align 8, !tbaa !13
  %71 = fadd double %70, 1.000000e+00
  store double %71, ptr %14, align 8, !tbaa !13
  br label %86

72:                                               ; preds = %66
  %73 = load double, ptr %14, align 8, !tbaa !13
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %74, i32 0, i32 6
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = load i64, ptr %12, align 8, !tbaa !9
  %78 = getelementptr inbounds ptr, ptr %76, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = load i64, ptr %12, align 8, !tbaa !9
  %81 = getelementptr inbounds double, ptr %79, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !13
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %82, ptr noundef %83)
  %85 = fadd double %73, %84
  store double %85, ptr %14, align 8, !tbaa !13
  br label %86

86:                                               ; preds = %72, %69
  %87 = load double, ptr %15, align 8, !tbaa !13
  %88 = load double, ptr %14, align 8, !tbaa !13
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %87, double noundef %88, ptr noundef %89)
  store double %90, ptr %15, align 8, !tbaa !13
  br label %91

91:                                               ; preds = %86
  %92 = load i64, ptr %12, align 8, !tbaa !9
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %12, align 8, !tbaa !9
  br label %27, !llvm.loop !20

94:                                               ; preds = %27
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = load i64, ptr %7, align 8, !tbaa !9
  %97 = load i8, ptr %8, align 1, !tbaa !11, !range !15, !noundef !16
  %98 = trunc i8 %97 to i1
  %99 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %100 = trunc i8 %99 to i1
  %101 = load double, ptr %15, align 8, !tbaa !13
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_rmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %95, i64 noundef %96, i1 noundef zeroext %98, i1 noundef zeroext %100, i1 noundef zeroext false, double noundef %101, ptr noundef %14, ptr noundef %102)
  %103 = load double, ptr %14, align 8, !tbaa !13
  store double %103, ptr %19, align 8, !tbaa !13
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %104)
  %105 = load double, ptr %19, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 64, 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 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  ret double %105
}

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

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

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 = !{!"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 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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.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_impl17rmatrixtrrcondinfEPNS_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.ph45, label %._crit_edge46

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

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

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

._crit_edge.us.us:                                ; preds = %.lr.ph.us.us, %.lr.ph45.split.us.split.us
  %12 = phi double [ 0.000000e+00, %.lr.ph45.split.us.split.us ], [ %22, %.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 %.03542.us.us, double noundef %13, ptr noundef %4)
  %exitcond69.not = icmp eq i64 %11, %1
  br i1 %exitcond69.not, label %._crit_edge46, label %.lr.ph45.split.us.split.us, !llvm.loop !9

.lr.ph.us.us:                                     ; preds = %.lr.ph45.split.us.split.us, %.lr.ph.us.us
  %15 = phi double [ %22, %.lr.ph.us.us ], [ 0.000000e+00, %.lr.ph45.split.us.split.us ]
  %.03640.us.us = phi i64 [ %23, %.lr.ph.us.us ], [ %11, %.lr.ph45.split.us.split.us ]
  %16 = load ptr, ptr %10, align 8, !tbaa !11
  %17 = getelementptr inbounds ptr, ptr %16, i64 %.043.us.us
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = getelementptr inbounds double, ptr %18, i64 %.03640.us.us
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %20, ptr noundef %4)
  %22 = fadd double %15, %21
  %23 = add nuw nsw i64 %.03640.us.us, 1
  %.not.not38.us.us = icmp slt i64 %23, %1
  br i1 %.not.not38.us.us, label %.lr.ph.us.us, label %._crit_edge.us.us, !llvm.loop !14

.lr.ph45.split.us.split:                          ; preds = %.lr.ph45.split.us, %._crit_edge.us
  %.043.us = phi i64 [ %24, %._crit_edge.us ], [ 0, %.lr.ph45.split.us ]
  %.03542.us = phi double [ %27, %._crit_edge.us ], [ 0.000000e+00, %.lr.ph45.split.us ]
  %24 = add nuw nsw i64 %.043.us, 1
  %.not.not3839.us.not = icmp eq i64 %.043.us, 0
  br i1 %.not.not3839.us.not, label %._crit_edge.us, label %.lr.ph.us

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

.lr.ph.us:                                        ; preds = %.lr.ph45.split.us.split, %.lr.ph.us
  %28 = phi double [ %35, %.lr.ph.us ], [ 0.000000e+00, %.lr.ph45.split.us.split ]
  %.03640.us = phi i64 [ %36, %.lr.ph.us ], [ 0, %.lr.ph45.split.us.split ]
  %29 = load ptr, ptr %10, align 8, !tbaa !11
  %30 = getelementptr inbounds ptr, ptr %29, i64 %.043.us
  %31 = load ptr, ptr %30, align 8, !tbaa !12
  %32 = getelementptr inbounds double, ptr %31, i64 %.03640.us
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %33, ptr noundef %4)
  %35 = fadd double %28, %34
  %36 = add nuw nsw i64 %.03640.us, 1
  %exitcond67.not = icmp eq i64 %36, %.043.us
  br i1 %exitcond67.not, label %._crit_edge.us, label %.lr.ph.us, !llvm.loop !14

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

.lr.ph45.split.split.us:                          ; preds = %.lr.ph45.split, %._crit_edge.us53
  %.043.us47 = phi i64 [ %37, %._crit_edge.us53 ], [ 0, %.lr.ph45.split ]
  %.03542.us48 = phi double [ %46, %._crit_edge.us53 ], [ 0.000000e+00, %.lr.ph45.split ]
  %37 = add nuw nsw i64 %.043.us47, 1
  %.not.not3839.us55 = icmp slt i64 %37, %1
  br i1 %.not.not3839.us55, label %.lr.ph.us52, label %._crit_edge.us53

._crit_edge.us53:                                 ; preds = %.lr.ph.us52, %.lr.ph45.split.split.us
  %38 = phi double [ 0.000000e+00, %.lr.ph45.split.split.us ], [ %54, %.lr.ph.us52 ]
  %39 = load ptr, ptr %10, align 8, !tbaa !11
  %40 = getelementptr inbounds ptr, ptr %39, i64 %.043.us47
  %41 = load ptr, ptr %40, align 8, !tbaa !12
  %42 = getelementptr inbounds double, ptr %41, i64 %.043.us47
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %43, ptr noundef %4)
  %45 = fadd double %38, %44
  store double %45, ptr %7, align 8, !tbaa !5
  %46 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03542.us48, double noundef %45, ptr noundef %4)
  %exitcond66.not = icmp eq i64 %37, %1
  br i1 %exitcond66.not, label %._crit_edge46, label %.lr.ph45.split.split.us, !llvm.loop !9

.lr.ph.us52:                                      ; preds = %.lr.ph45.split.split.us, %.lr.ph.us52
  %47 = phi double [ %54, %.lr.ph.us52 ], [ 0.000000e+00, %.lr.ph45.split.split.us ]
  %.03640.us50 = phi i64 [ %55, %.lr.ph.us52 ], [ %37, %.lr.ph45.split.split.us ]
  %48 = load ptr, ptr %10, align 8, !tbaa !11
  %49 = getelementptr inbounds ptr, ptr %48, i64 %.043.us47
  %50 = load ptr, ptr %49, align 8, !tbaa !12
  %51 = getelementptr inbounds double, ptr %50, i64 %.03640.us50
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %52, ptr noundef %4)
  %54 = fadd double %47, %53
  %55 = add nuw nsw i64 %.03640.us50, 1
  %.not.not38.us51 = icmp slt i64 %55, %1
  br i1 %.not.not38.us51, label %.lr.ph.us52, label %._crit_edge.us53, !llvm.loop !14

.lr.ph45.split.split:                             ; preds = %.lr.ph45.split, %._crit_edge
  %.043 = phi i64 [ %56, %._crit_edge ], [ 0, %.lr.ph45.split ]
  %.03542 = phi double [ %74, %._crit_edge ], [ 0.000000e+00, %.lr.ph45.split ]
  %56 = add nuw nsw i64 %.043, 1
  %.not.not3839.not = icmp eq i64 %.043, 0
  br i1 %.not.not3839.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph45.split.split, %.lr.ph
  %57 = phi double [ %64, %.lr.ph ], [ 0.000000e+00, %.lr.ph45.split.split ]
  %.03640 = phi i64 [ %65, %.lr.ph ], [ 0, %.lr.ph45.split.split ]
  %58 = load ptr, ptr %10, align 8, !tbaa !11
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.043
  %60 = load ptr, ptr %59, align 8, !tbaa !12
  %61 = getelementptr inbounds double, ptr %60, i64 %.03640
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %62, ptr noundef %4)
  %64 = fadd double %57, %63
  %65 = add nuw nsw i64 %.03640, 1
  %exitcond.not = icmp eq i64 %65, %.043
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph45.split.split
  %66 = phi double [ 0.000000e+00, %.lr.ph45.split.split ], [ %64, %.lr.ph ]
  %67 = load ptr, ptr %10, align 8, !tbaa !11
  %68 = getelementptr inbounds ptr, ptr %67, i64 %.043
  %69 = load ptr, ptr %68, align 8, !tbaa !12
  %70 = getelementptr inbounds double, ptr %69, i64 %.043
  %71 = load double, ptr %70, align 8, !tbaa !5
  %72 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %71, ptr noundef %4)
  %73 = fadd double %66, %72
  store double %73, ptr %7, align 8, !tbaa !5
  %74 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.03542, double noundef %73, ptr noundef %4)
  %exitcond65.not = icmp eq i64 %56, %1
  br i1 %exitcond65.not, label %._crit_edge46, label %.lr.ph45.split.split, !llvm.loop !9

._crit_edge46:                                    ; preds = %._crit_edge, %._crit_edge.us53, %._crit_edge.us, %._crit_edge.us.us, %5
  %.035.lcssa = phi double [ 0.000000e+00, %5 ], [ %14, %._crit_edge.us.us ], [ %27, %._crit_edge.us ], [ %46, %._crit_edge.us53 ], [ %74, %._crit_edge ]
  call void @_ZN11alglib_implL28rcond_rmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext false, double noundef %.035.lcssa, ptr noundef nonnull %7, ptr noundef %4)
  %75 = 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 %75
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28rcond_rmatrixrcondtrinternalEPNS_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