; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (solvers)

; 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_complex" = type { double, double }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19cmatrixlusolvemfastEPNS_9ae_matrixEPNS_9ae_vectorElS1_lPlPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.alglib_impl::ae_complex", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.alglib_impl::ae_complex", align 8
  %21 = alloca %"struct.alglib_impl::ae_complex", align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %22 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %22, align 8, !tbaa !9
  %23 = load i64, ptr %10, align 8, !tbaa !9
  %24 = icmp sle i64 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %7
  %26 = load i64, ptr %12, align 8, !tbaa !9
  %27 = icmp sle i64 %26, 0
  br i1 %27, label %28, label %30

28:                                               ; preds = %25, %7
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -1, ptr %29, align 8, !tbaa !9
  store i32 1, ptr %19, align 4
  br label %173

30:                                               ; preds = %25
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %86, %30
  %32 = load i64, ptr %16, align 8, !tbaa !9
  %33 = load i64, ptr %10, align 8, !tbaa !9
  %34 = sub nsw i64 %33, 1
  %35 = icmp sle i64 %32, %34
  br i1 %35, label %36, label %89

36:                                               ; preds = %31
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %37, i32 0, i32 6
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = load i64, ptr %16, align 8, !tbaa !9
  %41 = getelementptr inbounds ptr, ptr %39, i64 %40
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = load i64, ptr %16, align 8, !tbaa !9
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %42, i64 %43
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %44, i64 16, i1 false), !tbaa.struct !12
  %45 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %46 = load double, ptr %45, align 8
  %47 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %48 = load double, ptr %47, align 8
  %49 = call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %46, double %48, double noundef 0.000000e+00)
  br i1 %49, label %50, label %85

50:                                               ; preds = %36
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %80, %50
  %52 = load i64, ptr %17, align 8, !tbaa !9
  %53 = load i64, ptr %10, align 8, !tbaa !9
  %54 = sub nsw i64 %53, 1
  %55 = icmp sle i64 %52, %54
  br i1 %55, label %56, label %83

56:                                               ; preds = %51
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %76, %56
  %58 = load i64, ptr %18, align 8, !tbaa !9
  %59 = load i64, ptr %12, align 8, !tbaa !9
  %60 = sub nsw i64 %59, 1
  %61 = icmp sle i64 %58, %60
  br i1 %61, label %62, label %79

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %63 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %64 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %65 = extractvalue { double, double } %63, 0
  store double %65, ptr %64, align 8
  %66 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %67 = extractvalue { double, double } %63, 1
  store double %67, ptr %66, align 8
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %68, i32 0, i32 6
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = load i64, ptr %17, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %70, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = load i64, ptr %18, align 8, !tbaa !9
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %73, i64 %74
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %75, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %76

76:                                               ; preds = %62
  %77 = load i64, ptr %18, align 8, !tbaa !9
  %78 = add nsw i64 %77, 1
  store i64 %78, ptr %18, align 8, !tbaa !9
  br label %57, !llvm.loop !15

79:                                               ; preds = %57
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %17, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %17, align 8, !tbaa !9
  br label %51, !llvm.loop !17

83:                                               ; preds = %51
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -3, ptr %84, align 8, !tbaa !9
  store i32 1, ptr %19, align 4
  br label %173

85:                                               ; preds = %36
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %16, align 8, !tbaa !9
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %16, align 8, !tbaa !9
  br label %31, !llvm.loop !18

89:                                               ; preds = %31
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %158, %89
  %91 = load i64, ptr %16, align 8, !tbaa !9
  %92 = load i64, ptr %10, align 8, !tbaa !9
  %93 = sub nsw i64 %92, 1
  %94 = icmp sle i64 %91, %93
  br i1 %94, label %95, label %161

95:                                               ; preds = %90
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = load i64, ptr %16, align 8, !tbaa !9
  %100 = getelementptr inbounds i64, ptr %98, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = load i64, ptr %16, align 8, !tbaa !9
  %103 = icmp ne i64 %101, %102
  br i1 %103, label %104, label %157

104:                                              ; preds = %95
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %153, %104
  %106 = load i64, ptr %17, align 8, !tbaa !9
  %107 = load i64, ptr %12, align 8, !tbaa !9
  %108 = sub nsw i64 %107, 1
  %109 = icmp sle i64 %106, %108
  br i1 %109, label %110, label %156

110:                                              ; preds = %105
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %111, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = load i64, ptr %16, align 8, !tbaa !9
  %115 = getelementptr inbounds ptr, ptr %113, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i64, ptr %17, align 8, !tbaa !9
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %116, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %118, i64 16, i1 false), !tbaa.struct !12
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %119, i32 0, i32 6
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %122, i32 0, i32 4
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  %125 = load i64, ptr %16, align 8, !tbaa !9
  %126 = getelementptr inbounds i64, ptr %124, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !9
  %128 = getelementptr inbounds ptr, ptr %121, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = load i64, ptr %17, align 8, !tbaa !9
  %131 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %129, i64 %130
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %132, i32 0, i32 6
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = load i64, ptr %16, align 8, !tbaa !9
  %136 = getelementptr inbounds ptr, ptr %134, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = load i64, ptr %17, align 8, !tbaa !9
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %137, i64 %138
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %139, ptr align 8 %131, i64 16, i1 false), !tbaa.struct !12
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %140, i32 0, i32 6
  %142 = load ptr, ptr %141, align 8, !tbaa !11
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !11
  %146 = load i64, ptr %16, align 8, !tbaa !9
  %147 = getelementptr inbounds i64, ptr %145, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = getelementptr inbounds ptr, ptr %142, i64 %148
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = load i64, ptr %17, align 8, !tbaa !9
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %150, i64 %151
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %152, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !12
  br label %153

153:                                              ; preds = %110
  %154 = load i64, ptr %17, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %17, align 8, !tbaa !9
  br label %105, !llvm.loop !19

156:                                              ; preds = %105
  br label %157

157:                                              ; preds = %156, %95
  br label %158

158:                                              ; preds = %157
  %159 = load i64, ptr %16, align 8, !tbaa !9
  %160 = add nsw i64 %159, 1
  store i64 %160, ptr %16, align 8, !tbaa !9
  br label %90, !llvm.loop !20

161:                                              ; preds = %90
  %162 = load i64, ptr %10, align 8, !tbaa !9
  %163 = load i64, ptr %12, align 8, !tbaa !9
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPNS_9ae_matrixEllbblS1_llPNS_8ae_stateE(i64 noundef %162, i64 noundef %163, ptr noundef %164, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext true, i64 noundef 0, ptr noundef %165, i64 noundef 0, i64 noundef 0, ptr noundef %166)
  %167 = load i64, ptr %10, align 8, !tbaa !9
  %168 = load i64, ptr %12, align 8, !tbaa !9
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPNS_9ae_matrixEllbblS1_llPNS_8ae_stateE(i64 noundef %167, i64 noundef %168, ptr noundef %169, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %170, i64 noundef 0, i64 noundef 0, ptr noundef %171)
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 1, ptr %172, align 8, !tbaa !9
  store i32 0, ptr %19, align 4
  br label %173

173:                                              ; preds = %161, %83, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  %174 = load i32, ptr %19, align 4
  switch i32 %174, label %176 [
    i32 0, label %175
    i32 1, label %175
  ]

175:                                              ; preds = %173, %173
  ret void

176:                                              ; preds = %173
  unreachable
}

declare noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double, double, double 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

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{i64 0, i64 8, !13, i64 8, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


; 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_complex" = type { double, double }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19cmatrixlusolvemfastEPNS_9ae_matrixEPNS_9ae_vectorElS1_lPlPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr nocapture noundef writeonly %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = alloca %"struct.alglib_impl::ae_complex", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8)
  store i64 0, ptr %5, align 8, !tbaa !5
  %9 = icmp slt i64 %2, 1
  %10 = icmp slt i64 %4, 1
  %or.cond = or i1 %9, %10
  br i1 %or.cond, label %._crit_edge82, label %.preheader69

.preheader69:                                     ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 72
  br label %38

12:                                               ; preds = %38
  %13 = add nuw nsw i64 %.070, 1
  %exitcond.not = icmp eq i64 %13, %2
  br i1 %exitcond.not, label %.preheader68, label %38, !llvm.loop !9

.preheader68:                                     ; preds = %12
  %.not.not6273 = icmp sgt i64 %2, 0
  br i1 %.not.not6273, label %.lr.ph76, label %._crit_edge

.lr.ph76:                                         ; preds = %.preheader68
  %14 = getelementptr inbounds i8, ptr %1, i64 56
  %.not63.not71 = icmp sgt i64 %4, 0
  %15 = getelementptr inbounds i8, ptr %3, i64 72
  br i1 %.not63.not71, label %.lr.ph76.split.us, label %._crit_edge

.lr.ph76.split.us:                                ; preds = %.lr.ph76, %..loopexit_crit_edge.us
  %.174.us = phi i64 [ %37, %..loopexit_crit_edge.us ], [ 0, %.lr.ph76 ]
  %16 = load ptr, ptr %14, align 8, !tbaa !11
  %17 = getelementptr inbounds i64, ptr %16, i64 %.174.us
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %.not.us = icmp eq i64 %18, %.174.us
  br i1 %.not.us, label %..loopexit_crit_edge.us, label %.preheader67.us

.preheader67.us:                                  ; preds = %.lr.ph76.split.us, %.preheader67.us
  %.15672.us = phi i64 [ %36, %.preheader67.us ], [ 0, %.lr.ph76.split.us ]
  %19 = load ptr, ptr %15, align 8, !tbaa !11
  %20 = getelementptr inbounds ptr, ptr %19, i64 %.174.us
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %21, i64 %.15672.us
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %22, i64 16, i1 false), !tbaa.struct !14
  %23 = load ptr, ptr %14, align 8, !tbaa !11
  %24 = getelementptr inbounds i64, ptr %23, i64 %.174.us
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds ptr, ptr %19, i64 %25
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %27, i64 %.15672.us
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %28, i64 16, i1 false), !tbaa.struct !14
  %29 = load ptr, ptr %15, align 8, !tbaa !11
  %30 = load ptr, ptr %14, align 8, !tbaa !11
  %31 = getelementptr inbounds i64, ptr %30, i64 %.174.us
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds ptr, ptr %29, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !12
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %34, i64 %.15672.us
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %8, i64 16, i1 false), !tbaa.struct !14
  %36 = add nuw nsw i64 %.15672.us, 1
  %exitcond85.not = icmp eq i64 %36, %4
  br i1 %exitcond85.not, label %..loopexit_crit_edge.us, label %.preheader67.us, !llvm.loop !17

..loopexit_crit_edge.us:                          ; preds = %.preheader67.us, %.lr.ph76.split.us
  %37 = add nuw nsw i64 %.174.us, 1
  %exitcond86.not = icmp eq i64 %37, %2
  br i1 %exitcond86.not, label %._crit_edge, label %.lr.ph76.split.us, !llvm.loop !18

38:                                               ; preds = %.preheader69, %12
  %.070 = phi i64 [ 0, %.preheader69 ], [ %13, %12 ]
  %39 = load ptr, ptr %11, align 8, !tbaa !11
  %40 = getelementptr inbounds ptr, ptr %39, i64 %.070
  %41 = load ptr, ptr %40, align 8, !tbaa !12
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %41, i64 %.070
  %.sroa.02.0.copyload = load double, ptr %42, align 8, !tbaa !15
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %42, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !15
  %43 = tail call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %.sroa.02.0.copyload, double %.sroa.2.0.copyload, double noundef 0.000000e+00)
  br i1 %43, label %.preheader66, label %12

.preheader66:                                     ; preds = %38
  %.not64.not80 = icmp sgt i64 %2, 0
  br i1 %.not64.not80, label %.preheader.lr.ph, label %._crit_edge82

.preheader.lr.ph:                                 ; preds = %.preheader66
  %.not65.not77 = icmp sgt i64 %4, 0
  %44 = getelementptr inbounds i8, ptr %3, i64 72
  br i1 %.not65.not77, label %.preheader.us, label %._crit_edge82

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge79.us
  %.05581.us = phi i64 [ %54, %._crit_edge79.us ], [ 0, %.preheader.lr.ph ]
  br label %45

45:                                               ; preds = %.preheader.us, %45
  %.05778.us = phi i64 [ 0, %.preheader.us ], [ %53, %45 ]
  %46 = tail call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %47 = extractvalue { double, double } %46, 0
  %48 = extractvalue { double, double } %46, 1
  %49 = load ptr, ptr %44, align 8, !tbaa !11
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.05581.us
  %51 = load ptr, ptr %50, align 8, !tbaa !12
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %51, i64 %.05778.us
  store double %47, ptr %52, align 8, !tbaa !15
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %52, i64 8
  store double %48, ptr %.sroa.4.0..sroa_idx.us, align 8, !tbaa !15
  %53 = add nuw nsw i64 %.05778.us, 1
  %exitcond87.not = icmp eq i64 %53, %4
  br i1 %exitcond87.not, label %._crit_edge79.us, label %45, !llvm.loop !19

._crit_edge79.us:                                 ; preds = %45
  %54 = add nuw nsw i64 %.05581.us, 1
  %exitcond88.not = icmp eq i64 %54, %2
  br i1 %exitcond88.not, label %._crit_edge82, label %.preheader.us, !llvm.loop !20

._crit_edge:                                      ; preds = %..loopexit_crit_edge.us, %.lr.ph76, %.preheader68
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPNS_9ae_matrixEllbblS1_llPNS_8ae_stateE(i64 noundef %2, i64 noundef %4, ptr noundef %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext true, i64 noundef 0, ptr noundef %3, i64 noundef 0, i64 noundef 0, ptr noundef %6)
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPNS_9ae_matrixEllbblS1_llPNS_8ae_stateE(i64 noundef %2, i64 noundef %4, ptr noundef %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %3, i64 noundef 0, i64 noundef 0, ptr noundef %6)
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %._crit_edge79.us, %.preheader66, %.preheader.lr.ph, %7, %._crit_edge
  %.sink = phi i64 [ 1, %._crit_edge ], [ -1, %7 ], [ -3, %.preheader.lr.ph ], [ -3, %.preheader66 ], [ -3, %._crit_edge79.us ]
  store i64 %.sink, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8)
  ret void
}

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

; Function Attrs: mustprogress 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

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{i64 0, i64 8, !15, i64 8, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass