; 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::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.std::_Rb_tree_iterator" = type { 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.std::shared_ptr.120" = type { %"class.std::__shared_ptr.121" }
%"class.std::__shared_ptr.121" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.123" = type { %"class.std::__shared_ptr.124" }
%"class.std::__shared_ptr.124" = type { ptr, %"class.std::__shared_count" }
%"class.BT::XMLParser" = type { %"class.BT::Parser", %"class.std::unique_ptr.3" }
%"class.BT::Parser" = type { ptr }
%"class.std::unique_ptr.3" = type { %"struct.std::__uniq_ptr_data.4" }
%"struct.std::__uniq_ptr_data.4" = type { %"class.std::__uniq_ptr_impl.5" }
%"class.std::__uniq_ptr_impl.5" = type { %"class.std::tuple.6" }
%"class.std::tuple.6" = type { %"struct.std::_Tuple_impl.7" }
%"struct.std::_Tuple_impl.7" = type { %"struct.std::_Head_base.10" }
%"struct.std::_Head_base.10" = type { ptr }
%"struct.BT::XMLParser::PImpl" = type <{ %"class.std::__cxx11::list", %"class.std::map", ptr, %"class.std::filesystem::__cxx11::path", %"class.std::map.25", i32, [4 x i8] }>
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::unique_ptr<tinyxml2::XMLDocument>, std::allocator<std::unique_ptr<tinyxml2::XMLDocument>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::unique_ptr<tinyxml2::XMLDocument>, std::allocator<std::unique_ptr<tinyxml2::XMLDocument>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, const tinyxml2::XMLElement *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, const tinyxml2::XMLElement *>>, 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 tinyxml2::XMLElement *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, const tinyxml2::XMLElement *>>, 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::filesystem::__cxx11::path" = type { %"class.std::__cxx11::basic_string", %"struct.std::filesystem::__cxx11::path::_List" }
%"struct.std::filesystem::__cxx11::path::_List" = type { %"class.std::unique_ptr.17" }
%"class.std::unique_ptr.17" = type { %"struct.std::__uniq_ptr_data.18" }
%"struct.std::__uniq_ptr_data.18" = type { %"class.std::__uniq_ptr_impl.19" }
%"class.std::__uniq_ptr_impl.19" = type { %"class.std::tuple.20" }
%"class.std::tuple.20" = type { %"struct.std::_Tuple_impl.21" }
%"struct.std::_Tuple_impl.21" = type { %"struct.std::_Head_base.24" }
%"struct.std::_Head_base.24" = type { ptr }
%"class.std::map.25" = type { %"class.std::_Rb_tree.26" }
%"class.std::_Rb_tree.26" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, BT::SubtreeModel>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, BT::SubtreeModel>>, 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>, BT::SubtreeModel>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, BT::SubtreeModel>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", ptr }

@_ZTIN2BT12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.43 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [61 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, ptr noundef) #2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml211XMLDocument11RootElementEv(ptr noundef nonnull align 8 dereferenceable(776)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2BT9XMLParser15instantiateTreeERKSt10shared_ptrINS_10BlackboardEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.BT::Tree") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::shared_ptr.120", align 8
  %18 = alloca %"class.std::shared_ptr.123", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8
  store i1 false, ptr %9, align 1
  call void @_ZN2BT4TreeC1Ev(ptr noundef nonnull align 8 dereferenceable(98) %0)
  %20 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br i1 %20, label %21, label %77

21:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %22 = getelementptr inbounds %"class.BT::XMLParser", ptr %19, i32 0, i32 1
  %23 = call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %24 = getelementptr inbounds %"struct.BT::XMLParser::PImpl", ptr %23, i32 0, i32 0
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listISt10unique_ptrIN8tinyxml211XMLDocumentESt14default_deleteIS3_EESaIS6_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  %26 = call noundef ptr @_ZNKSt10unique_ptrIN8tinyxml211XMLDocumentESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %27 = invoke noundef ptr @_ZN8tinyxml211XMLDocument11RootElementEv(ptr noundef nonnull align 8 dereferenceable(776) %26)
          to label %28 unwind label %38

28:                                               ; preds = %21
  store ptr %27, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %29, ptr noundef @.str.43, ptr noundef null)
          to label %31 unwind label %42

31:                                               ; preds = %28
  store ptr %30, ptr %13, align 8, !tbaa !5
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %46

34:                                               ; preds = %31
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  %36 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %35)
          to label %37 unwind label %42

37:                                               ; preds = %34
  br label %74

38:                                               ; preds = %21
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %11, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %12, align 4
  br label %76

42:                                               ; preds = %68, %34, %28
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %11, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %12, align 4
  br label %75

46:                                               ; preds = %31
  %47 = getelementptr inbounds %"class.BT::XMLParser", ptr %19, i32 0, i32 1
  %48 = call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #6
  %49 = getelementptr inbounds %"struct.BT::XMLParser::PImpl", ptr %48, i32 0, i32 1
  %50 = call noundef i64 @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN8tinyxml210XMLElementESt4lessIS5_ESaISt4pairIKS5_S9_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %49) #6
  %51 = icmp eq i64 %50, 1
  br i1 %51, label %52, label %66

52:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %53 = getelementptr inbounds %"class.BT::XMLParser", ptr %19, i32 0, i32 1
  %54 = call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %53) #6
  %55 = getelementptr inbounds %"struct.BT::XMLParser::PImpl", ptr %54, i32 0, i32 1
  %56 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN8tinyxml210XMLElementESt4lessIS5_ESaISt4pairIKS5_S9_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %55) #6
  %57 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  %58 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN8tinyxml210XMLElementEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 0
  %60 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %59)
          to label %61 unwind label %62

61:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %73

62:                                               ; preds = %52
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %11, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %75

66:                                               ; preds = %46
  %67 = call ptr @__cxa_allocate_exception(i64 40) #6
  invoke void @_ZN2BT12RuntimeErrorC2IJA51_cEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(40) %67, ptr noundef nonnull align 1 dereferenceable(51) @.str.44)
          to label %68 unwind label %69

68:                                               ; preds = %66
  invoke void @__cxa_throw(ptr %67, ptr @_ZTIN2BT12RuntimeErrorE, ptr @_ZN2BT21BehaviorTreeExceptionD2Ev) #7
          to label %110 unwind label %42

69:                                               ; preds = %66
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %11, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %12, align 4
  call void @__cxa_free_exception(ptr %67) #6
  br label %75

73:                                               ; preds = %61
  br label %74

74:                                               ; preds = %73, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %77

75:                                               ; preds = %69, %62, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %76

76:                                               ; preds = %75, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %104

77:                                               ; preds = %74, %4
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN2BT10BlackboardELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %78) #6
  br i1 %79, label %91, label %80

80:                                               ; preds = %77
  %81 = call ptr @__cxa_allocate_exception(i64 40) #6
  invoke void @_ZN2BT12RuntimeErrorC2IJA61_cEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(40) %81, ptr noundef nonnull align 1 dereferenceable(61) @.str.45)
          to label %82 unwind label %83

82:                                               ; preds = %80
  invoke void @__cxa_throw(ptr %81, ptr @_ZTIN2BT12RuntimeErrorE, ptr @_ZN2BT21BehaviorTreeExceptionD2Ev) #7
          to label %110 unwind label %87

83:                                               ; preds = %80
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %11, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %12, align 4
  call void @__cxa_free_exception(ptr %81) #6
  br label %104

87:                                               ; preds = %95, %82
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %11, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %12, align 4
  br label %104

91:                                               ; preds = %77
  %92 = getelementptr inbounds %"class.BT::XMLParser", ptr %19, i32 0, i32 1
  %93 = call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %92) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN2BT10BlackboardEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %94) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  call void @_ZNSt10shared_ptrIN2BT8TreeNodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  invoke void @_ZN2BT9XMLParser5PImpl24recursivelyCreateSubtreeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_RNS_4TreeESt10shared_ptrINS_10BlackboardEERKSC_INS_8TreeNodeEE(ptr noundef nonnull align 8 dereferenceable(172) %93, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(98) %0, ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %95 unwind label %98

95:                                               ; preds = %91
  call void @_ZNSt12__shared_ptrIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZNSt12__shared_ptrIN2BT10BlackboardELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  invoke void @_ZN2BT4Tree10initializeEv(ptr noundef nonnull align 8 dereferenceable(98) %0)
          to label %96 unwind label %87

96:                                               ; preds = %95
  store i1 true, ptr %9, align 1
  %97 = load i1, ptr %9, align 1
  br i1 %97, label %103, label %102

98:                                               ; preds = %91
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %11, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %12, align 4
  call void @_ZNSt12__shared_ptrIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZNSt12__shared_ptrIN2BT10BlackboardELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %104

102:                                              ; preds = %96
  call void @_ZN2BT4TreeD1Ev(ptr noundef nonnull align 8 dereferenceable(98) %0) #6
  br label %103

103:                                              ; preds = %102, %96
  ret void

104:                                              ; preds = %98, %87, %83, %76
  call void @_ZN2BT4TreeD1Ev(ptr noundef nonnull align 8 dereferenceable(98) %0) #6
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %11, align 8
  %107 = load i32, ptr %12, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109

110:                                              ; preds = %82, %68
  unreachable
}

declare void @_ZN2BT4TreeC1Ev(ptr noundef nonnull align 8 dereferenceable(98)) unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN2BT4Tree10initializeEv(ptr noundef nonnull align 8 dereferenceable(98)) #2

; Function Attrs: nounwind
declare void @_ZN2BT4TreeD1Ev(ptr noundef nonnull align 8 dereferenceable(98)) unnamed_addr #4

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; 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::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.std::_Rb_tree_iterator" = type { 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.std::shared_ptr.120" = type { %"class.std::__shared_ptr.121" }
%"class.std::__shared_ptr.121" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.123" = type { %"class.std::__shared_ptr.124" }
%"class.std::__shared_ptr.124" = type { ptr, %"class.std::__shared_count" }

@_ZTIN2BT12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.43 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [61 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2BT9XMLParser15instantiateTreeERKSt10shared_ptrINS_10BlackboardEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias nonnull writable sret(%"class.BT::Tree") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::shared_ptr.120", align 8
  %9 = alloca %"class.std::shared_ptr.123", align 8
  tail call void @_ZN2BT4TreeC1Ev(ptr noundef nonnull align 8 dereferenceable(98) %0)
  %10 = tail call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br i1 %10, label %11, label %45

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = tail call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listISt10unique_ptrIN8tinyxml211XMLDocumentESt14default_deleteIS3_EESaIS6_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %15 = tail call noundef ptr @_ZNKSt10unique_ptrIN8tinyxml211XMLDocumentESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %16 = invoke noundef ptr @_ZN8tinyxml211XMLDocument11RootElementEv(ptr noundef nonnull align 8 dereferenceable(776) %15)
          to label %17 unwind label %22

17:                                               ; preds = %11
  %18 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef nonnull @.str.43, ptr noundef null)
          to label %19 unwind label %24

19:                                               ; preds = %17
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %26, label %20

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %18)
          to label %45 unwind label %24

22:                                               ; preds = %11
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %61

24:                                               ; preds = %42, %20, %17
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %61

26:                                               ; preds = %19
  %27 = tail call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %28 = getelementptr inbounds i8, ptr %27, i64 24
  %29 = tail call noundef i64 @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN8tinyxml210XMLElementESt4lessIS5_ESaISt4pairIKS5_S9_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %28) #6
  %30 = icmp eq i64 %29, 1
  br i1 %30, label %31, label %40

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %32 = tail call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %33 = getelementptr inbounds i8, ptr %32, i64 24
  %34 = tail call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN8tinyxml210XMLElementESt4lessIS5_ESaISt4pairIKS5_S9_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %33) #6
  store ptr %34, ptr %5, align 8
  %35 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN8tinyxml210XMLElementEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %36 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %37 unwind label %38

37:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %45

38:                                               ; preds = %31
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %61

40:                                               ; preds = %26
  %41 = tail call ptr @__cxa_allocate_exception(i64 40) #6
  invoke void @_ZN2BT12RuntimeErrorC2IJA51_cEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(40) %41, ptr noundef nonnull align 1 dereferenceable(51) @.str.44)
          to label %42 unwind label %43

42:                                               ; preds = %40
  invoke void @__cxa_throw(ptr nonnull %41, ptr nonnull @_ZTIN2BT12RuntimeErrorE, ptr nonnull @_ZN2BT21BehaviorTreeExceptionD2Ev) #7
          to label %62 unwind label %24

43:                                               ; preds = %40
  %44 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %41) #6
  br label %61

45:                                               ; preds = %37, %20, %4
  %46 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN2BT10BlackboardELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  br i1 %46, label %54, label %47

47:                                               ; preds = %45
  %48 = call ptr @__cxa_allocate_exception(i64 40) #6
  invoke void @_ZN2BT12RuntimeErrorC2IJA61_cEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef nonnull align 1 dereferenceable(61) @.str.45)
          to label %49 unwind label %50

49:                                               ; preds = %47
  invoke void @__cxa_throw(ptr nonnull %48, ptr nonnull @_ZTIN2BT12RuntimeErrorE, ptr nonnull @_ZN2BT21BehaviorTreeExceptionD2Ev) #7
          to label %62 unwind label %52

50:                                               ; preds = %47
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %48) #6
  br label %61

52:                                               ; preds = %57, %49
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %61

54:                                               ; preds = %45
  %55 = getelementptr inbounds i8, ptr %1, i64 8
  %56 = call noundef ptr @_ZNKSt10unique_ptrIN2BT9XMLParser5PImplESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt10shared_ptrIN2BT10BlackboardEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZNSt10shared_ptrIN2BT8TreeNodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  invoke void @_ZN2BT9XMLParser5PImpl24recursivelyCreateSubtreeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_RNS_4TreeESt10shared_ptrINS_10BlackboardEERKSC_INS_8TreeNodeEE(ptr noundef nonnull align 8 dereferenceable(172) %56, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(98) %0, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %57 unwind label %58

57:                                               ; preds = %54
  call void @_ZNSt12__shared_ptrIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZNSt12__shared_ptrIN2BT10BlackboardELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  invoke void @_ZN2BT4Tree10initializeEv(ptr noundef nonnull align 8 dereferenceable(98) %0)
          to label %60 unwind label %52

58:                                               ; preds = %54
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN2BT8TreeNodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZNSt12__shared_ptrIN2BT10BlackboardELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %61

60:                                               ; preds = %57
  ret void

61:                                               ; preds = %22, %43, %38, %24, %58, %52, %50
  %.pn14 = phi { ptr, i32 } [ %53, %52 ], [ %59, %58 ], [ %51, %50 ], [ %23, %22 ], [ %25, %24 ], [ %39, %38 ], [ %44, %43 ]
  call void @_ZN2BT4TreeD1Ev(ptr noundef nonnull align 8 dereferenceable(98) %0) #6
  resume { ptr, i32 } %.pn14

62:                                               ; preds = %49, %42
  unreachable
}

declare void @_ZN2BT4TreeC1Ev(ptr noundef nonnull align 8 dereferenceable(98)) unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN2BT4Tree10initializeEv(ptr noundef nonnull align 8 dereferenceable(98)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN2BT4TreeD1Ev(ptr noundef nonnull align 8 dereferenceable(98)) unnamed_addr #4

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass