; 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_complex" = type { double, double }
%"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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl15cmatrixtrrcond1EPNS_9ae_matrixElbbPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, ptr noundef %4) #4 {
  %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
  %21 = alloca %"struct.alglib_impl::ae_complex", align 8
  %22 = alloca %"struct.alglib_impl::ae_complex", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  %23 = zext i1 %2 to i8
  store i8 %23, ptr %8, align 1, !tbaa !11
  %24 = zext i1 %3 to i8
  store i8 %24, 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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %25, 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)
  %26 = 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 %26, i1 noundef zeroext true)
  %27 = 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 %27, i1 noundef zeroext true)
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = icmp sge i64 %28, 1
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef @.str.272, ptr noundef %30)
  %31 = load i64, ptr %7, align 8, !tbaa !9
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %31, ptr noundef %32)
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %43, %5
  %34 = load i64, ptr %12, align 8, !tbaa !9
  %35 = load i64, ptr %7, align 8, !tbaa !9
  %36 = sub nsw i64 %35, 1
  %37 = icmp sle i64 %34, %36
  br i1 %37, label %38, label %46

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

43:                                               ; preds = %38
  %44 = load i64, ptr %12, align 8, !tbaa !9
  %45 = add nsw i64 %44, 1
  store i64 %45, ptr %12, align 8, !tbaa !9
  br label %33, !llvm.loop !16

46:                                               ; preds = %33
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %137, %46
  %48 = load i64, ptr %12, align 8, !tbaa !9
  %49 = load i64, ptr %7, align 8, !tbaa !9
  %50 = sub nsw i64 %49, 1
  %51 = icmp sle i64 %48, %50
  br i1 %51, label %52, label %140

52:                                               ; preds = %47
  %53 = load i8, ptr %8, align 1, !tbaa !11, !range !18, !noundef !19
  %54 = trunc i8 %53 to i1
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load i64, ptr %12, align 8, !tbaa !9
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %18, align 8, !tbaa !9
  %58 = load i64, ptr %7, align 8, !tbaa !9
  %59 = sub nsw i64 %58, 1
  store i64 %59, ptr %19, align 8, !tbaa !9
  br label %63

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

63:                                               ; preds = %60, %55
  %64 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %64, ptr %13, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %94, %63
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = load i64, ptr %19, align 8, !tbaa !9
  %68 = icmp sle i64 %66, %67
  br i1 %68, label %69, label %97

69:                                               ; preds = %65
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !13
  %72 = load i64, ptr %13, align 8, !tbaa !9
  %73 = getelementptr inbounds double, ptr %71, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !14
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %75, i32 0, i32 6
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = load i64, ptr %12, align 8, !tbaa !9
  %79 = getelementptr inbounds ptr, ptr %77, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i64, ptr %13, align 8, !tbaa !9
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %80, i64 %81
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %82, i64 16, i1 false), !tbaa.struct !20
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %85 = load double, ptr %84, align 8
  %86 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %87 = load double, ptr %86, align 8
  %88 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %85, double %87, ptr noundef %83)
  %89 = fadd double %74, %88
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = load i64, ptr %13, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  store double %89, ptr %93, align 8, !tbaa !14
  br label %94

94:                                               ; preds = %69
  %95 = load i64, ptr %13, align 8, !tbaa !9
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %13, align 8, !tbaa !9
  br label %65, !llvm.loop !21

97:                                               ; preds = %65
  %98 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %111

100:                                              ; preds = %97
  %101 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !13
  %103 = load i64, ptr %12, align 8, !tbaa !9
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !14
  %106 = fadd double %105, 1.000000e+00
  %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
  store double %106, ptr %110, align 8, !tbaa !14
  br label %136

111:                                              ; preds = %97
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = load i64, ptr %12, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !14
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %117, i32 0, i32 6
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %120 = load i64, ptr %12, align 8, !tbaa !9
  %121 = getelementptr inbounds ptr, ptr %119, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = load i64, ptr %12, align 8, !tbaa !9
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %122, i64 %123
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %124, i64 16, i1 false), !tbaa.struct !20
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %127 = load double, ptr %126, align 8
  %128 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %129 = load double, ptr %128, align 8
  %130 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %127, double %129, ptr noundef %125)
  %131 = fadd double %116, %130
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !13
  %134 = load i64, ptr %12, align 8, !tbaa !9
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  store double %131, ptr %135, align 8, !tbaa !14
  br label %136

136:                                              ; preds = %111, %100
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %12, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %12, align 8, !tbaa !9
  br label %47, !llvm.loop !22

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

141:                                              ; preds = %155, %140
  %142 = load i64, ptr %12, align 8, !tbaa !9
  %143 = load i64, ptr %7, align 8, !tbaa !9
  %144 = sub nsw i64 %143, 1
  %145 = icmp sle i64 %142, %144
  br i1 %145, label %146, label %158

146:                                              ; preds = %141
  %147 = load double, ptr %15, align 8, !tbaa !14
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !13
  %150 = load i64, ptr %12, align 8, !tbaa !9
  %151 = getelementptr inbounds double, ptr %149, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !14
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %147, double noundef %152, ptr noundef %153)
  store double %154, ptr %15, align 8, !tbaa !14
  br label %155

155:                                              ; preds = %146
  %156 = load i64, ptr %12, align 8, !tbaa !9
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %12, align 8, !tbaa !9
  br label %141, !llvm.loop !23

158:                                              ; preds = %141
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = load i64, ptr %7, align 8, !tbaa !9
  %161 = load i8, ptr %8, align 1, !tbaa !11, !range !18, !noundef !19
  %162 = trunc i8 %161 to i1
  %163 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %164 = trunc i8 %163 to i1
  %165 = load double, ptr %15, align 8, !tbaa !14
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL28rcond_cmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %159, i64 noundef %160, i1 noundef zeroext %162, i1 noundef zeroext %164, i1 noundef zeroext true, double noundef %165, ptr noundef %14, ptr noundef %166)
  %167 = load double, ptr %14, align 8, !tbaa !14
  store double %167, ptr %20, align 8, !tbaa !14
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %168)
  %169 = load double, ptr %20, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  ret double %169
}

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !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 }
%"struct.alglib_impl::ae_complex" = type { double, double }

@.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_impl15cmatrixtrrcond1EPNS_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_edge73

.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 %.preheader60.unr-lcssa, label %.lr.ph.new

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

.preheader60.unr-lcssa:                           ; preds = %35, %.lr.ph
  %.062.unr = phi i64 [ 0, %.lr.ph ], [ %47, %35 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader60, label %.epil.preheader

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

.preheader60:                                     ; preds = %.epil.preheader, %.preheader60.unr-lcssa
  br i1 %10, label %.lr.ph68, label %._crit_edge73

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

.lr.ph68.split.us:                                ; preds = %.lr.ph68, %._crit_edge.us
  %.167.us = phi i64 [ %18, %._crit_edge.us ], [ 0, %.lr.ph68 ]
  %18 = add nuw nsw i64 %.167.us, 1
  %.055.in.us = select i1 %2, i64 %1, i64 %.167.us
  %.054.us = select i1 %2, i64 %18, i64 0
  %.not.not5963.us = icmp slt i64 %.054.us, %.055.in.us
  br i1 %.not.not5963.us, label %.lr.ph65.us, label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.lr.ph65.us, %.lr.ph68.split.us
  %19 = load ptr, ptr %16, align 8, !tbaa !5
  %20 = getelementptr inbounds double, ptr %19, i64 %.167.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
  %exitcond78.not = icmp eq i64 %18, %1
  br i1 %exitcond78.not, label %.preheader, label %.lr.ph68.split.us, !llvm.loop !12

.lr.ph65.us:                                      ; preds = %.lr.ph68.split.us, %.lr.ph65.us
  %.05264.us = phi i64 [ %34, %.lr.ph65.us ], [ %.054.us, %.lr.ph68.split.us ]
  %23 = load ptr, ptr %16, align 8, !tbaa !5
  %24 = getelementptr inbounds double, ptr %23, i64 %.05264.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 %.167.us
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  %29 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i64 %.05264.us
  %.sroa.01.0.copyload.us = load double, ptr %29, align 8, !tbaa !8
  %.sroa.22.0..sroa_idx.us = getelementptr inbounds i8, ptr %29, i64 8
  %.sroa.22.0.copyload.us = load double, ptr %.sroa.22.0..sroa_idx.us, align 8, !tbaa !8
  %30 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.01.0.copyload.us, double %.sroa.22.0.copyload.us, ptr noundef %4)
  %31 = fadd double %25, %30
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i64 %.05264.us
  store double %31, ptr %33, align 8, !tbaa !8
  %34 = add nuw i64 %.05264.us, 1
  %exitcond77.not = icmp eq i64 %34, %.055.in.us
  br i1 %exitcond77.not, label %._crit_edge.us, label %.lr.ph65.us, !llvm.loop !16

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

.preheader:                                       ; preds = %._crit_edge, %._crit_edge.us
  br i1 %10, label %.lr.ph72, label %._crit_edge73

.lr.ph72:                                         ; preds = %.preheader
  %48 = getelementptr inbounds i8, ptr %9, i64 56
  br label %73

.lr.ph68.split:                                   ; preds = %.lr.ph68, %._crit_edge
  %.167 = phi i64 [ %49, %._crit_edge ], [ 0, %.lr.ph68 ]
  %49 = add nuw nsw i64 %.167, 1
  %.055.in = select i1 %2, i64 %1, i64 %.167
  %.054 = select i1 %2, i64 %49, i64 0
  %.not.not5963 = icmp slt i64 %.054, %.055.in
  br i1 %.not.not5963, label %.lr.ph65, label %._crit_edge

.lr.ph65:                                         ; preds = %.lr.ph68.split, %.lr.ph65
  %.05264 = phi i64 [ %61, %.lr.ph65 ], [ %.054, %.lr.ph68.split ]
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %50, i64 %.05264
  %52 = load double, ptr %51, align 8, !tbaa !8
  %53 = load ptr, ptr %17, align 8, !tbaa !5
  %54 = getelementptr inbounds ptr, ptr %53, i64 %.167
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %55, i64 %.05264
  %.sroa.01.0.copyload = load double, ptr %56, align 8, !tbaa !8
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %56, i64 8
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !8
  %57 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, ptr noundef %4)
  %58 = fadd double %52, %57
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %59, i64 %.05264
  store double %58, ptr %60, align 8, !tbaa !8
  %61 = add nuw i64 %.05264, 1
  %exitcond75.not = icmp eq i64 %61, %.055.in
  br i1 %exitcond75.not, label %._crit_edge, label %.lr.ph65, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph65, %.lr.ph68.split
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 %.167
  %64 = load double, ptr %63, align 8, !tbaa !8
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.167
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %67, i64 %.167
  %.sroa.0.0.copyload = load double, ptr %68, align 8, !tbaa !8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %68, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !8
  %69 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef %4)
  %70 = fadd double %64, %69
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %71, i64 %.167
  store double %70, ptr %72, align 8, !tbaa !8
  %exitcond76.not = icmp eq i64 %49, %1
  br i1 %exitcond76.not, label %.preheader, label %.lr.ph68.split, !llvm.loop !12

73:                                               ; preds = %.lr.ph72, %73
  %.271 = phi i64 [ 0, %.lr.ph72 ], [ %78, %73 ]
  %.05370 = phi double [ 0.000000e+00, %.lr.ph72 ], [ %77, %73 ]
  %74 = load ptr, ptr %48, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 %.271
  %76 = load double, ptr %75, align 8, !tbaa !8
  %77 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.05370, double noundef %76, ptr noundef %4)
  %78 = add nuw nsw i64 %.271, 1
  %exitcond79.not = icmp eq i64 %78, %1
  br i1 %exitcond79.not, label %._crit_edge73, label %73, !llvm.loop !18

._crit_edge73:                                    ; preds = %73, %5, %.preheader60, %.preheader
  %.053.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader60 ], [ 0.000000e+00, %5 ], [ %77, %73 ]
  call void @_ZN11alglib_implL28rcond_cmatrixrcondtrinternalEPNS_9ae_matrixElbbbdPdPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3, i1 noundef zeroext true, double noundef %.053.lcssa, ptr noundef nonnull %7, ptr noundef %4)
  %79 = 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 %79
}

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

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