; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { 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.270 = 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 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
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_impl13rmatrixrcond1EPNS_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_matrixES1_PNS_8ae_stateEb(ptr noundef %8, ptr noundef %17, ptr noundef %18, i1 noundef zeroext true)
  store ptr %8, ptr %4, align 8, !tbaa !5
  %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.270, 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 = %77, %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 %80

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

46:                                               ; preds = %73, %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 %76

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 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %57, 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 double, ptr %62, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !12
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %65, ptr noundef %66)
  %68 = fadd double %56, %67
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = load i64, ptr %10, align 8, !tbaa !9
  %72 = getelementptr inbounds double, ptr %70, i64 %71
  store double %68, ptr %72, align 8, !tbaa !12
  br label %73

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

76:                                               ; preds = %46
  br label %77

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

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

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

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

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

98:                                               ; preds = %81
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load i64, ptr %5, align 8, !tbaa !9
  %101 = load i64, ptr %5, align 8, !tbaa !9
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9rmatrixluEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %99, i64 noundef %100, i64 noundef %101, ptr noundef %13, ptr noundef %102)
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = load i64, ptr %5, align 8, !tbaa !9
  %105 = load double, ptr %12, align 8, !tbaa !12
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_rmatrixrcondluinternalEPNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef %103, i64 noundef %104, i1 noundef zeroext true, i1 noundef zeroext true, double noundef %105, ptr noundef %11, ptr noundef %106)
  %107 = load double, ptr %11, align 8, !tbaa !12
  store double %107, ptr %15, align 8, !tbaa !12
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %108)
  %109 = 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 %109
}

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare 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_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28rcond_rmatrixrcondluinternalEPNS_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.1 }
%union.anon.1 = type { 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.270 = 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 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
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_impl13rmatrixrcond1EPNS_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_matrixES1_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.270, 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 %.preheader47.unr-lcssa, label %.lr.ph.new

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

.preheader47.unr-lcssa:                           ; preds = %32, %.lr.ph
  %.04149.unr = phi i64 [ 0, %.lr.ph ], [ %44, %32 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader47, label %.epil.preheader

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

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

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

.preheader46.us:                                  ; preds = %._crit_edge.us, %.preheader46.lr.ph
  %.154.us = phi i64 [ 0, %.preheader46.lr.ph ], [ %31, %._crit_edge.us ]
  br label %17

17:                                               ; preds = %.preheader46.us, %17
  %.04051.us = phi i64 [ 0, %.preheader46.us ], [ %30, %17 ]
  %18 = load ptr, ptr %15, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 %.04051.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 %.154.us
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = getelementptr inbounds double, ptr %23, i64 %.04051.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 %.04051.us
  store double %27, ptr %29, align 8, !tbaa !8
  %30 = add nuw nsw i64 %.04051.us, 1
  %exitcond59.not = icmp eq i64 %30, %1
  br i1 %exitcond59.not, label %._crit_edge.us, label %17, !llvm.loop !14

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

32:                                               ; preds = %32, %.lr.ph.new
  %.04149 = 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 %.04149
  store double 0.000000e+00, ptr %34, align 8, !tbaa !8
  %35 = or disjoint i64 %.04149, 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 %.04149, 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 %.04149, 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 %.04149, 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 %.preheader47.unr-lcssa, label %32, !llvm.loop !17

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

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

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

._crit_edge:                                      ; preds = %46, %3, %.preheader47, %.preheader
  %.0.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader47 ], [ 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_rmatrixrcondluinternalEPNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef nonnull %5, i64 noundef %1, i1 noundef zeroext true, i1 noundef zeroext true, double noundef %.0.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 void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare 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_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_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_rmatrixrcondluinternalEPNS_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