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

; 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.Ani::DofT::DofMap" = type { %"class.std::shared_ptr" }
%"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::vector.50" = type { %"struct.std::_Vector_base.51" }
%"struct.std::_Vector_base.51" = type { %"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl" }
%"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl" = type { %"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.52" = type { i8 }
%"struct.Ani::UnionFemSpace" = type { %"struct.Ani::BaseFemSpace", %"class.std::vector.31", %"class.std::vector.55" }
%"struct.Ani::BaseFemSpace" = type { ptr, %"struct.Ani::DofT::DofMap" }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Ani::BaseFemSpace>, std::allocator<std::shared_ptr<Ani::BaseFemSpace>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = 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 }

@_ZTISt13runtime_error = external constant ptr
@.str.25 = external hidden unnamed_addr constant [86 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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

declare void @_ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE(ptr dead_on_unwind writable sret(%"struct.Ani::DofT::DofMap") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Ani13UnionFemSpace5setupEv(ptr noundef nonnull align 8 dereferenceable(72) %0) #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::vector.50", align 8
  %4 = alloca %"class.std::allocator.52", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.Ani::DofT::DofMap", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  %11 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %10, i32 0, i32 1
  %12 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @_ZNSaIN3Ani4DofT6DofMapEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %13 unwind label %35

13:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIN3Ani4DofT6DofMapEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %14 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %10, i32 0, i32 1
  %15 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  br label %26

17:                                               ; preds = %13
  %18 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %10, i32 0, i32 1
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef 0) #6
  %20 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds ptr, ptr %21, i64 3
  %23 = load ptr, ptr %22, align 8
  %24 = invoke noundef i32 %23(ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %25 unwind label %39

25:                                               ; preds = %17
  br label %26

26:                                               ; preds = %25, %16
  %27 = phi i32 [ 0, %16 ], [ %24, %25 ]
  store i32 %27, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %79, %26
  %29 = load i32, ptr %8, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %10, i32 0, i32 1
  %32 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #6
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %43, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %83

35:                                               ; preds = %1
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %5, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIN3Ani4DofT6DofMapEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  br label %99

39:                                               ; preds = %87, %17
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  br label %98

43:                                               ; preds = %28
  %44 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %10, i32 0, i32 1
  %45 = load i32, ptr %8, align 4, !tbaa !11
  %46 = zext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #6
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %49, i64 3
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i32 %51(ptr noundef nonnull align 8 dereferenceable(24) %48)
          to label %53 unwind label %59

53:                                               ; preds = %43
  %54 = load i32, ptr %7, align 4, !tbaa !11
  %55 = icmp ne i32 %52, %54
  br i1 %55, label %56, label %67

56:                                               ; preds = %53
  %57 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef @.str.25)
          to label %58 unwind label %63

58:                                               ; preds = %56
  invoke void @__cxa_throw(ptr %57, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
          to label %105 unwind label %59

59:                                               ; preds = %67, %58, %43
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  br label %82

63:                                               ; preds = %56
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %5, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %6, align 4
  call void @__cxa_free_exception(ptr %57) #6
  br label %82

67:                                               ; preds = %53
  %68 = getelementptr inbounds %"struct.Ani::UnionFemSpace", ptr %10, i32 0, i32 1
  %69 = load i32, ptr %8, align 4, !tbaa !11
  %70 = zext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #6
  %72 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %71) #6
  %73 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %72, i32 0, i32 1
  %74 = load i32, ptr %8, align 4, !tbaa !11
  %75 = zext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %75) #6
  %77 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %76, ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %78 unwind label %59

78:                                               ; preds = %67
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %8, align 4, !tbaa !11
  %81 = add i32 %80, 1
  store i32 %81, ptr %8, align 4, !tbaa !11
  br label %28, !llvm.loop !13

82:                                               ; preds = %63, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %98

83:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  invoke void @_ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE(ptr dead_on_unwind writable sret(%"struct.Ani::DofT::DofMap") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %84 unwind label %89

84:                                               ; preds = %83
  %85 = getelementptr inbounds %"struct.Ani::BaseFemSpace", ptr %10, i32 0, i32 1
  %86 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %87 unwind label %93

87:                                               ; preds = %84
  call void @_ZN3Ani4DofT6DofMapD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  invoke void @_ZN3Ani13UnionFemSpace13orthogonalizeEj(ptr noundef nonnull align 8 dereferenceable(72) %10, i32 noundef 5)
          to label %88 unwind label %39

88:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  ret void

89:                                               ; preds = %83
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %5, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %6, align 4
  br label %97

93:                                               ; preds = %84
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %5, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %6, align 4
  call void @_ZN3Ani4DofT6DofMapD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  br label %97

97:                                               ; preds = %93, %89
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %98

98:                                               ; preds = %97, %82, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %99

99:                                               ; preds = %98, %35
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr %5, align 8
  %102 = load i32, ptr %6, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %58
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Ani13UnionFemSpace13orthogonalizeEj(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #5 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 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 #4 = { inlinehint 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

%"struct.Ani::DofT::DofMap" = type { %"class.std::shared_ptr" }
%"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::vector.50" = type { %"struct.std::_Vector_base.51" }
%"struct.std::_Vector_base.51" = type { %"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl" }
%"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl" = type { %"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Ani::DofT::DofMap, std::allocator<Ani::DofT::DofMap>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.52" = type { i8 }

@_ZTISt13runtime_error = external constant ptr
@.str.25 = external hidden unnamed_addr constant [86 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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

declare void @_ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE(ptr dead_on_unwind writable sret(%"struct.Ani::DofT::DofMap") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Ani13UnionFemSpace5setupEv(ptr noundef nonnull align 8 dereferenceable(72) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.50", align 8
  %3 = alloca %"class.std::allocator.52", align 1
  %4 = alloca %"struct.Ani::DofT::DofMap", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZNSaIN3Ani4DofT6DofMapEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %6, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %7 unwind label %19

7:                                                ; preds = %1
  call void @_ZNSt15__new_allocatorIN3Ani4DofT6DofMapEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  %8 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br i1 %8, label %16, label %9

9:                                                ; preds = %7
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #6
  %11 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  %14 = load ptr, ptr %13, align 8
  %15 = invoke noundef i32 %14(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %16 unwind label %21

16:                                               ; preds = %9, %7
  %17 = phi i32 [ 0, %7 ], [ %15, %9 ]
  %18 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %.not17 = icmp eq i64 %18, 0
  br i1 %.not17, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %36, %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  invoke void @_ZN3Ani4DofT5mergeERKSt6vectorINS0_6DofMapESaIS2_EE(ptr dead_on_unwind nonnull writable sret(%"struct.Ani::DofT::DofMap") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %46 unwind label %50

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN3Ani4DofT6DofMapEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %53

21:                                               ; preds = %46, %9
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %52

.lr.ph:                                           ; preds = %16, %36
  %23 = phi i64 [ %43, %36 ], [ 0, %16 ]
  %.016 = phi i32 [ %42, %36 ], [ 0, %16 ]
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %23) #6
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  %28 = load ptr, ptr %27, align 8
  %29 = invoke noundef i32 %28(ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %30 unwind label %.loopexit

30:                                               ; preds = %.lr.ph
  %.not = icmp eq i32 %29, %17
  br i1 %.not, label %36, label %31

31:                                               ; preds = %30
  %32 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull @.str.25)
          to label %33 unwind label %34

33:                                               ; preds = %31
  invoke void @__cxa_throw(ptr nonnull %32, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %54 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %52

.loopexit.split-lp:                               ; preds = %33
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %52

34:                                               ; preds = %31
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %32) #6
  br label %52

36:                                               ; preds = %30
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %23) #6
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3Ani12BaseFemSpaceELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %37) #6
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %23) #6
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %39)
  %42 = add i32 %.016, 1
  %43 = zext i32 %42 to i64
  %44 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %45 = icmp ugt i64 %44, %43
  br i1 %45, label %.lr.ph, label %._crit_edge, !llvm.loop !8

46:                                               ; preds = %._crit_edge
  %47 = getelementptr inbounds i8, ptr %0, i64 8
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3Ani4DofT6DofMapaSEOS1_(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @_ZN3Ani4DofT6DofMapD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  invoke void @_ZN3Ani13UnionFemSpace13orthogonalizeEj(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef 5)
          to label %49 unwind label %21

49:                                               ; preds = %46
  call void @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  ret void

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

52:                                               ; preds = %.loopexit, %.loopexit.split-lp, %34, %50, %21
  %.pn.pn = phi { ptr, i32 } [ %22, %21 ], [ %51, %50 ], [ %35, %34 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorIN3Ani4DofT6DofMapESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br label %53

53:                                               ; preds = %52, %19
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %52 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn.pn

54:                                               ; preds = %33
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN3Ani12BaseFemSpaceEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Ani13UnionFemSpace13orthogonalizeEj(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #5 align 2

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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