; LLVM IR from BehaviorTree/BehaviorTree.CPP :: src (xml_parsing)

; 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.BT::BehaviorTreeFactory" = type { %"class.std::unique_ptr.30" }
%"class.std::unique_ptr.30" = type { %"struct.std::__uniq_ptr_data.31" }
%"struct.std::__uniq_ptr_data.31" = type { %"class.std::__uniq_ptr_impl.32" }
%"class.std::__uniq_ptr_impl.32" = type { %"class.std::tuple.33" }
%"class.std::tuple.33" = type { %"struct.std::_Tuple_impl.34" }
%"struct.std::_Tuple_impl.34" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { ptr }
%"class.std::function.228" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.231 = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.232" = type { ptr }
%"class.std::map.233" = type { %"class.std::_Rb_tree.234" }
%"class.std::_Rb_tree.234" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, const BT::TreeNodeManifest *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, const BT::TreeNodeManifest *>>, 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>, const BT::TreeNodeManifest *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, const BT::TreeNodeManifest *>>, 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 }
%"struct.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair.246" = 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] }
%"struct.std::pair.242" = type <{ %"struct.std::_Rb_tree_iterator.244", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator.244" = type { ptr }
%"class.BT::Tree" = type <{ %"class.std::vector.115", %"class.std::unordered_map.77", %"class.std::shared_ptr", i16, [6 x i8] }>
%"class.std::vector.115" = type { %"struct.std::_Vector_base.116" }
%"struct.std::_Vector_base.116" = type { %"struct.std::_Vector_base<std::shared_ptr<BT::Tree::Subtree>, std::allocator<std::shared_ptr<BT::Tree::Subtree>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<BT::Tree::Subtree>, std::allocator<std::shared_ptr<BT::Tree::Subtree>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<BT::Tree::Subtree>, std::allocator<std::shared_ptr<BT::Tree::Subtree>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<BT::Tree::Subtree>, std::allocator<std::shared_ptr<BT::Tree::Subtree>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.77" = type { %"class.std::_Hashtable.78" }
%"class.std::_Hashtable.78" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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 }
%"struct.BT::Tree::Subtree" = type { %"class.std::vector.221", %"class.std::shared_ptr.120", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::vector.221" = type { %"struct.std::_Vector_base.222" }
%"struct.std::_Vector_base.222" = type { %"struct.std::_Vector_base<std::shared_ptr<BT::TreeNode>, std::allocator<std::shared_ptr<BT::TreeNode>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<BT::TreeNode>, std::allocator<std::shared_ptr<BT::TreeNode>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<BT::TreeNode>, std::allocator<std::shared_ptr<BT::TreeNode>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<BT::TreeNode>, std::allocator<std::shared_ptr<BT::TreeNode>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.120" = type { %"class.std::__shared_ptr.121" }
%"class.std::__shared_ptr.121" = type { ptr, %"class.std::__shared_count" }

@__dso_handle = external hidden global i8
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory = external hidden global %"class.BT::BehaviorTreeFactory", align 8
@_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory = external hidden global i64, align 8

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb1EEESE_(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(152) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEdeEv(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 @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2BT17addNodeModelToXMLERKNS_16TreeNodeManifestERN8tinyxml211XMLDocumentEPNS3_10XMLElementE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(776), ptr noundef) #3

declare noundef ptr @_ZN8tinyxml211XMLDocument10NewElementEPKc(ptr noundef nonnull align 8 dereferenceable(776), ptr noundef) #4

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

declare noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbb(ptr noundef nonnull align 8 dereferenceable(98) %0, ptr noundef nonnull align 8 dereferenceable(776) %1, ptr noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4) #3 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca %"class.std::function.228", align 8
  %12 = alloca %class.anon.231, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.232", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.232", align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::map.233", align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %24 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"struct.std::pair.246", align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"struct.std::pair.242", align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"struct.std::_Rb_tree_iterator.244", align 8
  %33 = alloca %"struct.std::_Rb_tree_iterator.244", align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  %37 = zext i1 %3 to i8
  store i8 %37, ptr %9, align 1, !tbaa !9
  %38 = zext i1 %4 to i8
  store i8 %38, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #0
  call void @_ZNSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #0
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #0
  %39 = getelementptr inbounds %class.anon.231, ptr %12, i32 0, i32 0
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %40, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.anon.231, ptr %12, i32 0, i32 1
  store ptr %9, ptr %41, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.anon.231, ptr %12, i32 0, i32 2
  store ptr %11, ptr %42, align 8, !tbaa !5
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEaSIZNS0_12addTreeToXMLERKNS0_4TreeERNS4_11XMLDocumentES6_bbE3$_0EENSt9enable_ifIXsrNS8_9_CallableIT_NSG_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISI_E4typeEE4typeES8_EE5valueESt5decayISI_EE4type4typeESt15__invoke_resultIRST_JS3_S6_EEEE5valueERS8_E4typeEOSI_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %44 unwind label %56

44:                                               ; preds = %5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #0
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #0
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.BT::Tree", ptr %45, i32 0, i32 0
  store ptr %46, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #0
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  %48 = call ptr @_ZNKSt6vectorISt10shared_ptrIN2BT4Tree7SubtreeEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #0
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.232", ptr %16, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #0
  %50 = load ptr, ptr %15, align 8, !tbaa !5
  %51 = call ptr @_ZNKSt6vectorISt10shared_ptrIN2BT4Tree7SubtreeEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #0
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.232", ptr %17, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  br label %53

53:                                               ; preds = %88, %44
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #0
  br i1 %54, label %60, label %55

55:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #0
  br label %94

56:                                               ; preds = %5
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %13, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #0
  br label %204

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #0
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #0
  store ptr %61, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #0
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = invoke noundef ptr @_ZN8tinyxml211XMLDocument10NewElementEPKc(ptr noundef nonnull align 8 dereferenceable(776) %62, ptr noundef @.str.33)
          to label %64 unwind label %90

64:                                               ; preds = %60
  store ptr %63, ptr %19, align 8, !tbaa !5
  %65 = load ptr, ptr %19, align 8, !tbaa !5
  %66 = load ptr, ptr %18, align 8, !tbaa !5
  %67 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2BT4Tree7SubtreeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %66) #0
  %68 = getelementptr inbounds %"struct.BT::Tree::Subtree", ptr %67, i32 0, i32 3
  %69 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %68) #0
  invoke void @_ZN8tinyxml210XMLElement12SetAttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %65, ptr noundef @.str.14, ptr noundef %69)
          to label %70 unwind label %90

70:                                               ; preds = %64
  %71 = load ptr, ptr %19, align 8, !tbaa !5
  %72 = load ptr, ptr %18, align 8, !tbaa !5
  %73 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2BT4Tree7SubtreeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %72) #0
  %74 = getelementptr inbounds %"struct.BT::Tree::Subtree", ptr %73, i32 0, i32 2
  %75 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %74) #0
  invoke void @_ZN8tinyxml210XMLElement12SetAttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %71, ptr noundef @.str.72, ptr noundef %75)
          to label %76 unwind label %90

76:                                               ; preds = %70
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %77, ptr noundef %78)
          to label %80 unwind label %90

80:                                               ; preds = %76
  %81 = load ptr, ptr %18, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2BT4Tree7SubtreeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %81) #0
  %83 = getelementptr inbounds %"struct.BT::Tree::Subtree", ptr %82, i32 0, i32 0
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN2BT8TreeNodeEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %83) #0
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt19__shared_ptr_accessIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %84) #0
  %86 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNKSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEclES3_S6_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef %86)
          to label %87 unwind label %90

87:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #0
  br label %88

88:                                               ; preds = %87
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #0
  br label %53

90:                                               ; preds = %80, %76, %70, %64, %60
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %13, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #0
  br label %204

94:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #0
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = invoke noundef ptr @_ZN8tinyxml211XMLDocument10NewElementEPKc(ptr noundef nonnull align 8 dereferenceable(776) %95, ptr noundef @.str.12)
          to label %97 unwind label %124

97:                                               ; preds = %94
  store ptr %96, ptr %20, align 8, !tbaa !5
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %98, ptr noundef %99)
          to label %101 unwind label %124

101:                                              ; preds = %97
  %102 = load atomic i8, ptr @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory acquire, align 8
  %103 = icmp eq i8 %102, 0
  br i1 %103, label %104, label %110, !prof !11

104:                                              ; preds = %101
  %105 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory) #0
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %110

107:                                              ; preds = %104
  invoke void @_ZN2BT19BehaviorTreeFactoryC1Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory)
          to label %108 unwind label %128

108:                                              ; preds = %107
  %109 = call i32 @__cxa_atexit(ptr @_ZN2BT19BehaviorTreeFactoryD1Ev, ptr @_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory) #0
  br label %110

110:                                              ; preds = %108, %104, %101
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #0
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #0
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #0
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %"class.BT::Tree", ptr %111, i32 0, i32 1
  store ptr %112, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #0
  %113 = load ptr, ptr %22, align 8, !tbaa !5
  %114 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %113) #0
  %115 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %23, i32 0, i32 0
  %116 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %115, i32 0, i32 0
  store ptr %114, ptr %116, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #0
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %117) #0
  %119 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %24, i32 0, i32 0
  %120 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %119, i32 0, i32 0
  store ptr %118, ptr %120, align 8
  br label %121

121:                                              ; preds = %171, %110
  %122 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #0
  br i1 %122, label %132, label %123

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #0
  br label %174

124:                                              ; preds = %97, %94
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %13, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %14, align 4
  br label %203

128:                                              ; preds = %107
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %13, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %14, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory) #0
  br label %203

132:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #0
  %133 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #0
  store ptr %133, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #0
  %134 = load ptr, ptr %25, align 8, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSD_(ptr noundef nonnull align 8 dereferenceable(152) %134) #0
  store ptr %135, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #0
  %136 = load ptr, ptr %25, align 8, !tbaa !5
  %137 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSD_(ptr noundef nonnull align 8 dereferenceable(152) %136) #0
  store ptr %137, ptr %27, align 8, !tbaa !5
  %138 = load i8, ptr %10, align 1, !tbaa !9, !range !12, !noundef !13
  %139 = trunc i8 %138 to i1
  br i1 %139, label %147, label %140

140:                                              ; preds = %132
  %141 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNK2BT19BehaviorTreeFactory12builtinNodesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory)
          to label %142 unwind label %157

142:                                              ; preds = %140
  %143 = load ptr, ptr %26, align 8, !tbaa !5
  %144 = invoke noundef i64 @_ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(48) %141, ptr noundef nonnull align 8 dereferenceable(32) %143)
          to label %145 unwind label %157

145:                                              ; preds = %142
  %146 = icmp ne i64 %144, 0
  br i1 %146, label %170, label %147

147:                                              ; preds = %145, %132
  call void @llvm.lifetime.start.p0(i64 40, ptr %28) #0
  %148 = load ptr, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #0
  %149 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %149, ptr %29, align 8, !tbaa !5
  invoke void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEC2IRS6_SA_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %28, ptr noundef nonnull align 8 dereferenceable(32) %148, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %150 unwind label %161

150:                                              ; preds = %147
  %151 = invoke { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE6insertEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(40) %28)
          to label %152 unwind label %165

152:                                              ; preds = %150
  %153 = getelementptr inbounds { ptr, i8 }, ptr %30, i32 0, i32 0
  %154 = extractvalue { ptr, i8 } %151, 0
  store ptr %154, ptr %153, align 8
  %155 = getelementptr inbounds { ptr, i8 }, ptr %30, i32 0, i32 1
  %156 = extractvalue { ptr, i8 } %151, 1
  store i8 %156, ptr %155, align 8
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %28) #0
  br label %170

157:                                              ; preds = %142, %140
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %13, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %14, align 4
  br label %173

161:                                              ; preds = %147
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %13, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %14, align 4
  br label %169

165:                                              ; preds = %150
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %13, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %14, align 4
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #0
  br label %169

169:                                              ; preds = %165, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %28) #0
  br label %173

170:                                              ; preds = %152, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #0
  br label %171

171:                                              ; preds = %170
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #0
  br label %121

173:                                              ; preds = %169, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #0
  br label %202

174:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #0
  store ptr %21, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #0
  %175 = load ptr, ptr %31, align 8, !tbaa !5
  %176 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %175) #0
  %177 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.244", ptr %32, i32 0, i32 0
  store ptr %176, ptr %177, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #0
  %178 = load ptr, ptr %31, align 8, !tbaa !5
  %179 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %178) #0
  %180 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.244", ptr %33, i32 0, i32 0
  store ptr %179, ptr %180, align 8
  br label %181

181:                                              ; preds = %195, %174
  %182 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEESF_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #0
  br i1 %182, label %184, label %183

183:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #0
  br label %201

184:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #0
  %185 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #0
  store ptr %185, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #0
  %186 = load ptr, ptr %34, align 8, !tbaa !5
  %187 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_(ptr noundef nonnull align 8 dereferenceable(40) %186) #0
  store ptr %187, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #0
  %188 = load ptr, ptr %34, align 8, !tbaa !5
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_(ptr noundef nonnull align 8 dereferenceable(40) %188) #0
  store ptr %189, ptr %36, align 8, !tbaa !5
  %190 = load ptr, ptr %36, align 8, !tbaa !5
  %191 = load ptr, ptr %190, align 8, !tbaa !5
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZN2BT17addNodeModelToXMLERKNS_16TreeNodeManifestERN8tinyxml211XMLDocumentEPNS3_10XMLElementE(ptr noundef nonnull align 8 dereferenceable(120) %191, ptr noundef nonnull align 8 dereferenceable(776) %192, ptr noundef %193)
          to label %194 unwind label %197

194:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #0
  br label %195

195:                                              ; preds = %194
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #0
  br label %181

197:                                              ; preds = %184
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %13, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #0
  br label %202

201:                                              ; preds = %183
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #0
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #0
  ret void

202:                                              ; preds = %197, %173
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #0
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #0
  br label %203

203:                                              ; preds = %202, %128, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #0
  br label %204

204:                                              ; preds = %203, %90, %56
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #0
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #0
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %13, align 8
  %207 = load i32, ptr %14, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEaSIZNS0_12addTreeToXMLERKNS0_4TreeERNS4_11XMLDocumentES6_bbE3$_0EENSt9enable_ifIXsrNS8_9_CallableIT_NSG_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISI_E4typeEE4typeES8_EE5valueESt5decayISI_EE4type4typeESt15__invoke_resultIRST_JS3_S6_EEEE5valueERS8_E4typeEOSI_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt10shared_ptrIN2BT4Tree7SubtreeEESaIS4_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_cxxneIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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

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

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

declare void @_ZN2BT19BehaviorTreeFactoryC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN2BT19BehaviorTreeFactoryD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

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

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

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZNK2BT19BehaviorTreeFactory12builtinNodesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE6insertEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_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_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEESF_(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_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

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

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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" }

!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 = !{!"bool", !7, i64 0}
!11 = !{!"branch_weights", i32 1, i32 1048575}
!12 = !{i8 0, i8 2}
!13 = !{}


; 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.BT::BehaviorTreeFactory" = type { %"class.std::unique_ptr.30" }
%"class.std::unique_ptr.30" = type { %"struct.std::__uniq_ptr_data.31" }
%"struct.std::__uniq_ptr_data.31" = type { %"class.std::__uniq_ptr_impl.32" }
%"class.std::__uniq_ptr_impl.32" = type { %"class.std::tuple.33" }
%"class.std::tuple.33" = type { %"struct.std::_Tuple_impl.34" }
%"struct.std::_Tuple_impl.34" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { ptr }
%"class.std::function.228" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.231 = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.232" = type { ptr }
%"class.std::map.233" = type { %"class.std::_Rb_tree.234" }
%"class.std::_Rb_tree.234" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, const BT::TreeNodeManifest *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, const BT::TreeNodeManifest *>>, 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>, const BT::TreeNodeManifest *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, const BT::TreeNodeManifest *>>, 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 }
%"struct.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair.246" = 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] }
%"struct.std::_Rb_tree_iterator.244" = type { ptr }

@__dso_handle = external hidden global i8
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory = external hidden global %"class.BT::BehaviorTreeFactory", align 8
@_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory = external hidden global i64, align 8

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb1EEESE_(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(152) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEdeEv(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 @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2BT17addNodeModelToXMLERKNS_16TreeNodeManifestERN8tinyxml211XMLDocumentEPNS3_10XMLElementE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(776), ptr noundef) local_unnamed_addr #3

declare noundef ptr @_ZN8tinyxml211XMLDocument10NewElementEPKc(ptr noundef nonnull align 8 dereferenceable(776), ptr noundef) local_unnamed_addr #4

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

declare noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbb(ptr noundef nonnull align 8 dereferenceable(98) %0, ptr noundef nonnull align 8 dereferenceable(776) %1, ptr noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::function.228", align 8
  %8 = alloca %class.anon.231, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.232", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.232", align 8
  %11 = alloca %"class.std::map.233", align 8
  %12 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %13 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %14 = alloca %"struct.std::pair.246", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator.244", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator.244", align 8
  %18 = zext i1 %3 to i8
  store i8 %18, ptr %6, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  store ptr %1, ptr %8, align 8, !tbaa !9
  %19 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %6, ptr %19, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %7, ptr %20, align 8, !tbaa !9
  %21 = invoke noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEaSIZNS0_12addTreeToXMLERKNS0_4TreeERNS4_11XMLDocumentES6_bbE3$_0EENSt9enable_ifIXsrNS8_9_CallableIT_NSG_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISI_E4typeEE4typeES8_EE5valueESt5decayISI_EE4type4typeESt15__invoke_resultIRST_JS3_S6_EEEE5valueERS8_E4typeEOSI_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %22 unwind label %27

22:                                               ; preds = %5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %23 = call ptr @_ZNKSt6vectorISt10shared_ptrIN2BT4Tree7SubtreeEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %23, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %24 = call ptr @_ZNKSt6vectorISt10shared_ptrIN2BT4Tree7SubtreeEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %24, ptr %10, align 8
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %45, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %26 = invoke noundef ptr @_ZN8tinyxml211XMLDocument10NewElementEPKc(ptr noundef nonnull align 8 dereferenceable(776) %1, ptr noundef nonnull @.str.12)
          to label %50 unwind label %78

27:                                               ; preds = %5
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %113

.lr.ph:                                           ; preds = %22, %45
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %30 = invoke noundef ptr @_ZN8tinyxml211XMLDocument10NewElementEPKc(ptr noundef nonnull align 8 dereferenceable(776) %1, ptr noundef nonnull @.str.33)
          to label %31 unwind label %48

31:                                               ; preds = %.lr.ph
  %32 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2BT4Tree7SubtreeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  %33 = getelementptr inbounds i8, ptr %32, i64 72
  %34 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %33) #7
  invoke void @_ZN8tinyxml210XMLElement12SetAttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %30, ptr noundef nonnull @.str.14, ptr noundef %34)
          to label %35 unwind label %48

35:                                               ; preds = %31
  %36 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2BT4Tree7SubtreeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  %37 = getelementptr inbounds i8, ptr %36, i64 40
  %38 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %37) #7
  invoke void @_ZN8tinyxml210XMLElement12SetAttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %30, ptr noundef nonnull @.str.72, ptr noundef %38)
          to label %39 unwind label %48

39:                                               ; preds = %35
  %40 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %2, ptr noundef nonnull %30)
          to label %41 unwind label %48

41:                                               ; preds = %39
  %42 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2BT4Tree7SubtreeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN2BT8TreeNodeEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #7
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt19__shared_ptr_accessIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %43) #7
  invoke void @_ZNKSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEclES3_S6_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull %30)
          to label %45 unwind label %48

45:                                               ; preds = %41
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %47, label %.lr.ph, label %._crit_edge

48:                                               ; preds = %41, %39, %35, %31, %.lr.ph
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %113

50:                                               ; preds = %._crit_edge
  %51 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %2, ptr noundef %26)
          to label %52 unwind label %78

52:                                               ; preds = %50
  %53 = load atomic i8, ptr @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory acquire, align 8
  %54 = icmp eq i8 %53, 0
  br i1 %54, label %55, label %60, !prof !11

55:                                               ; preds = %52
  %56 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory) #7
  %.not = icmp eq i32 %56, 0
  br i1 %.not, label %60, label %57

57:                                               ; preds = %55
  invoke void @_ZN2BT19BehaviorTreeFactoryC1Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory)
          to label %58 unwind label %80

58:                                               ; preds = %57
  %59 = call i32 @__cxa_atexit(ptr nonnull @_ZN2BT19BehaviorTreeFactoryD1Ev, ptr nonnull @_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory, ptr nonnull @__dso_handle) #7
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory) #7
  br label %60

60:                                               ; preds = %58, %55, %52
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  %61 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %62 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %61) #7
  store ptr %62, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %63 = call ptr @_ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %61) #7
  store ptr %63, ptr %13, align 8
  %64 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %64, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %60
  br i1 %4, label %.lr.ph46.split.us, label %.lr.ph46.split

.lr.ph46.split.us:                                ; preds = %.lr.ph46, %70
  %65 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSD_(ptr noundef nonnull align 8 dereferenceable(152) %65) #7
  %67 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSD_(ptr noundef nonnull align 8 dereferenceable(152) %65) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store ptr %67, ptr %15, align 8, !tbaa !9
  invoke void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEC2IRS6_SA_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(32) %66, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %68 unwind label %.split.us

68:                                               ; preds = %.lr.ph46.split.us
  %69 = invoke { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE6insertEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %70 unwind label %.split49.us

70:                                               ; preds = %68
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %72 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %72, label %.lr.ph46.split.us, label %._crit_edge47

.split.us:                                        ; preds = %.lr.ph46.split.us
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %98

.split49.us:                                      ; preds = %68
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %97

._crit_edge47:                                    ; preds = %99, %70, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %75 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  store ptr %75, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %76 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  store ptr %76, ptr %17, align 8
  %77 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEESF_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %77, label %.lr.ph52, label %._crit_edge53

78:                                               ; preds = %50, %._crit_edge
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %113

80:                                               ; preds = %57
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory) #7
  br label %113

.lr.ph46.split:                                   ; preds = %.lr.ph46, %99
  %82 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSD_(ptr noundef nonnull align 8 dereferenceable(152) %82) #7
  %84 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSD_(ptr noundef nonnull align 8 dereferenceable(152) %82) #7
  %85 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNK2BT19BehaviorTreeFactory12builtinNodesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(8) @_ZZN2BT12addTreeToXMLERKNS_4TreeERN8tinyxml211XMLDocumentEPNS3_10XMLElementEbbE12temp_factory)
          to label %86 unwind label %93

86:                                               ; preds = %.lr.ph46.split
  %87 = invoke noundef i64 @_ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(48) %85, ptr noundef nonnull align 8 dereferenceable(32) %83)
          to label %88 unwind label %93

88:                                               ; preds = %86
  %.not38 = icmp eq i64 %87, 0
  br i1 %.not38, label %89, label %99

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store ptr %84, ptr %15, align 8, !tbaa !9
  invoke void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEC2IRS6_SA_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(32) %83, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %90 unwind label %.split

90:                                               ; preds = %89
  %91 = invoke { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE6insertEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %92 unwind label %.split49

92:                                               ; preds = %90
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  br label %99

93:                                               ; preds = %86, %.lr.ph46.split
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %102

.split:                                           ; preds = %89
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %98

.split49:                                         ; preds = %90
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %97

97:                                               ; preds = %.split49.us, %.split49
  %.us-phi50 = phi { ptr, i32 } [ %96, %.split49 ], [ %74, %.split49.us ]
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  br label %98

98:                                               ; preds = %.split, %.split.us, %97
  %.pn = phi { ptr, i32 } [ %.us-phi50, %97 ], [ %95, %.split ], [ %73, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  br label %102

99:                                               ; preds = %92, %88
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %101 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT16TreeNodeManifestEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %101, label %.lr.ph46.split, label %._crit_edge47

102:                                              ; preds = %98, %93
  %.pn.pn = phi { ptr, i32 } [ %.pn, %98 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %112

._crit_edge53:                                    ; preds = %107, %._crit_edge47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  ret void

.lr.ph52:                                         ; preds = %._crit_edge47, %107
  %103 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %104 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_(ptr noundef nonnull align 8 dereferenceable(40) %103) #7
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_(ptr noundef nonnull align 8 dereferenceable(40) %103) #7
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  invoke void @_ZN2BT17addNodeModelToXMLERKNS_16TreeNodeManifestERN8tinyxml211XMLDocumentEPNS3_10XMLElementE(ptr noundef nonnull align 8 dereferenceable(120) %106, ptr noundef nonnull align 8 dereferenceable(776) %1, ptr noundef %26)
          to label %107 unwind label %110

107:                                              ; preds = %.lr.ph52
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %109 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEESF_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %109, label %.lr.ph52, label %._crit_edge53

110:                                              ; preds = %.lr.ph52
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %112

112:                                              ; preds = %110, %102
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %102 ], [ %111, %110 ]
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #7
  br label %113

113:                                              ; preds = %78, %80, %112, %48, %27
  %.pn43 = phi { ptr, i32 } [ %49, %48 ], [ %28, %27 ], [ %.pn.pn.pn, %112 ], [ %81, %80 ], [ %79, %78 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  resume { ptr, i32 } %.pn43
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRKN2BT8TreeNodeEPN8tinyxml210XMLElementEEEaSIZNS0_12addTreeToXMLERKNS0_4TreeERNS4_11XMLDocumentES6_bbE3$_0EENSt9enable_ifIXsrNS8_9_CallableIT_NSG_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISI_E4typeEE4typeES8_EE5valueESt5decayISI_EE4type4typeESt15__invoke_resultIRST_JS3_S6_EEEE5valueERS8_E4typeEOSI_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt10shared_ptrIN2BT4Tree7SubtreeEESaIS4_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_cxxneIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt19__shared_ptr_accessIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) 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_iteratorIPKSt10shared_ptrIN2BT4Tree7SubtreeEESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

declare void @_ZN2BT19BehaviorTreeFactoryC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN2BT19BehaviorTreeFactoryD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

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

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

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZNK2BT19BehaviorTreeFactory12builtinNodesB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_EEE6insertEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_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_traitsIcESaIcEEEPKN2BT16TreeNodeManifestESt4lessIS5_ESaISt4pairIKS5_S9_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_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEESF_(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_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEEEdeEv(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(32) ptr @_ZSt3getILm0EKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN2BT16TreeNodeManifestEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSF_(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

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

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

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

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

attributes #0 = { nofree nounwind }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"branch_weights", i32 1, i32 1048575}


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