; LLVM IR from atlantis13579/Riemann :: Src/Geometry/GeometryAttributes.ll (ZN7Riemann23DynamicMeshAttributeSet16OnRemoveTriangleEi)

; 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.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.81" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.__gnu_cxx::__normal_iterator.84" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.85" = type { ptr }
%"class.Riemann::DynamicMeshAttributeSet" = type { ptr, ptr, %"class.std::vector.51", %"class.std::vector.56", ptr, %"class.std::vector.61", %"class.std::map", %"class.std::vector.71" }
%"class.std::vector.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 2, Maths::TVector2<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.56" = type { %"struct.std::_Vector_base.57" }
%"struct.std::_Vector_base.57" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>, std::allocator<Riemann::TDynamicMeshVectorOverlay<float, 3, Maths::TVector3<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.61" = type { %"struct.std::_Vector_base.62" }
%"struct.std::_Vector_base.62" = type { %"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicVertexAttribute<float, 1>, std::allocator<Riemann::TDynamicVertexAttribute<float, 1>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.66" }
%"class.std::_Rb_tree.66" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, Riemann::TDynamicAttributeBase *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.71" = type { %"struct.std::_Vector_base.72" }
%"struct.std::_Vector_base.72" = type { %"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::TDynamicAttributeBase *, std::allocator<Riemann::TDynamicAttributeBase *>>::_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 uwtable
declare dso_local void @_ZN7Riemann19TDynamicMeshOverlayIfLi2EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann19TDynamicMeshOverlayIfLi3EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann19TDynamicMeshOverlayIfLi4EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann23DynamicMeshAttributeSet16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::pair.81", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.84", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.84", align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.85", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.85", align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %21 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %20, i32 0, i32 6
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #4
  %24 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %6, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %25) #4
  %27 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %7, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %41, %2
  %29 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #4
  %32 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(40) %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %33 = getelementptr inbounds %"struct.std::pair.81", ptr %8, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  store ptr %34, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !9
  %37 = load ptr, ptr %35, align 8, !tbaa !16
  %38 = getelementptr inbounds ptr, ptr %37, i64 5
  %39 = load ptr, ptr %38, align 8
  invoke void %39(ptr noundef nonnull align 8 dereferenceable(40) %35, i32 noundef %36)
          to label %40 unwind label %43

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

41:                                               ; preds = %40
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br label %28

43:                                               ; preds = %31
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %90

47:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %48 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %20, i32 0, i32 2
  store ptr %48, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #4
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.84", ptr %13, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #4
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.84", ptr %14, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  br label %55

55:                                               ; preds = %62, %47
  %56 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br i1 %56, label %58, label %57

57:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %64

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %59 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  store ptr %59, ptr %15, align 8, !tbaa !5
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7Riemann19TDynamicMeshOverlayIfLi2EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104) %60, i32 noundef %61)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %62

62:                                               ; preds = %58
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br label %55

64:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %65 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %20, i32 0, i32 3
  store ptr %65, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #4
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.85", ptr %17, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #4
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.85", ptr %18, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  br label %72

72:                                               ; preds = %79, %64
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %73, label %75, label %74

74:                                               ; preds = %72
  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
  br label %81

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %76 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  store ptr %76, ptr %19, align 8, !tbaa !5
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7Riemann19TDynamicMeshOverlayIfLi3EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104) %77, i32 noundef %78)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %79

79:                                               ; preds = %75
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  br label %72

81:                                               ; preds = %74
  %82 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %20, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !18
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %89

85:                                               ; preds = %81
  %86 = getelementptr inbounds %"class.Riemann::DynamicMeshAttributeSet", ptr %20, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  %88 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7Riemann19TDynamicMeshOverlayIfLi4EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104) %87, i32 noundef %88)
  br label %89

89:                                               ; preds = %85, %81
  ret void

90:                                               ; preds = %43
  %91 = load ptr, ptr %10, align 8
  %92 = load i32, ptr %11, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

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 = { 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 #3 = { 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 #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 = !{!12, !6, i64 32}
!12 = !{!"_ZTSSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEE", !13, i64 0, !6, i64 32}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!19, !6, i64 64}
!19 = !{!"_ZTSN7Riemann23DynamicMeshAttributeSetE", !6, i64 0, !6, i64 8, !20, i64 16, !24, i64 40, !6, i64 64, !28, i64 72, !32, i64 96, !40, i64 144}
!20 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !35, i64 0, !37, i64 8}
!35 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !36, i64 0}
!36 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!37 = !{!"_ZTSSt15_Rb_tree_header", !38, i64 0, !15, i64 32}
!38 = !{!"_ZTSSt18_Rb_tree_node_base", !39, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!39 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!40 = !{!"_ZTSSt6vectorIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 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.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.81" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.__gnu_cxx::__normal_iterator.84" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.85" = type { 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 uwtable
declare dso_local void @_ZN7Riemann19TDynamicMeshOverlayIfLi2EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann19TDynamicMeshOverlayIfLi3EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann19TDynamicMeshOverlayIfLi4EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann23DynamicMeshAttributeSet16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca %"struct.std::pair.81", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.84", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.84", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.85", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.85", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %11 = tail call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  store ptr %11, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %12 = tail call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #4
  store ptr %12, ptr %4, align 8
  %13 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %14 = getelementptr inbounds i8, ptr %5, i64 32
  br label %19

._crit_edge:                                      ; preds = %25, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %16 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  store ptr %16, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %17 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  store ptr %17, ptr %7, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %18, label %.lr.ph16, label %._crit_edge17

19:                                               ; preds = %.lr.ph, %25
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  %20 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 8 dereferenceable(40) %20)
  %21 = load ptr, ptr %14, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  %24 = load ptr, ptr %23, align 8
  invoke void %24(ptr noundef nonnull align 8 dereferenceable(40) %21, i32 noundef %1)
          to label %25 unwind label %28

25:                                               ; preds = %19
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %27 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %27, label %19, label %._crit_edge

28:                                               ; preds = %19
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %29

._crit_edge17:                                    ; preds = %.lr.ph16, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %31 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %31, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %32 = call ptr @_ZNSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  store ptr %32, ptr %9, align 8
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %33, label %.lr.ph19, label %._crit_edge20

.lr.ph16:                                         ; preds = %._crit_edge, %.lr.ph16
  %34 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZN7Riemann19TDynamicMeshOverlayIfLi2EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104) %34, i32 noundef %1)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %36, label %.lr.ph16, label %._crit_edge17

._crit_edge20:                                    ; preds = %.lr.ph19, %._crit_edge17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %37 = getelementptr inbounds i8, ptr %0, i64 64
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %.not = icmp eq ptr %38, null
  br i1 %.not, label %43, label %42

.lr.ph19:                                         ; preds = %._crit_edge17, %.lr.ph19
  %39 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @_ZN7Riemann19TDynamicMeshOverlayIfLi3EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104) %39, i32 noundef %1)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %41, label %.lr.ph19, label %._crit_edge20

42:                                               ; preds = %._crit_edge20
  call void @_ZN7Riemann19TDynamicMeshOverlayIfLi4EE16OnRemoveTriangleEi(ptr noundef nonnull align 8 dereferenceable(104) %38, i32 noundef %1)
  br label %43

43:                                               ; preds = %42, %._crit_edge20
  ret void
}

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 = { 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 #3 = { 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 #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, !9, i64 32}
!6 = !{!"_ZTSSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseEE", !7, i64 0, !9, i64 32}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !11, i64 0}
!15 = !{!16, !9, i64 64}
!16 = !{!"_ZTSN7Riemann23DynamicMeshAttributeSetE", !9, i64 0, !9, i64 8, !17, i64 16, !21, i64 40, !9, i64 64, !25, i64 72, !29, i64 96, !37, i64 144}
!17 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi2EN5Maths8TVector2IfEEEESaIS5_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!21 = !{!"_ZTSSt6vectorIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7Riemann25TDynamicMeshVectorOverlayIfLi3EN5Maths8TVector3IfEEEESaIS5_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!25 = !{!"_ZTSSt6vectorIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN7Riemann23TDynamicVertexAttributeIfLi1EEESaIS2_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!29 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN7Riemann21TDynamicAttributeBaseESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !30, i64 0}
!30 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !31, i64 0}
!31 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PN7Riemann21TDynamicAttributeBaseEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !32, i64 0, !34, i64 8}
!32 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !33, i64 0}
!33 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!34 = !{!"_ZTSSt15_Rb_tree_header", !35, i64 0, !12, i64 32}
!35 = !{!"_ZTSSt18_Rb_tree_node_base", !36, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!36 = !{!"_ZTSSt14_Rb_tree_color", !10, i64 0}
!37 = !{!"_ZTSSt6vectorIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann21TDynamicAttributeBaseESaIS2_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}


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