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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__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::allocator" = type { i8 }
%"struct.std::pair.61" = type <{ ptr, i32, [4 x i8] }>
%"class.BT::PortInfo" = type { %"class.BT::TypeInfo", i32, %"class.std::__cxx11::basic_string", %"class.BT::Any", %"class.std::__cxx11::basic_string" }
%"class.BT::TypeInfo" = type { %"struct.std::type_index", %"class.std::function", %"class.std::__cxx11::basic_string" }
%"struct.std::type_index" = type { ptr }
%"class.std::function" = 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.BT::Any" = type { %"class.linb::any", %"struct.std::type_index" }
%"class.linb::any" = type { %"union.linb::any::storage_union", ptr }
%"union.linb::any::storage_union" = type { ptr, [8 x i8] }
%"class.std::basic_string_view" = type { i64, 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.BT::SubtreeModel" = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = 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 }

@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [49 x i8], align 1
@_ZTIN2BT12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 uwtable
define dso_local void @_ZN2BT9XMLParser5PImpl16loadSubtreeModelEPKN8tinyxml210XMLElementE(ptr noundef nonnull align 8 dereferenceable(172) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca [3 x %"struct.std::pair.61"], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"class.BT::PortInfo", align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %"class.std::basic_string_view", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef @.str.12)
  store ptr %34, ptr %5, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %171, %2
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %174

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %40, ptr noundef @.str.13)
  store ptr %41, ptr %7, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %166, %39
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %170

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %47, ptr noundef @.str.14, ptr noundef null)
  store ptr %48, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %49 = getelementptr inbounds %"struct.BT::XMLParser::PImpl", ptr %32, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %50, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %51 unwind label %66

51:                                               ; preds = %46
  %52 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT12SubtreeModelESt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %49, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %53 unwind label %70

53:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  store ptr %52, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @_ZNSt4pairIPKcN2BT13PortDirectionEEC2IRA11_S0_S3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(12) %14, ptr noundef nonnull align 1 dereferenceable(11) @.str.15, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %54 = getelementptr inbounds %"struct.std::pair.61", ptr %14, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !9
  call void @_ZNSt4pairIPKcN2BT13PortDirectionEEC2IRA12_S0_S3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(12) %54, ptr noundef nonnull align 1 dereferenceable(12) @.str.16, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %55 = getelementptr inbounds %"struct.std::pair.61", ptr %14, i64 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 2, ptr %17, align 4, !tbaa !9
  call void @_ZNSt4pairIPKcN2BT13PortDirectionEEC2IRA11_S0_S3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(12) %55, ptr noundef nonnull align 1 dereferenceable(11) @.str.17, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store ptr %14, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %56 = load ptr, ptr %18, align 8, !tbaa !5
  %57 = getelementptr inbounds [3 x %"struct.std::pair.61"], ptr %56, i64 0, i64 0
  store ptr %57, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  %59 = getelementptr inbounds [3 x %"struct.std::pair.61"], ptr %58, i64 0, i64 0
  %60 = getelementptr inbounds %"struct.std::pair.61", ptr %59, i64 3
  store ptr %60, ptr %20, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %162, %53
  %62 = load ptr, ptr %19, align 8, !tbaa !5
  %63 = load ptr, ptr %20, align 8, !tbaa !5
  %64 = icmp ne ptr %62, %63
  br i1 %64, label %75, label %65

65:                                               ; preds = %61
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %165

66:                                               ; preds = %46
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %12, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %13, align 4
  br label %74

70:                                               ; preds = %51
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %12, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  br label %169

75:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %76, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %77 = load ptr, ptr %21, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %77) #6
  store ptr %78, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %79 = load ptr, ptr %21, align 8, !tbaa !5
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %79) #6
  store ptr %80, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = load ptr, ptr %22, align 8, !tbaa !5
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %81, ptr noundef %83)
  store ptr %84, ptr %24, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %146, %75
  %86 = load ptr, ptr %24, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %161

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 176, ptr %25) #6
  %90 = load ptr, ptr %23, align 8, !tbaa !5
  %91 = load i32, ptr %90, align 4, !tbaa !9
  call void @_ZN2BT8PortInfoC2ENS_13PortDirectionE(ptr noundef nonnull align 8 dereferenceable(176) %25, i32 noundef %91)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %92 = load ptr, ptr %24, align 8, !tbaa !5
  %93 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %92, ptr noundef @.str.18, ptr noundef null)
          to label %94 unwind label %100

94:                                               ; preds = %89
  store ptr %93, ptr %26, align 8, !tbaa !5
  %95 = load ptr, ptr %26, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %108, label %97

97:                                               ; preds = %94
  %98 = call ptr @__cxa_allocate_exception(i64 40) #6
  invoke void @_ZN2BT12RuntimeErrorC2IJA49_cEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(40) %98, ptr noundef nonnull align 1 dereferenceable(49) @.str.19)
          to label %99 unwind label %104

99:                                               ; preds = %97
  invoke void @__cxa_throw(ptr %98, ptr @_ZTIN2BT12RuntimeErrorE, ptr @_ZN2BT21BehaviorTreeExceptionD2Ev) #7
          to label %180 unwind label %100

100:                                              ; preds = %99, %89
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %12, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %13, align 4
  br label %160

104:                                              ; preds = %97
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %12, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %13, align 4
  call void @__cxa_free_exception(ptr %98) #6
  br label %160

108:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %109 = load ptr, ptr %24, align 8, !tbaa !5
  %110 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %109, ptr noundef @.str.20, ptr noundef null)
          to label %111 unwind label %116

111:                                              ; preds = %108
  store ptr %110, ptr %27, align 8, !tbaa !5
  %112 = load ptr, ptr %27, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %120

114:                                              ; preds = %111
  invoke void @_ZN2BT8PortInfo15setDefaultValueIPKcEEvRKT_(ptr noundef nonnull align 8 dereferenceable(176) %25, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %115 unwind label %116

115:                                              ; preds = %114
  br label %120

116:                                              ; preds = %114, %108
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %12, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %160

120:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %121 = load ptr, ptr %24, align 8, !tbaa !5
  %122 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %121, ptr noundef @.str.21, ptr noundef null)
          to label %123 unwind label %133

123:                                              ; preds = %120
  store ptr %122, ptr %28, align 8, !tbaa !5
  %124 = load ptr, ptr %28, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %137

126:                                              ; preds = %123
  %127 = load ptr, ptr %28, align 8, !tbaa !5
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef %127) #6
  %128 = getelementptr inbounds { i64, ptr }, ptr %29, i32 0, i32 0
  %129 = load i64, ptr %128, align 8
  %130 = getelementptr inbounds { i64, ptr }, ptr %29, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8
  invoke void @_ZN2BT8PortInfo14setDescriptionESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(176) %25, i64 %129, ptr %131)
          to label %132 unwind label %133

132:                                              ; preds = %126
  br label %137

133:                                              ; preds = %126, %120
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %12, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %160

137:                                              ; preds = %132, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.BT::SubtreeModel", ptr %138, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #6
  %140 = load ptr, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef %140, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %141 unwind label %151

141:                                              ; preds = %137
  %142 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT8PortInfoESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %139, ptr noundef nonnull align 8 dereferenceable(32) %30)
          to label %143 unwind label %155

143:                                              ; preds = %141
  %144 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZN2BT8PortInfoaSEOS0_(ptr noundef nonnull align 8 dereferenceable(176) %142, ptr noundef nonnull align 8 dereferenceable(176) %25)
          to label %145 unwind label %155

145:                                              ; preds = %143
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @_ZN2BT8PortInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %25) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr %25) #6
  br label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr %24, align 8, !tbaa !5
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  %150 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %147, ptr noundef %149)
  store ptr %150, ptr %24, align 8, !tbaa !5
  br label %85, !llvm.loop !11

151:                                              ; preds = %137
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %12, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %13, align 4
  br label %159

155:                                              ; preds = %143, %141
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %12, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %159

159:                                              ; preds = %155, %151
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #6
  br label %160

160:                                              ; preds = %159, %133, %116, %104, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @_ZN2BT8PortInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %25) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  br label %169

161:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %162

162:                                              ; preds = %161
  %163 = load ptr, ptr %19, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.std::pair.61", ptr %163, i32 1
  store ptr %164, ptr %19, align 8, !tbaa !5
  br label %61

165:                                              ; preds = %65
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %167, ptr noundef @.str.13)
  store ptr %168, ptr %7, align 8, !tbaa !5
  br label %42, !llvm.loop !13

169:                                              ; preds = %160, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %175

170:                                              ; preds = %45
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %172, ptr noundef @.str.12)
  store ptr %173, ptr %5, align 8, !tbaa !5
  br label %35, !llvm.loop !14

174:                                              ; preds = %38
  ret void

175:                                              ; preds = %169
  %176 = load ptr, ptr %12, align 8
  %177 = load i32, ptr %13, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179

180:                                              ; preds = %99
  unreachable
}

declare noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #3

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2BT8PortInfoC2ENS_13PortDirectionE(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @_ZN2BT8PortInfo14setDescriptionESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(176), i64, ptr) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT8PortInfoESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZN2BT8PortInfoaSEOS0_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(176)) #4 align 2

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

declare noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN2BT13PortDirectionE", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__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::allocator" = type { i8 }
%"struct.std::pair.61" = type <{ ptr, i32, [4 x i8] }>
%"class.BT::PortInfo" = type { %"class.BT::TypeInfo", i32, %"class.std::__cxx11::basic_string", %"class.BT::Any", %"class.std::__cxx11::basic_string" }
%"class.BT::TypeInfo" = type { %"struct.std::type_index", %"class.std::function", %"class.std::__cxx11::basic_string" }
%"struct.std::type_index" = type { ptr }
%"class.std::function" = 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.BT::Any" = type { %"class.linb::any", %"struct.std::type_index" }
%"class.linb::any" = type { %"union.linb::any::storage_union", ptr }
%"union.linb::any::storage_union" = type { ptr, [8 x i8] }
%"class.std::basic_string_view" = type { i64, ptr }

@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [49 x i8], align 1
@_ZTIN2BT12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 uwtable
define dso_local void @_ZN2BT9XMLParser5PImpl16loadSubtreeModelEPKN8tinyxml210XMLElementE(ptr noundef nonnull align 8 dereferenceable(172) %0, ptr noundef nonnull %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca [3 x %"struct.std::pair.61"], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.BT::PortInfo", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::basic_string_view", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = tail call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull @.str.12)
  %.not61 = icmp eq ptr %14, null
  br i1 %.not61, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %2
  %15 = getelementptr inbounds i8, ptr %0, i64 120
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  %17 = getelementptr inbounds i8, ptr %5, i64 32
  %18 = getelementptr inbounds i8, ptr %11, i64 8
  br label %19

._crit_edge65:                                    ; preds = %._crit_edge60, %2
  ret void

19:                                               ; preds = %.lr.ph64, %._crit_edge60
  %.062 = phi ptr [ %14, %.lr.ph64 ], [ %21, %._crit_edge60 ]
  %20 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.062, ptr noundef nonnull @.str.13)
  %.not4256 = icmp eq ptr %20, null
  br i1 %.not4256, label %._crit_edge60, label %.lr.ph59

._crit_edge60:                                    ; preds = %._crit_edge.2, %19
  %21 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.062, ptr noundef nonnull @.str.12)
  %.not = icmp eq ptr %21, null
  br i1 %.not, label %._crit_edge65, label %19, !llvm.loop !5

.lr.ph59:                                         ; preds = %19, %._crit_edge.2
  %.03357 = phi ptr [ %85, %._crit_edge.2 ], [ %20, %19 ]
  %22 = call noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03357, ptr noundef nonnull @.str.14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %30

23:                                               ; preds = %.lr.ph59
  %24 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT12SubtreeModelESt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %25 unwind label %32

25:                                               ; preds = %23
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 0, ptr %6, align 4, !tbaa !7
  call void @_ZNSt4pairIPKcN2BT13PortDirectionEEC2IRA11_S0_S3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 1 dereferenceable(11) @.str.15, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 1, ptr %7, align 4, !tbaa !7
  call void @_ZNSt4pairIPKcN2BT13PortDirectionEEC2IRA12_S0_S3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(12) %16, ptr noundef nonnull align 1 dereferenceable(12) @.str.16, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 2, ptr %8, align 4, !tbaa !7
  call void @_ZNSt4pairIPKcN2BT13PortDirectionEEC2IRA11_S0_S3_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS9_SA_EEEbE4typeELb1EEEOS9_OSA_(ptr noundef nonnull align 8 dereferenceable(12) %17, ptr noundef nonnull align 1 dereferenceable(11) @.str.17, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %5) #6
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %5) #6
  %28 = load ptr, ptr %26, align 8, !tbaa !11
  %29 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03357, ptr noundef %28)
  %.not4553 = icmp eq ptr %29, null
  br i1 %.not4553, label %._crit_edge, label %.lr.ph

30:                                               ; preds = %.lr.ph59
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %34

32:                                               ; preds = %23
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br label %34

34:                                               ; preds = %32, %30
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br label %111

._crit_edge:                                      ; preds = %108, %25
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %16) #6
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %16) #6
  %37 = load ptr, ptr %35, align 8, !tbaa !11
  %38 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03357, ptr noundef %37)
  %.not4553.1 = icmp eq ptr %38, null
  br i1 %.not4553.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %._crit_edge, %57
  %.03254.1 = phi ptr [ %59, %57 ], [ %38, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %9) #6
  %39 = load i32, ptr %36, align 4, !tbaa !7
  call void @_ZN2BT8PortInfoC2ENS_13PortDirectionE(ptr noundef nonnull align 8 dereferenceable(176) %9, i32 noundef %39)
  %40 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254.1, ptr noundef nonnull @.str.18, ptr noundef null)
          to label %41 unwind label %.loopexit.loopexit.split-lp.loopexit

41:                                               ; preds = %.lr.ph.1
  %.not46.1 = icmp eq ptr %40, null
  br i1 %.not46.1, label %.loopexit68, label %42

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %43 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254.1, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %44 unwind label %.loopexit.split-lp70.loopexit

44:                                               ; preds = %42
  store ptr %43, ptr %10, align 8, !tbaa !11
  %.not47.1 = icmp eq ptr %43, null
  br i1 %.not47.1, label %46, label %45

45:                                               ; preds = %44
  invoke void @_ZN2BT8PortInfo15setDefaultValueIPKcEEvRKT_(ptr noundef nonnull align 8 dereferenceable(176) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %46 unwind label %.loopexit.split-lp70.loopexit

46:                                               ; preds = %45, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %47 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254.1, ptr noundef nonnull @.str.21, ptr noundef null)
          to label %48 unwind label %.loopexit.split-lp74.loopexit

48:                                               ; preds = %46
  %.not48.1 = icmp eq ptr %47, null
  br i1 %.not48.1, label %52, label %49

49:                                               ; preds = %48
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %47) #6
  %50 = load i64, ptr %11, align 8
  %51 = load ptr, ptr %18, align 8
  invoke void @_ZN2BT8PortInfo14setDescriptionESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(176) %9, i64 %50, ptr %51)
          to label %52 unwind label %.loopexit.split-lp74.loopexit

52:                                               ; preds = %49, %48
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull %40, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %53 unwind label %.loopexit.split-lp79.loopexit

53:                                               ; preds = %52
  %54 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT8PortInfoESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %55 unwind label %.loopexit.split-lp84.loopexit

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZN2BT8PortInfoaSEOS0_(ptr noundef nonnull align 8 dereferenceable(176) %54, ptr noundef nonnull align 8 dereferenceable(176) %9)
          to label %57 unwind label %.loopexit.split-lp84.loopexit

57:                                               ; preds = %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZN2BT8PortInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %9) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %9) #6
  %58 = load ptr, ptr %35, align 8, !tbaa !11
  %59 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03254.1, ptr noundef %58)
  %.not45.1 = icmp eq ptr %59, null
  br i1 %.not45.1, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !13

._crit_edge.1:                                    ; preds = %57, %._crit_edge
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %17) #6
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EPKcN2BT13PortDirectionEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS8_(ptr noundef nonnull align 8 dereferenceable(12) %17) #6
  %62 = load ptr, ptr %60, align 8, !tbaa !11
  %63 = call noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03357, ptr noundef %62)
  %.not4553.2 = icmp eq ptr %63, null
  br i1 %.not4553.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %._crit_edge.1, %82
  %.03254.2 = phi ptr [ %84, %82 ], [ %63, %._crit_edge.1 ]
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %9) #6
  %64 = load i32, ptr %61, align 4, !tbaa !7
  call void @_ZN2BT8PortInfoC2ENS_13PortDirectionE(ptr noundef nonnull align 8 dereferenceable(176) %9, i32 noundef %64)
  %65 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254.2, ptr noundef nonnull @.str.18, ptr noundef null)
          to label %66 unwind label %.loopexit.loopexit.split-lp.loopexit.split-lp

66:                                               ; preds = %.lr.ph.2
  %.not46.2 = icmp eq ptr %65, null
  br i1 %.not46.2, label %.loopexit68, label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %68 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254.2, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %69 unwind label %.loopexit.split-lp70.loopexit.split-lp

69:                                               ; preds = %67
  store ptr %68, ptr %10, align 8, !tbaa !11
  %.not47.2 = icmp eq ptr %68, null
  br i1 %.not47.2, label %71, label %70

70:                                               ; preds = %69
  invoke void @_ZN2BT8PortInfo15setDefaultValueIPKcEEvRKT_(ptr noundef nonnull align 8 dereferenceable(176) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %71 unwind label %.loopexit.split-lp70.loopexit.split-lp

71:                                               ; preds = %70, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %72 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254.2, ptr noundef nonnull @.str.21, ptr noundef null)
          to label %73 unwind label %.loopexit.split-lp74.loopexit.split-lp

73:                                               ; preds = %71
  %.not48.2 = icmp eq ptr %72, null
  br i1 %.not48.2, label %77, label %74

74:                                               ; preds = %73
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %72) #6
  %75 = load i64, ptr %11, align 8
  %76 = load ptr, ptr %18, align 8
  invoke void @_ZN2BT8PortInfo14setDescriptionESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(176) %9, i64 %75, ptr %76)
          to label %77 unwind label %.loopexit.split-lp74.loopexit.split-lp

77:                                               ; preds = %74, %73
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull %65, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %78 unwind label %.loopexit.split-lp79.loopexit.split-lp

78:                                               ; preds = %77
  %79 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT8PortInfoESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %80 unwind label %.loopexit.split-lp84.loopexit.split-lp

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZN2BT8PortInfoaSEOS0_(ptr noundef nonnull align 8 dereferenceable(176) %79, ptr noundef nonnull align 8 dereferenceable(176) %9)
          to label %82 unwind label %.loopexit.split-lp84.loopexit.split-lp

82:                                               ; preds = %80
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZN2BT8PortInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %9) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %9) #6
  %83 = load ptr, ptr %60, align 8, !tbaa !11
  %84 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03254.2, ptr noundef %83)
  %.not45.2 = icmp eq ptr %84, null
  br i1 %.not45.2, label %._crit_edge.2, label %.lr.ph.2, !llvm.loop !13

._crit_edge.2:                                    ; preds = %82, %._crit_edge.1
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  %85 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03357, ptr noundef nonnull @.str.13)
  %.not42 = icmp eq ptr %85, null
  br i1 %.not42, label %._crit_edge60, label %.lr.ph59, !llvm.loop !14

.lr.ph:                                           ; preds = %25, %108
  %.03254 = phi ptr [ %110, %108 ], [ %29, %25 ]
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %9) #6
  %86 = load i32, ptr %27, align 4, !tbaa !7
  call void @_ZN2BT8PortInfoC2ENS_13PortDirectionE(ptr noundef nonnull align 8 dereferenceable(176) %9, i32 noundef %86)
  %87 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254, ptr noundef nonnull @.str.18, ptr noundef null)
          to label %88 unwind label %.loopexit.loopexit

88:                                               ; preds = %.lr.ph
  %.not46 = icmp eq ptr %87, null
  br i1 %.not46, label %.loopexit68, label %93

.loopexit68:                                      ; preds = %88, %41, %66
  %89 = call ptr @__cxa_allocate_exception(i64 40) #6
  invoke void @_ZN2BT12RuntimeErrorC2IJA49_cEEEDpRKT_(ptr noundef nonnull align 8 dereferenceable(40) %89, ptr noundef nonnull align 1 dereferenceable(49) @.str.19)
          to label %90 unwind label %91

90:                                               ; preds = %.loopexit68
  invoke void @__cxa_throw(ptr nonnull %89, ptr nonnull @_ZTIN2BT12RuntimeErrorE, ptr nonnull @_ZN2BT21BehaviorTreeExceptionD2Ev) #7
          to label %112 unwind label %.loopexit.split-lp

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

.loopexit.loopexit.split-lp.loopexit:             ; preds = %.lr.ph.1
  %lpad.loopexit88 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.loopexit.split-lp.loopexit.split-lp:    ; preds = %.lr.ph.2
  %lpad.loopexit.split-lp89 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

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

91:                                               ; preds = %.loopexit68
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %89) #6
  br label %.loopexit

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %94 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %95 unwind label %.loopexit69

95:                                               ; preds = %93
  store ptr %94, ptr %10, align 8, !tbaa !11
  %.not47 = icmp eq ptr %94, null
  br i1 %.not47, label %97, label %96

96:                                               ; preds = %95
  invoke void @_ZN2BT8PortInfo15setDefaultValueIPKcEEvRKT_(ptr noundef nonnull align 8 dereferenceable(176) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %97 unwind label %.loopexit69

.loopexit69:                                      ; preds = %93, %96
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70.loopexit:                    ; preds = %45, %42
  %lpad.loopexit92 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70.loopexit.split-lp:           ; preds = %70, %67
  %lpad.loopexit.split-lp93 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp70

.loopexit.split-lp70:                             ; preds = %.loopexit.split-lp70.loopexit, %.loopexit.split-lp70.loopexit.split-lp, %.loopexit69
  %lpad.phi72 = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit69 ], [ %lpad.loopexit92, %.loopexit.split-lp70.loopexit ], [ %lpad.loopexit.split-lp93, %.loopexit.split-lp70.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %.loopexit

97:                                               ; preds = %96, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %98 = invoke noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %.03254, ptr noundef nonnull @.str.21, ptr noundef null)
          to label %99 unwind label %.loopexit73

99:                                               ; preds = %97
  %.not48 = icmp eq ptr %98, null
  br i1 %.not48, label %103, label %100

100:                                              ; preds = %99
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %98) #6
  %101 = load i64, ptr %11, align 8
  %102 = load ptr, ptr %18, align 8
  invoke void @_ZN2BT8PortInfo14setDescriptionESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(176) %9, i64 %101, ptr %102)
          to label %103 unwind label %.loopexit73

.loopexit73:                                      ; preds = %97, %100
  %lpad.loopexit75 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp74.loopexit:                    ; preds = %49, %46
  %lpad.loopexit95 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp74.loopexit.split-lp:           ; preds = %74, %71
  %lpad.loopexit.split-lp96 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

103:                                              ; preds = %100, %99
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull %87, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %104 unwind label %.loopexit78

104:                                              ; preds = %103
  %105 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT8PortInfoESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %106 unwind label %.loopexit83

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZN2BT8PortInfoaSEOS0_(ptr noundef nonnull align 8 dereferenceable(176) %105, ptr noundef nonnull align 8 dereferenceable(176) %9)
          to label %108 unwind label %.loopexit83

108:                                              ; preds = %106
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZN2BT8PortInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %9) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %9) #6
  %109 = load ptr, ptr %26, align 8, !tbaa !11
  %110 = call noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03254, ptr noundef %109)
  %.not45 = icmp eq ptr %110, null
  br i1 %.not45, label %._crit_edge, label %.lr.ph, !llvm.loop !13

.loopexit78:                                      ; preds = %103
  %lpad.loopexit80 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp79

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

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

.loopexit83:                                      ; preds = %104, %106
  %lpad.loopexit85 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp84

.loopexit.split-lp84.loopexit:                    ; preds = %55, %53
  %lpad.loopexit101 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp84

.loopexit.split-lp84.loopexit.split-lp:           ; preds = %80, %78
  %lpad.loopexit.split-lp102 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp84

.loopexit.split-lp84:                             ; preds = %.loopexit.split-lp84.loopexit, %.loopexit.split-lp84.loopexit.split-lp, %.loopexit83
  %lpad.phi87 = phi { ptr, i32 } [ %lpad.loopexit85, %.loopexit83 ], [ %lpad.loopexit101, %.loopexit.split-lp84.loopexit ], [ %lpad.loopexit.split-lp102, %.loopexit.split-lp84.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %.loopexit.split-lp79

.loopexit.split-lp79:                             ; preds = %.loopexit78, %.loopexit.split-lp79.loopexit.split-lp, %.loopexit.split-lp79.loopexit, %.loopexit.split-lp84
  %.pn49 = phi { ptr, i32 } [ %lpad.phi87, %.loopexit.split-lp84 ], [ %lpad.loopexit80, %.loopexit78 ], [ %lpad.loopexit98, %.loopexit.split-lp79.loopexit ], [ %lpad.loopexit.split-lp99, %.loopexit.split-lp79.loopexit.split-lp ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit73, %.loopexit.split-lp74.loopexit.split-lp, %.loopexit.split-lp74.loopexit, %.loopexit.loopexit, %.loopexit.loopexit.split-lp.loopexit.split-lp, %.loopexit.loopexit.split-lp.loopexit, %.loopexit.split-lp, %.loopexit.split-lp79, %.loopexit.split-lp70, %91
  %.pn49.pn = phi { ptr, i32 } [ %.pn49, %.loopexit.split-lp79 ], [ %lpad.phi72, %.loopexit.split-lp70 ], [ %92, %91 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit66, %.loopexit.loopexit ], [ %lpad.loopexit88, %.loopexit.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp89, %.loopexit.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit75, %.loopexit73 ], [ %lpad.loopexit95, %.loopexit.split-lp74.loopexit ], [ %lpad.loopexit.split-lp96, %.loopexit.split-lp74.loopexit.split-lp ]
  call void @_ZN2BT8PortInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %9) #6
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  br label %111

111:                                              ; preds = %.loopexit, %34
  %.pn49.pn.pn = phi { ptr, i32 } [ %.pn49.pn, %.loopexit ], [ %.pn, %34 ]
  resume { ptr, i32 } %.pn49.pn.pn

112:                                              ; preds = %90
  unreachable
}

declare noundef ptr @_ZNK8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2BT8PortInfoC2ENS_13PortDirectionE(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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 void @_ZN2BT8PortInfo15setDefaultValueIPKcEEvRKT_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

declare void @_ZN2BT8PortInfo14setDescriptionESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(176), i64, ptr) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN2BT8PortInfoESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZN2BT8PortInfoaSEOS0_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #4 align 2

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

declare noundef ptr @_ZNK8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #3

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

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


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