; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src/linalg.ll (ZN11alglib_impl13rmatrixrcond1EPKNS_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 }

@.str.443 = 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: 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) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl13rmatrixrcond1EPKNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2) #3 {
  %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
  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) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %16, 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)
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = 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 %17, ptr noundef %18, i1 noundef zeroext true)
  %19 = 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 %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 %14, i64 noundef 0, i64 noundef 3, ptr noundef %20, i1 noundef zeroext true)
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = icmp sge i64 %21, 1
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef @.str.443, ptr noundef %23)
  %24 = load i64, ptr %5, align 8, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %24, ptr noundef %25)
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %26

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

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

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

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

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

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

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

51:                                               ; preds = %46
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = getelementptr inbounds double, ptr %53, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !12
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %8, i32 0, i32 6
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load i64, ptr %9, align 8, !tbaa !9
  %60 = getelementptr inbounds ptr, ptr %58, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = getelementptr inbounds double, ptr %61, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !12
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %64, ptr noundef %65)
  %67 = fadd double %56, %66
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = load i64, ptr %10, align 8, !tbaa !9
  %71 = getelementptr inbounds double, ptr %69, i64 %70
  store double %67, ptr %71, align 8, !tbaa !12
  br label %72

72:                                               ; preds = %51
  %73 = load i64, ptr %10, align 8, !tbaa !9
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %10, align 8, !tbaa !9
  br label %46, !llvm.loop !16

75:                                               ; preds = %46
  br label %76

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

79:                                               ; preds = %40
  store double 0.000000e+00, ptr %12, align 8, !tbaa !12
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %94, %79
  %81 = load i64, ptr %9, align 8, !tbaa !9
  %82 = load i64, ptr %5, align 8, !tbaa !9
  %83 = sub nsw i64 %82, 1
  %84 = icmp sle i64 %81, %83
  br i1 %84, label %85, label %97

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

94:                                               ; preds = %85
  %95 = load i64, ptr %9, align 8, !tbaa !9
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %9, align 8, !tbaa !9
  br label %80, !llvm.loop !18

97:                                               ; preds = %80
  %98 = load i64, ptr %5, align 8, !tbaa !9
  %99 = load i64, ptr %5, align 8, !tbaa !9
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9rmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %8, i64 noundef %98, i64 noundef %99, ptr noundef %13, ptr noundef %100)
  %101 = load i64, ptr %5, align 8, !tbaa !9
  %102 = load double, ptr %12, align 8, !tbaa !12
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_rmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef %8, i64 noundef %101, i1 noundef zeroext true, i1 noundef zeroext true, double noundef %102, ptr noundef %11, ptr noundef %103)
  %104 = load double, ptr %11, align 8, !tbaa !12
  store double %104, ptr %15, align 8, !tbaa !12
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %105)
  %106 = load double, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  ret double %106
}

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

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

declare void @_ZN11alglib_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 void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28rcond_rmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_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 }

@.str.443 = 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_impl9rmatrixluEPNS_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_impl13rmatrixrcond1EPKNS_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.443, 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 %32

.preheader44.unr-lcssa:                           ; preds = %32, %.lr.ph
  %.046.unr = phi i64 [ 0, %.lr.ph ], [ %44, %32 ]
  %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 ], [ %31, %._crit_edge.us ]
  br label %17

17:                                               ; preds = %.preheader43.us, %17
  %.03848.us = phi i64 [ 0, %.preheader43.us ], [ %30, %17 ]
  %18 = load ptr, ptr %15, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 %.03848.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 double, ptr %23, i64 %.03848.us
  %25 = load double, ptr %24, align 8, !tbaa !8
  %26 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %25, ptr noundef %2)
  %27 = fadd double %20, %26
  %28 = load ptr, ptr %15, align 8, !tbaa !5
  %29 = getelementptr inbounds double, ptr %28, i64 %.03848.us
  store double %27, ptr %29, align 8, !tbaa !8
  %30 = add nuw nsw i64 %.03848.us, 1
  %exitcond56.not = icmp eq i64 %30, %1
  br i1 %exitcond56.not, label %._crit_edge.us, label %17, !llvm.loop !14

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

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

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

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

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

._crit_edge:                                      ; preds = %46, %3, %.preheader44, %.preheader
  %.037.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader44 ], [ 0.000000e+00, %3 ], [ %50, %46 ]
  call void @_ZN11alglib_impl9rmatrixluEPNS_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_rmatrixrcondluinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef nonnull %5, i64 noundef %1, i1 noundef zeroext true, i1 noundef zeroext true, double noundef %.037.lcssa, ptr noundef nonnull %6, ptr noundef %2)
  %52 = 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 %52
}

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

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

declare void @_ZN11alglib_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

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