; LLVM IR from VeloxChem/VeloxChem :: src/dft_func/AOKohnShamMatrix.ll (ZN17CAOKohnShamMatrixC2Eiib)

; 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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl" }
%"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl" = type { %"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%class.CDenseMatrix = type { i32, i32, %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%class.CAOKohnShamMatrix = type { %"class.std::vector", i8, double, double }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI12CDenseMatrixEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI12CDenseMatrixSaIS0_EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17CAOKohnShamMatrixC2Eiib(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::initializer_list", align 8
  %11 = alloca [1 x %class.CDenseMatrix], align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %class.CDenseMatrix, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  %17 = zext i1 %3 to i8
  store i8 %17, ptr %8, align 1, !tbaa !11
  %18 = load ptr, ptr %5, align 8
  %19 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 0
  call void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %20 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 1
  %21 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %22 = trunc i8 %21 to i1
  %23 = zext i1 %22 to i8
  store i8 %23, ptr %20, align 8, !tbaa !15
  %24 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 2
  store double 0.000000e+00, ptr %24, align 8, !tbaa !22
  %25 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 3
  store double 0.000000e+00, ptr %25, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  store ptr %11, ptr %12, align 8
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN12CDenseMatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef %26, i32 noundef %27)
          to label %28 unwind label %54

28:                                               ; preds = %4
  %29 = getelementptr inbounds %"class.std::initializer_list", ptr %10, i32 0, i32 0
  store ptr %11, ptr %29, align 8, !tbaa !24
  %30 = getelementptr inbounds %"class.std::initializer_list", ptr %10, i32 0, i32 1
  store i64 1, ptr %30, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @_ZNSaI12CDenseMatrixEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  %31 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8
  %33 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 1
  %34 = load i64, ptr %33, align 8
  invoke void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr %32, i64 %34, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %35 unwind label %65

35:                                               ; preds = %28
  %36 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 0
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI12CDenseMatrixSaIS0_EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @_ZNSt6vectorI12CDenseMatrixSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @_ZNSt15__new_allocatorI12CDenseMatrixED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  %38 = getelementptr inbounds [1 x %class.CDenseMatrix], ptr %11, i32 0, i32 0
  %39 = getelementptr inbounds %class.CDenseMatrix, ptr %38, i64 1
  br label %40

40:                                               ; preds = %40, %35
  %41 = phi ptr [ %39, %35 ], [ %42, %40 ]
  %42 = getelementptr inbounds %class.CDenseMatrix, ptr %41, i64 -1
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #5
  %43 = icmp eq ptr %42, %38
  br i1 %43, label %44, label %40

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  %45 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 1
  %46 = load i8, ptr %45, align 8, !tbaa !15, !range !13, !noundef !14
  %47 = trunc i8 %46 to i1
  br i1 %47, label %86, label %48

48:                                               ; preds = %44
  %49 = getelementptr inbounds %class.CAOKohnShamMatrix, ptr %18, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN12CDenseMatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef %50, i32 noundef %51)
          to label %52 unwind label %77

52:                                               ; preds = %48
  invoke void @_ZNSt6vectorI12CDenseMatrixSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %53 unwind label %81

53:                                               ; preds = %52
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %86

54:                                               ; preds = %4
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  %58 = load ptr, ptr %12, align 8
  %59 = icmp eq ptr %11, %58
  br i1 %59, label %64, label %60

60:                                               ; preds = %60, %54
  %61 = phi ptr [ %58, %54 ], [ %62, %60 ]
  %62 = getelementptr inbounds %class.CDenseMatrix, ptr %61, i64 -1
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #5
  %63 = icmp eq ptr %62, %11
  br i1 %63, label %64, label %60

64:                                               ; preds = %60, %54
  br label %76

65:                                               ; preds = %28
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %13, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %14, align 4
  call void @_ZNSt15__new_allocatorI12CDenseMatrixED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  %69 = getelementptr inbounds [1 x %class.CDenseMatrix], ptr %11, i32 0, i32 0
  %70 = getelementptr inbounds %class.CDenseMatrix, ptr %69, i64 1
  br label %71

71:                                               ; preds = %71, %65
  %72 = phi ptr [ %70, %65 ], [ %73, %71 ]
  %73 = getelementptr inbounds %class.CDenseMatrix, ptr %72, i64 -1
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %73) #5
  %74 = icmp eq ptr %73, %69
  br i1 %74, label %75, label %71

75:                                               ; preds = %71
  br label %76

76:                                               ; preds = %75, %64
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %87

77:                                               ; preds = %48
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %13, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %14, align 4
  br label %85

81:                                               ; preds = %52
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %13, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %14, align 4
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %85

85:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %87

86:                                               ; preds = %53, %44
  ret void

87:                                               ; preds = %85, %76
  call void @_ZNSt6vectorI12CDenseMatrixSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %13, align 8
  %90 = load i32, ptr %14, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

declare void @_ZN12CDenseMatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI12CDenseMatrixED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

attributes #0 = { mustprogress nounwind 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 = { "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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !12, i64 24}
!16 = !{!"_ZTS17CAOKohnShamMatrix", !17, i64 0, !12, i64 24, !21, i64 32, !21, i64 40}
!17 = !{!"_ZTSSt6vectorI12CDenseMatrixSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI12CDenseMatrixSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI12CDenseMatrixSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI12CDenseMatrixSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!16, !21, i64 32}
!23 = !{!16, !21, i64 40}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTSSt16initializer_listI12CDenseMatrixE", !6, i64 0, !26, i64 8}
!26 = !{!"long", !7, i64 0}
!27 = !{!25, !26, i64 8}


; 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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl" }
%"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl" = type { %"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CDenseMatrix, std::allocator<CDenseMatrix>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.CDenseMatrix = type { i32, i32, %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI12CDenseMatrixEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI12CDenseMatrixSaIS0_EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17CAOKohnShamMatrixC2Eiib(ptr noundef nonnull align 8 dereferenceable(48) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca [1 x %class.CDenseMatrix], align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %class.CDenseMatrix, align 8
  %9 = zext i1 %3 to i8
  tail call void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 %9, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %11, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  invoke void @_ZN12CDenseMatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef %1, i32 noundef %2)
          to label %12 unwind label %20

12:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaI12CDenseMatrixEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorI12CDenseMatrixSaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr nonnull %6, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %13 unwind label %.loopexit.loopexit

13:                                               ; preds = %12
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI12CDenseMatrixSaIS0_EEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @_ZNSt6vectorI12CDenseMatrixSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @_ZNSt15__new_allocatorI12CDenseMatrixED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  %15 = load i8, ptr %10, align 8, !tbaa !5, !range !16, !noundef !17
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %28, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZN12CDenseMatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %1, i32 noundef %2)
          to label %18 unwind label %23

18:                                               ; preds = %17
  invoke void @_ZNSt6vectorI12CDenseMatrixSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %19 unwind label %25

19:                                               ; preds = %18
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %28

20:                                               ; preds = %4
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %12
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI12CDenseMatrixED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %20
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %22, %.loopexit.loopexit ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %29

23:                                               ; preds = %17
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %27

25:                                               ; preds = %18
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN12CDenseMatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %27

27:                                               ; preds = %25, %23
  %.pn13 = phi { ptr, i32 } [ %26, %25 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %29

28:                                               ; preds = %19, %13
  ret void

29:                                               ; preds = %27, %.loopexit
  %.pn13.pn = phi { ptr, i32 } [ %.pn13, %27 ], [ %.pn, %.loopexit ]
  call void @_ZNSt6vectorI12CDenseMatrixSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  resume { ptr, i32 } %.pn13.pn
}

declare void @_ZN12CDenseMatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI12CDenseMatrixSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI12CDenseMatrixED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { mustprogress nounwind 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !14, i64 24}
!6 = !{!"_ZTS17CAOKohnShamMatrix", !7, i64 0, !14, i64 24, !15, i64 32, !15, i64 40}
!7 = !{!"_ZTSSt6vectorI12CDenseMatrixSaIS0_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseI12CDenseMatrixSaIS0_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseI12CDenseMatrixSaIS0_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseI12CDenseMatrixSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"bool", !12, i64 0}
!15 = !{!"double", !12, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass