; LLVM IR from INMOST-DEV/INMOST-FEM :: anifem++/fem/tetdofmap.ll (ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE)

; 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.18" = type { %"class.std::__shared_ptr.19" }
%"class.std::__shared_ptr.19" = type { ptr, %"class.std::__shared_count" }
%"struct.Ani::DofT::DofMap" = type { %"class.std::shared_ptr" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl_data" = type { ptr, ptr, 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani4DofT6DofMapC2ESt10shared_ptrINS0_10BaseDofMapEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Ani4DofT6DofMap4baseEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN3Ani4DofT13ComplexDofMapEJRSt6vectorISt10shared_ptrINS1_10BaseDofMapEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.18") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN3Ani4DofT10BaseDofMapEEC2INS1_13ComplexDofMapEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE(ptr dead_on_unwind noalias writable sret(%"struct.Ani::DofT::DofMap") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca %"class.std::shared_ptr.18", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #4
  call void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = call noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %13)
          to label %14 unwind label %22

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %33, %14
  %16 = load i32, ptr %8, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %20 = icmp ult i64 %17, %19
  br i1 %20, label %26, label %21

21:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %45

22:                                               ; preds = %2
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %6, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %7, align 4
  br label %57

26:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29) #4
  invoke void @_ZNK3Ani4DofT6DofMap4baseEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %31 unwind label %36

31:                                               ; preds = %26
  invoke void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %32 unwind label %40

32:                                               ; preds = %31
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %33

33:                                               ; preds = %32
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = add i32 %34, 1
  store i32 %35, ptr %8, align 4, !tbaa !9
  br label %15, !llvm.loop !11

36:                                               ; preds = %26
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %6, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %7, align 4
  br label %44

40:                                               ; preds = %31
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %7, align 4
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  br label %44

44:                                               ; preds = %40, %36
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %57

45:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  invoke void @_ZSt11make_sharedIN3Ani4DofT13ComplexDofMapEJRSt6vectorISt10shared_ptrINS1_10BaseDofMapEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.18") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %46 unwind label %48

46:                                               ; preds = %45
  call void @_ZNSt10shared_ptrIN3Ani4DofT10BaseDofMapEEC2INS1_13ComplexDofMapEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  invoke void @_ZN3Ani4DofT6DofMapC2ESt10shared_ptrINS0_10BaseDofMapEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %10)
          to label %47 unwind label %52

47:                                               ; preds = %46
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @_ZNSt12__shared_ptrIN3Ani4DofT13ComplexDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  ret void

48:                                               ; preds = %45
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  br label %56

52:                                               ; preds = %46
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @_ZNSt12__shared_ptrIN3Ani4DofT13ComplexDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  br label %56

56:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  br label %57

57:                                               ; preds = %56, %44, %22
  call void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #4
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %6, align 8
  %60 = load i32, ptr %7, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.18" = type { %"class.std::__shared_ptr.19" }
%"class.std::__shared_ptr.19" = type { ptr, %"class.std::__shared_count" }
%"struct.Ani::DofT::DofMap" = type { %"class.std::shared_ptr" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::DofT::BaseDofMap>, std::allocator<std::shared_ptr<Ani::DofT::BaseDofMap>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3Ani4DofT6DofMapC2ESt10shared_ptrINS0_10BaseDofMapEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Ani4DofT6DofMap4baseEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN3Ani4DofT13ComplexDofMapEJRSt6vectorISt10shared_ptrINS1_10BaseDofMapEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.18") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN3Ani4DofT10BaseDofMapEEC2INS1_13ComplexDofMapEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE(ptr dead_on_unwind noalias writable sret(%"struct.Ani::DofT::DofMap") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::shared_ptr", align 8
  %5 = alloca %"class.std::shared_ptr", align 8
  %6 = alloca %"class.std::shared_ptr.18", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %7 = call noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %7)
          to label %.preheader unwind label %9

.preheader:                                       ; preds = %2
  %8 = call noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %13, %.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  invoke void @_ZSt11make_sharedIN3Ani4DofT13ComplexDofMapEJRSt6vectorISt10shared_ptrINS1_10BaseDofMapEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.18") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %20 unwind label %21

9:                                                ; preds = %2
  %10 = landingpad { ptr, i32 }
          cleanup
  br label %23

.lr.ph:                                           ; preds = %.preheader, %13
  %11 = phi i64 [ %15, %13 ], [ 0, %.preheader ]
  %.011 = phi i32 [ %14, %13 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %11) #4
  call void @_ZNK3Ani4DofT6DofMap4baseEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %12)
  invoke void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %13 unwind label %18

13:                                               ; preds = %.lr.ph
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %14 = add i32 %.011, 1
  %15 = zext i32 %14 to i64
  %16 = call noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %17 = icmp ugt i64 %16, %15
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !5

18:                                               ; preds = %.lr.ph
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br label %23

20:                                               ; preds = %._crit_edge
  call void @_ZNSt10shared_ptrIN3Ani4DofT10BaseDofMapEEC2INS1_13ComplexDofMapEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @_ZN3Ani4DofT6DofMapC2ESt10shared_ptrINS0_10BaseDofMapEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %5)
  call void @_ZNSt12__shared_ptrIN3Ani4DofT10BaseDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @_ZNSt12__shared_ptrIN3Ani4DofT13ComplexDofMapELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret void

21:                                               ; preds = %._crit_edge
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %23

23:                                               ; preds = %21, %18, %9
  %.pn = phi { ptr, i32 } [ %19, %18 ], [ %22, %21 ], [ %10, %9 ]
  call void @_ZNSt6vectorISt10shared_ptrIN3Ani4DofT10BaseDofMapEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3Ani4DofT6DofMapESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass