; 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.272 = external hidden unnamed_addr constant [22 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_impl15rmatrixtrrcond1EPNS_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 %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  %21 = zext i1 %2 to i8
  store i8 %21, ptr %8, align 1, !tbaa !11
  %22 = zext i1 %3 to i8
  store i8 %22, 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 64, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %23, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  %24 = 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 %24, i1 noundef zeroext true)
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 3, ptr noundef %25, i1 noundef zeroext true)
  %26 = load i64, ptr %7, align 8, !tbaa !9
  %27 = icmp sge i64 %26, 1
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.272, ptr noundef %28)
  %29 = load i64, ptr %7, align 8, !tbaa !9
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %29, ptr noundef %30)
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %41, %5
  %32 = load i64, ptr %12, align 8, !tbaa !9
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = sub nsw i64 %33, 1
  %35 = icmp sle i64 %32, %34
  br i1 %35, label %36, label %44

36:                                               ; preds = %31
  %37 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = load i64, ptr %12, align 8, !tbaa !9
  %40 = getelementptr inbounds double, ptr %38, i64 %39
  store double 0.000000e+00, ptr %40, align 8, !tbaa !14
  br label %41

41:                                               ; preds = %36
  %42 = load i64, ptr %12, align 8, !tbaa !9
  %43 = add nsw i64 %42, 1
  store i64 %43, ptr %12, align 8, !tbaa !9
  br label %31, !llvm.loop !16

44:                                               ; preds = %31
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %129, %44
  %46 = load i64, ptr %12, align 8, !tbaa !9
  %47 = load i64, ptr %7, align 8, !tbaa !9
  %48 = sub nsw i64 %47, 1
  %49 = icmp sle i64 %46, %48
  br i1 %49, label %50, label %132

50:                                               ; preds = %45
  %51 = load i8, ptr %8, align 1, !tbaa !11, !range !18, !noundef !19
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %58

53:                                               ; preds = %50
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %18, align 8, !tbaa !9
  %56 = load i64, ptr %7, align 8, !tbaa !9
  %57 = sub nsw i64 %56, 1
  store i64 %57, ptr %19, align 8, !tbaa !9
  br label %61

58:                                               ; preds = %50
  store i64 0, ptr %18, align 8, !tbaa !9
  %59 = load i64, ptr %12, align 8, !tbaa !9
  %60 = sub nsw i64 %59, 1
  store i64 %60, ptr %19, align 8, !tbaa !9
  br label %61

61:                                               ; preds = %58, %53
  %62 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %62, ptr %13, align 8, !tbaa !9
  br label %63

63:                                               ; preds = %89, %61
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = load i64, ptr %19, align 8, !tbaa !9
  %66 = icmp sle i64 %64, %65
  br i1 %66, label %67, label %92

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

89:                                               ; preds = %67
  %90 = load i64, ptr %13, align 8, !tbaa !9
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %13, align 8, !tbaa !9
  br label %63, !llvm.loop !20

92:                                               ; preds = %63
  %93 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %106

95:                                               ; preds = %92
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !13
  %98 = load i64, ptr %12, align 8, !tbaa !9
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !14
  %101 = fadd double %100, 1.000000e+00
  %102 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = load i64, ptr %12, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  store double %101, ptr %105, align 8, !tbaa !14
  br label %128

106:                                              ; preds = %92
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = getelementptr inbounds double, ptr %108, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !14
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %112, i32 0, i32 6
  %114 = load ptr, ptr %113, align 8, !tbaa !13
  %115 = load i64, ptr %12, align 8, !tbaa !9
  %116 = getelementptr inbounds ptr, ptr %114, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !14
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %120, ptr noundef %121)
  %123 = fadd double %111, %122
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !13
  %126 = load i64, ptr %12, align 8, !tbaa !9
  %127 = getelementptr inbounds double, ptr %125, i64 %126
  store double %123, ptr %127, align 8, !tbaa !14
  br label %128

128:                                              ; preds = %106, %95
  br label %129

129:                                              ; preds = %128
  %130 = load i64, ptr %12, align 8, !tbaa !9
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %12, align 8, !tbaa !9
  br label %45, !llvm.loop !21

132:                                              ; preds = %45
  store double 0.000000e+00, ptr %15, align 8, !tbaa !14
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %133

133:                                              ; preds = %147, %132
  %134 = load i64, ptr %12, align 8, !tbaa !9
  %135 = load i64, ptr %7, align 8, !tbaa !9
  %136 = sub nsw i64 %135, 1
  %137 = icmp sle i64 %134, %136
  br i1 %137, label %138, label %150

138:                                              ; preds = %133
  %139 = load double, ptr %15, align 8, !tbaa !14
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !13
  %142 = load i64, ptr %12, align 8, !tbaa !9
  %143 = getelementptr inbounds double, ptr %141, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !14
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %139, double noundef %144, ptr noundef %145)
  store double %146, ptr %15, align 8, !tbaa !14
  br label %147

147:                                              ; preds = %138
  %148 = load i64, ptr %12, align 8, !tbaa !9
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %12, align 8, !tbaa !9
  br label %133, !llvm.loop !22

150:                                              ; preds = %133
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = load i64, ptr %7, align 8, !tbaa !9
  %153 = load i8, ptr %8, align 1, !tbaa !11, !range !18, !noundef !19
  %154 = trunc i8 %153 to i1
  %155 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %156 = trunc i8 %155 to i1
  %157 = load double, ptr %15, align 8, !tbaa !14
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_rmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %151, i64 noundef %152, i1 noundef zeroext %154, i1 noundef zeroext %156, i1 noundef zeroext true, double noundef %157, ptr noundef %14, ptr noundef %158)
  %159 = load double, ptr %14, align 8, !tbaa !14
  store double %159, ptr %20, align 8, !tbaa !14
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %160)
  %161 = load double, ptr %20, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  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 64, 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 %161
}

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

; 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 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


; 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.272 = external hidden unnamed_addr constant [22 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_impl15rmatrixtrrcond1EPNS_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
  %9 = 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 @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #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 @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, 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)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %10 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.272, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %1, ptr noundef %4)
  br i1 %10, label %.lr.ph, label %._crit_edge71

.lr.ph:                                           ; preds = %5
  %11 = getelementptr inbounds i8, ptr %9, i64 56
  %xtraiter = and i64 %1, 3
  %12 = icmp ult i64 %1, 4
  br i1 %12, label %.preheader58.unr-lcssa, label %.lr.ph.new

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

.preheader58.unr-lcssa:                           ; preds = %36, %.lr.ph
  %.060.unr = phi i64 [ 0, %.lr.ph ], [ %48, %36 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader58, label %.epil.preheader

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

.preheader58:                                     ; preds = %.epil.preheader, %.preheader58.unr-lcssa
  br i1 %10, label %.lr.ph66, label %._crit_edge71

.lr.ph66:                                         ; preds = %.preheader58
  %16 = getelementptr inbounds i8, ptr %9, i64 56
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %3, label %.lr.ph66.split.us, label %.lr.ph66.split

.lr.ph66.split.us:                                ; preds = %.lr.ph66, %._crit_edge.us
  %.165.us = phi i64 [ %18, %._crit_edge.us ], [ 0, %.lr.ph66 ]
  %18 = add nuw nsw i64 %.165.us, 1
  %.051.us = select i1 %2, i64 %18, i64 0
  %.050.in.us = select i1 %2, i64 %1, i64 %.165.us
  %.not.not5761.us = icmp slt i64 %.051.us, %.050.in.us
  br i1 %.not.not5761.us, label %.lr.ph63.us, label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.lr.ph63.us, %.lr.ph66.split.us
  %19 = load ptr, ptr %16, align 8, !tbaa !5
  %20 = getelementptr inbounds double, ptr %19, i64 %.165.us
  %21 = load double, ptr %20, align 8, !tbaa !8
  %22 = fadd double %21, 1.000000e+00
  store double %22, ptr %20, align 8, !tbaa !8
  %exitcond76.not = icmp eq i64 %18, %1
  br i1 %exitcond76.not, label %.preheader, label %.lr.ph66.split.us, !llvm.loop !12

.lr.ph63.us:                                      ; preds = %.lr.ph66.split.us, %.lr.ph63.us
  %.05362.us = phi i64 [ %35, %.lr.ph63.us ], [ %.051.us, %.lr.ph66.split.us ]
  %23 = load ptr, ptr %16, align 8, !tbaa !5
  %24 = getelementptr inbounds double, ptr %23, i64 %.05362.us
  %25 = load double, ptr %24, align 8, !tbaa !8
  %26 = load ptr, ptr %17, align 8, !tbaa !5
  %27 = getelementptr inbounds ptr, ptr %26, i64 %.165.us
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  %29 = getelementptr inbounds double, ptr %28, i64 %.05362.us
  %30 = load double, ptr %29, align 8, !tbaa !8
  %31 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %30, ptr noundef %4)
  %32 = fadd double %25, %31
  %33 = load ptr, ptr %16, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %33, i64 %.05362.us
  store double %32, ptr %34, align 8, !tbaa !8
  %35 = add nuw i64 %.05362.us, 1
  %exitcond75.not = icmp eq i64 %35, %.050.in.us
  br i1 %exitcond75.not, label %._crit_edge.us, label %.lr.ph63.us, !llvm.loop !16

36:                                               ; preds = %36, %.lr.ph.new
  %.060 = phi i64 [ 0, %.lr.ph.new ], [ %48, %36 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %36 ]
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds double, ptr %37, i64 %.060
  store double 0.000000e+00, ptr %38, align 8, !tbaa !8
  %39 = or disjoint i64 %.060, 1
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %40, i64 %39
  store double 0.000000e+00, ptr %41, align 8, !tbaa !8
  %42 = or disjoint i64 %.060, 2
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = getelementptr inbounds double, ptr %43, i64 %42
  store double 0.000000e+00, ptr %44, align 8, !tbaa !8
  %45 = or disjoint i64 %.060, 3
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %46, i64 %45
  store double 0.000000e+00, ptr %47, align 8, !tbaa !8
  %48 = add nuw nsw i64 %.060, 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 %.preheader58.unr-lcssa, label %36, !llvm.loop !17

.preheader:                                       ; preds = %._crit_edge, %._crit_edge.us
  br i1 %10, label %.lr.ph70, label %._crit_edge71

.lr.ph70:                                         ; preds = %.preheader
  %49 = getelementptr inbounds i8, ptr %9, i64 56
  br label %76

.lr.ph66.split:                                   ; preds = %.lr.ph66, %._crit_edge
  %.165 = phi i64 [ %50, %._crit_edge ], [ 0, %.lr.ph66 ]
  %50 = add nuw nsw i64 %.165, 1
  %.051 = select i1 %2, i64 %50, i64 0
  %.050.in = select i1 %2, i64 %1, i64 %.165
  %.not.not5761 = icmp slt i64 %.051, %.050.in
  br i1 %.not.not5761, label %.lr.ph63, label %._crit_edge

.lr.ph63:                                         ; preds = %.lr.ph66.split, %.lr.ph63
  %.05362 = phi i64 [ %63, %.lr.ph63 ], [ %.051, %.lr.ph66.split ]
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i64 %.05362
  %53 = load double, ptr %52, align 8, !tbaa !8
  %54 = load ptr, ptr %17, align 8, !tbaa !5
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.165
  %56 = load ptr, ptr %55, align 8, !tbaa !14
  %57 = getelementptr inbounds double, ptr %56, i64 %.05362
  %58 = load double, ptr %57, align 8, !tbaa !8
  %59 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %58, ptr noundef %4)
  %60 = fadd double %53, %59
  %61 = load ptr, ptr %16, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %61, i64 %.05362
  store double %60, ptr %62, align 8, !tbaa !8
  %63 = add nuw i64 %.05362, 1
  %exitcond73.not = icmp eq i64 %63, %.050.in
  br i1 %exitcond73.not, label %._crit_edge, label %.lr.ph63, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph63, %.lr.ph66.split
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %64, i64 %.165
  %66 = load double, ptr %65, align 8, !tbaa !8
  %67 = load ptr, ptr %17, align 8, !tbaa !5
  %68 = getelementptr inbounds ptr, ptr %67, i64 %.165
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = getelementptr inbounds double, ptr %69, i64 %.165
  %71 = load double, ptr %70, align 8, !tbaa !8
  %72 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %71, ptr noundef %4)
  %73 = fadd double %66, %72
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 %.165
  store double %73, ptr %75, align 8, !tbaa !8
  %exitcond74.not = icmp eq i64 %50, %1
  br i1 %exitcond74.not, label %.preheader, label %.lr.ph66.split, !llvm.loop !12

76:                                               ; preds = %.lr.ph70, %76
  %.269 = phi i64 [ 0, %.lr.ph70 ], [ %81, %76 ]
  %.05268 = phi double [ 0.000000e+00, %.lr.ph70 ], [ %80, %76 ]
  %77 = load ptr, ptr %49, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 %.269
  %79 = load double, ptr %78, align 8, !tbaa !8
  %80 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.05268, double noundef %79, ptr noundef %4)
  %81 = add nuw nsw i64 %.269, 1
  %exitcond77.not = icmp eq i64 %81, %1
  br i1 %exitcond77.not, label %._crit_edge71, label %76, !llvm.loop !18

._crit_edge71:                                    ; preds = %76, %5, %.preheader58, %.preheader
  %.052.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader58 ], [ 0.000000e+00, %5 ], [ %80, %76 ]
  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 true, double noundef %.052.lcssa, ptr noundef nonnull %7, ptr noundef %4)
  %82 = load double, ptr %7, align 8, !tbaa !8
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #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 %82
}

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

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


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