; 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.262 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.263 = external hidden unnamed_addr constant [25 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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) #2

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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_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 void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(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_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) #2

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

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

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

31:                                               ; preds = %26
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %32

32:                                               ; preds = %52, %31
  %33 = load i64, ptr %14, align 8, !tbaa !9
  %34 = load i64, ptr %8, align 8, !tbaa !9
  %35 = sub nsw i64 %34, 1
  %36 = icmp sle i64 %33, %35
  br i1 %36, label %37, label %55

37:                                               ; preds = %32
  %38 = load double, ptr %15, align 8, !tbaa !11
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %39, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  %42 = load i64, ptr %13, align 8, !tbaa !9
  %43 = getelementptr inbounds ptr, ptr %41, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = load i64, ptr %14, align 8, !tbaa !9
  %46 = getelementptr inbounds double, ptr %44, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %47, ptr noundef %48)
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %38, double noundef %49, ptr noundef %50)
  store double %51, ptr %15, align 8, !tbaa !11
  br label %52

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

55:                                               ; preds = %32
  br label %56

56:                                               ; preds = %55
  %57 = load i64, ptr %13, align 8, !tbaa !9
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %13, align 8, !tbaa !9
  br label %26, !llvm.loop !16

59:                                               ; preds = %26
  %60 = load double, ptr %15, align 8, !tbaa !11
  %61 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %60, double noundef 0.000000e+00)
  br i1 %61, label %62, label %86

62:                                               ; preds = %59
  %63 = load double, ptr %15, align 8, !tbaa !11
  %64 = fdiv double 1.000000e+00, %63
  store double %64, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %82, %62
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = load i64, ptr %7, align 8, !tbaa !9
  %68 = sub nsw i64 %67, 1
  %69 = icmp sle i64 %66, %68
  br i1 %69, label %70, label %85

70:                                               ; preds = %65
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %71, i32 0, i32 6
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = load i64, ptr %13, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %73, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds double, ptr %76, i64 0
  %78 = load i64, ptr %8, align 8, !tbaa !9
  %79 = sub nsw i64 %78, 1
  %80 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %79)
  %81 = load double, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %77, i64 noundef 1, i64 noundef %80, double noundef %81)
  br label %82

82:                                               ; preds = %70
  %83 = load i64, ptr %13, align 8, !tbaa !9
  %84 = add nsw i64 %83, 1
  store i64 %84, ptr %13, align 8, !tbaa !9
  br label %65, !llvm.loop !17

85:                                               ; preds = %65
  br label %86

86:                                               ; preds = %85, %59
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load i64, ptr %7, align 8, !tbaa !9
  %89 = load i64, ptr %8, align 8, !tbaa !9
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %88, i64 noundef %89, ptr noundef %90)
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %87, i64 noundef %91, ptr noundef %92)
  %93 = load i64, ptr %7, align 8, !tbaa !9
  %94 = load i64, ptr %8, align 8, !tbaa !9
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %93, i64 noundef %94, ptr noundef %95)
  %97 = mul nsw i64 2, %96
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %97, ptr noundef %98)
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load i64, ptr %7, align 8, !tbaa !9
  %101 = load i64, ptr %8, align 8, !tbaa !9
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13rmatrixluprecEPNS_9ae_matrixElllPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %99, i64 noundef 0, i64 noundef %100, i64 noundef %101, ptr noundef %102, ptr noundef %12, ptr noundef %103)
  %104 = load double, ptr %15, align 8, !tbaa !11
  %105 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %104, double noundef 0.000000e+00)
  br i1 %105, label %106, label %132

106:                                              ; preds = %86
  %107 = load double, ptr %15, align 8, !tbaa !11
  store double %107, ptr %16, align 8, !tbaa !11
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %128, %106
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = load i64, ptr %7, align 8, !tbaa !9
  %111 = sub nsw i64 %110, 1
  %112 = icmp sle i64 %109, %111
  br i1 %112, label %113, label %131

113:                                              ; preds = %108
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = load i64, ptr %13, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %116, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 0
  %121 = load i64, ptr %13, align 8, !tbaa !9
  %122 = load i64, ptr %8, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %121, i64 noundef %123, ptr noundef %124)
  %126 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %125)
  %127 = load double, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %120, i64 noundef 1, i64 noundef %126, double noundef %127)
  br label %128

128:                                              ; preds = %113
  %129 = load i64, ptr %13, align 8, !tbaa !9
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %13, align 8, !tbaa !9
  br label %108, !llvm.loop !18

131:                                              ; preds = %108
  br label %132

132:                                              ; preds = %131, %86
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %133)
  call void @llvm.lifetime.end.p0(i64 8, 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 64, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  ret void
}

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 = !{!"double", !7, i64 0}
!13 = !{!7, !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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.262 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.263 = external hidden unnamed_addr constant [25 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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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_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 void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(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_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10rmatrixlupEPNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = 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 64, ptr nonnull %7) #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) %7, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %8 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.262, ptr noundef %4)
  %9 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.263, ptr noundef %4)
  br i1 %8, label %.preheader61.lr.ph, label %._crit_edge68.thread

.preheader61.lr.ph:                               ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %9, label %.preheader61.us, label %._crit_edge68.thread83

.preheader61.us:                                  ; preds = %.preheader61.lr.ph, %._crit_edge.us
  %.067.us = phi double [ %18, %._crit_edge.us ], [ 0.000000e+00, %.preheader61.lr.ph ]
  %.05466.us = phi i64 [ %20, %._crit_edge.us ], [ 0, %.preheader61.lr.ph ]
  br label %11

11:                                               ; preds = %.preheader61.us, %11
  %.164.us = phi double [ %.067.us, %.preheader61.us ], [ %18, %11 ]
  %.05363.us = phi i64 [ 0, %.preheader61.us ], [ %19, %11 ]
  %12 = load ptr, ptr %10, align 8, !tbaa !5
  %13 = getelementptr inbounds ptr, ptr %12, i64 %.05466.us
  %14 = load ptr, ptr %13, align 8, !tbaa !8
  %15 = getelementptr inbounds double, ptr %14, i64 %.05363.us
  %16 = load double, ptr %15, align 8, !tbaa !10
  %17 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %16, ptr noundef %4)
  %18 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.164.us, double noundef %17, ptr noundef %4)
  %19 = add nuw nsw i64 %.05363.us, 1
  %exitcond.not = icmp eq i64 %19, %2
  br i1 %exitcond.not, label %._crit_edge.us, label %11, !llvm.loop !12

._crit_edge.us:                                   ; preds = %11
  %20 = add nuw nsw i64 %.05466.us, 1
  %exitcond76.not = icmp eq i64 %20, %1
  br i1 %exitcond76.not, label %._crit_edge68, label %.preheader61.us, !llvm.loop !14

._crit_edge68:                                    ; preds = %._crit_edge.us
  %21 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %18, double noundef 0.000000e+00)
  br i1 %21, label %24, label %.loopexit60

._crit_edge68.thread83:                           ; preds = %.preheader61.lr.ph
  %22 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef 0.000000e+00, double noundef 0.000000e+00)
  br i1 %22, label %.lr.ph, label %.loopexit60

._crit_edge68.thread:                             ; preds = %5
  %23 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef 0.000000e+00, double noundef 0.000000e+00)
  br label %.loopexit60

24:                                               ; preds = %._crit_edge68
  %25 = fdiv double 1.000000e+00, %18
  br i1 %8, label %.lr.ph, label %.loopexit60

.lr.ph:                                           ; preds = %._crit_edge68.thread83, %24
  %26 = phi double [ %25, %24 ], [ 0x7FF0000000000000, %._crit_edge68.thread83 ]
  %.0.lcssa8187 = phi double [ %18, %24 ], [ 0.000000e+00, %._crit_edge68.thread83 ]
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  %28 = add nsw i64 %2, -1
  br label %29

29:                                               ; preds = %.lr.ph, %29
  %.15571 = phi i64 [ 0, %.lr.ph ], [ %34, %29 ]
  %30 = load ptr, ptr %27, align 8, !tbaa !5
  %31 = getelementptr inbounds ptr, ptr %30, i64 %.15571
  %32 = load ptr, ptr %31, align 8, !tbaa !8
  %33 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %28)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %32, i64 noundef 1, i64 noundef %33, double noundef %26)
  %34 = add nuw nsw i64 %.15571, 1
  %exitcond77.not = icmp eq i64 %34, %1
  br i1 %exitcond77.not, label %.loopexit60, label %29, !llvm.loop !15

.loopexit60:                                      ; preds = %29, %._crit_edge68.thread, %._crit_edge68.thread83, %24, %._crit_edge68
  %.0.lcssa80 = phi double [ %18, %24 ], [ %18, %._crit_edge68 ], [ 0.000000e+00, %._crit_edge68.thread83 ], [ 0.000000e+00, %._crit_edge68.thread ], [ %.0.lcssa8187, %29 ]
  %35 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %35, ptr noundef %4)
  %36 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %1, i64 noundef %2, ptr noundef %4)
  %37 = shl nsw i64 %36, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %37, ptr noundef %4)
  call void @_ZN11alglib_impl13rmatrixluprecEPNS_9ae_matrixElllPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %0, i64 noundef 0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef nonnull %7, ptr noundef %4)
  %38 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %.0.lcssa80, double noundef 0.000000e+00)
  %or.cond = and i1 %38, %8
  br i1 %or.cond, label %.lr.ph74, label %.loopexit

.lr.ph74:                                         ; preds = %.loopexit60
  %39 = getelementptr inbounds i8, ptr %0, i64 72
  %40 = add nsw i64 %2, -1
  br label %41

41:                                               ; preds = %.lr.ph74, %41
  %.273 = phi i64 [ 0, %.lr.ph74 ], [ %47, %41 ]
  %42 = load ptr, ptr %39, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %42, i64 %.273
  %44 = load ptr, ptr %43, align 8, !tbaa !8
  %45 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %.273, i64 noundef %40, ptr noundef %4)
  %46 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %45)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %44, i64 noundef 1, i64 noundef %46, double noundef %.0.lcssa80)
  %47 = add nuw nsw i64 %.273, 1
  %exitcond78.not = icmp eq i64 %47, %1
  br i1 %exitcond78.not, label %.loopexit, label %41, !llvm.loop !16

.loopexit:                                        ; preds = %41, %.loopexit60
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret void
}

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


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