; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/rbdl/addons/urdfreader/urdf/urdfdom/urdf_parser/src (link)

; 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 }
%class.my_shared_ptr.3 = type { ptr, ptr }
%class.my_shared_ptr.4 = type { ptr, ptr }
%"class.urdf::Link" = type { %"class.std::__cxx11::basic_string", %class.my_shared_ptr.2, %class.my_shared_ptr.3, %class.my_shared_ptr.4, %"class.std::vector", %"class.std::vector.8", %class.my_shared_ptr.13, %"class.std::vector.14", %"class.std::vector.19", i32, ptr }
%class.my_shared_ptr.2 = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Collision>, std::allocator<my_shared_ptr<urdf::Collision>>>::_Vector_impl" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Collision>, std::allocator<my_shared_ptr<urdf::Collision>>>::_Vector_impl" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Collision>, std::allocator<my_shared_ptr<urdf::Collision>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Collision>, std::allocator<my_shared_ptr<urdf::Collision>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Visual>, std::allocator<my_shared_ptr<urdf::Visual>>>::_Vector_impl" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Visual>, std::allocator<my_shared_ptr<urdf::Visual>>>::_Vector_impl" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Visual>, std::allocator<my_shared_ptr<urdf::Visual>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Visual>, std::allocator<my_shared_ptr<urdf::Visual>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.my_shared_ptr.13 = type { ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Joint>, std::allocator<my_shared_ptr<urdf::Joint>>>::_Vector_impl" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Joint>, std::allocator<my_shared_ptr<urdf::Joint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Joint>, std::allocator<my_shared_ptr<urdf::Joint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Joint>, std::allocator<my_shared_ptr<urdf::Joint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Link>, std::allocator<my_shared_ptr<urdf::Link>>>::_Vector_impl" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Link>, std::allocator<my_shared_ptr<urdf::Link>>>::_Vector_impl" = type { %"struct.std::_Vector_base<my_shared_ptr<urdf::Link>, std::allocator<my_shared_ptr<urdf::Link>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<my_shared_ptr<urdf::Link>, std::allocator<my_shared_ptr<urdf::Link>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [48 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 noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) #1

declare void @_Z8logErrorPKcS0_S0_S0_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf9parseLinkERNS_4LinkEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %class.my_shared_ptr.3, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %class.my_shared_ptr.4, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4urdf4Link5clearEv(ptr noundef nonnull align 8 dereferenceable(208) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %18, ptr noundef @.str)
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %23, label %22

22:                                               ; preds = %2
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.47, ptr noundef @.str.2, ptr noundef @.str.2, ptr noundef @.str.2)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %171

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %25 unwind label %47

25:                                               ; preds = %23
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.urdf::Link", ptr %26, i32 0, i32 0
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %29, ptr noundef @.str.48)
  store ptr %30, ptr %12, align 8, !tbaa !5
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %56

33:                                               ; preds = %25
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.urdf::Link", ptr %34, i32 0, i32 1
  %36 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 112) #7
  invoke void @_ZN4urdf8InertialC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %36)
          to label %37 unwind label %51

37:                                               ; preds = %33
  call void @_ZN13my_shared_ptrIN4urdf8InertialEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef %36)
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.urdf::Link", ptr %38, i32 0, i32 1
  %40 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNK13my_shared_ptrIN4urdf8InertialEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZN4urdf13parseInertialERNS_8InertialEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(112) %40, ptr noundef %41)
  br i1 %42, label %55, label %43

43:                                               ; preds = %37
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.urdf::Link", ptr %44, i32 0, i32 0
  %46 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #6
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.49, ptr noundef %46, ptr noundef @.str.2, ptr noundef @.str.2)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %169

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %173

51:                                               ; preds = %33
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %36, i64 noundef 112) #8
  br label %170

55:                                               ; preds = %37
  br label %56

56:                                               ; preds = %55, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %57, ptr noundef @.str.50)
  store ptr %58, ptr %13, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %95, %56
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 2, ptr %7, align 4
  br label %99

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @_ZN13my_shared_ptrIN4urdf6VisualEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %64 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 152) #7
          to label %65 unwind label %77

65:                                               ; preds = %63
  invoke void @_ZN4urdf6VisualC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %64)
          to label %66 unwind label %81

66:                                               ; preds = %65
  invoke void @_ZN13my_shared_ptrIN4urdf6VisualEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %64)
          to label %67 unwind label %77

67:                                               ; preds = %66
  %68 = invoke noundef nonnull align 8 dereferenceable(152) ptr @_ZNK13my_shared_ptrIN4urdf6VisualEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %69 unwind label %77

69:                                               ; preds = %67
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = invoke noundef zeroext i1 @_ZN4urdf11parseVisualERNS_6VisualEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(152) %68, ptr noundef %70)
          to label %72 unwind label %77

72:                                               ; preds = %69
  br i1 %71, label %73, label %85

73:                                               ; preds = %72
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"class.urdf::Link", ptr %74, i32 0, i32 5
  invoke void @_ZNSt6vectorI13my_shared_ptrIN4urdf6VisualEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %76 unwind label %77

76:                                               ; preds = %73
  br label %91

77:                                               ; preds = %86, %85, %73, %69, %67, %66, %63
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %10, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %11, align 4
  br label %98

81:                                               ; preds = %65
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %10, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %64, i64 noundef 152) #8
  br label %98

85:                                               ; preds = %72
  invoke void @_ZN13my_shared_ptrIN4urdf6VisualEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef null)
          to label %86 unwind label %77

86:                                               ; preds = %85
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %"class.urdf::Link", ptr %87, i32 0, i32 0
  %89 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %88) #6
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.51, ptr noundef %89, ptr noundef @.str.2, ptr noundef @.str.2)
          to label %90 unwind label %77

90:                                               ; preds = %86
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %92

91:                                               ; preds = %76
  store i32 0, ptr %7, align 4
  br label %92

92:                                               ; preds = %91, %90
  call void @_ZN13my_shared_ptrIN4urdf6VisualEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %93 = load i32, ptr %7, align 4
  switch i32 %93, label %99 [
    i32 0, label %94
  ]

94:                                               ; preds = %92
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %96, ptr noundef @.str.50)
  store ptr %97, ptr %13, align 8, !tbaa !5
  br label %59, !llvm.loop !9

98:                                               ; preds = %81, %77
  call void @_ZN13my_shared_ptrIN4urdf6VisualEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %170

99:                                               ; preds = %92, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %100 = load i32, ptr %7, align 4
  switch i32 %100, label %169 [
    i32 2, label %101
  ]

101:                                              ; preds = %99
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.urdf::Link", ptr %102, i32 0, i32 5
  %104 = call noundef zeroext i1 @_ZNKSt6vectorI13my_shared_ptrIN4urdf6VisualEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #6
  br i1 %104, label %112, label %105

105:                                              ; preds = %101
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %"class.urdf::Link", ptr %106, i32 0, i32 5
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI13my_shared_ptrIN4urdf6VisualEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef 0) #6
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %"class.urdf::Link", ptr %109, i32 0, i32 2
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13my_shared_ptrIN4urdf6VisualEEaSIS1_EERS2_RS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(16) %108)
  br label %112

112:                                              ; preds = %105, %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %113, ptr noundef @.str.52)
  store ptr %114, ptr %15, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %151, %112
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %119, label %118

118:                                              ; preds = %115
  store i32 5, ptr %7, align 4
  br label %155

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %120 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #7
          to label %121 unwind label %133

121:                                              ; preds = %119
  invoke void @_ZN4urdf9CollisionC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %120)
          to label %122 unwind label %137

122:                                              ; preds = %121
  invoke void @_ZN13my_shared_ptrIN4urdf9CollisionEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef %120)
          to label %123 unwind label %133

123:                                              ; preds = %122
  %124 = invoke noundef nonnull align 8 dereferenceable(104) ptr @_ZNK13my_shared_ptrIN4urdf9CollisionEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %125 unwind label %133

125:                                              ; preds = %123
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = invoke noundef zeroext i1 @_ZN4urdf14parseCollisionERNS_9CollisionEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(104) %124, ptr noundef %126)
          to label %128 unwind label %133

128:                                              ; preds = %125
  br i1 %127, label %129, label %141

129:                                              ; preds = %128
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %"class.urdf::Link", ptr %130, i32 0, i32 4
  invoke void @_ZNSt6vectorI13my_shared_ptrIN4urdf9CollisionEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %131, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %132 unwind label %133

132:                                              ; preds = %129
  br label %147

133:                                              ; preds = %142, %141, %129, %125, %123, %122, %119
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %10, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %11, align 4
  br label %154

137:                                              ; preds = %121
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %10, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %120, i64 noundef 104) #8
  br label %154

141:                                              ; preds = %128
  invoke void @_ZN13my_shared_ptrIN4urdf9CollisionEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef null)
          to label %142 unwind label %133

142:                                              ; preds = %141
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %"class.urdf::Link", ptr %143, i32 0, i32 0
  %145 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %144) #6
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.53, ptr noundef %145, ptr noundef @.str.2, ptr noundef @.str.2)
          to label %146 unwind label %133

146:                                              ; preds = %142
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %148

147:                                              ; preds = %132
  store i32 0, ptr %7, align 4
  br label %148

148:                                              ; preds = %147, %146
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  %149 = load i32, ptr %7, align 4
  switch i32 %149, label %155 [
    i32 0, label %150
  ]

150:                                              ; preds = %148
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %152, ptr noundef @.str.52)
  store ptr %153, ptr %15, align 8, !tbaa !5
  br label %115, !llvm.loop !11

154:                                              ; preds = %137, %133
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %170

155:                                              ; preds = %148, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %156 = load i32, ptr %7, align 4
  switch i32 %156, label %169 [
    i32 5, label %157
  ]

157:                                              ; preds = %155
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %"class.urdf::Link", ptr %158, i32 0, i32 4
  %160 = call noundef zeroext i1 @_ZNKSt6vectorI13my_shared_ptrIN4urdf9CollisionEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %159) #6
  br i1 %160, label %168, label %161

161:                                              ; preds = %157
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %"class.urdf::Link", ptr %162, i32 0, i32 4
  %164 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI13my_shared_ptrIN4urdf9CollisionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef 0) #6
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %"class.urdf::Link", ptr %165, i32 0, i32 3
  %167 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13my_shared_ptrIN4urdf9CollisionEEaSIS1_EERS2_RS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %166, ptr noundef nonnull align 8 dereferenceable(16) %164)
  br label %168

168:                                              ; preds = %161, %157
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %169

169:                                              ; preds = %168, %155, %99, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %171

170:                                              ; preds = %154, %98, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %173

171:                                              ; preds = %169, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %172 = load i1, ptr %3, align 1
  ret i1 %172

173:                                              ; preds = %170, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr %10, align 8
  %176 = load i32, ptr %11, align 4
  %177 = insertvalue { ptr, i32 } poison, ptr %175, 0
  %178 = insertvalue { ptr, i32 } %177, i32 %176, 1
  resume { ptr, i32 } %178
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(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 @_ZN13my_shared_ptrIN4urdf8InertialEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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 }
%class.my_shared_ptr.3 = type { ptr, ptr }
%class.my_shared_ptr.4 = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [48 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 noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) local_unnamed_addr #1

declare void @_Z8logErrorPKcS0_S0_S0_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf9parseLinkERNS_4LinkEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %class.my_shared_ptr.3, align 8
  %6 = alloca %class.my_shared_ptr.4, align 8
  tail call void @_ZN4urdf4Link5clearEv(ptr noundef nonnull align 8 dereferenceable(208) %0)
  %7 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %2
  tail call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %79

9:                                                ; preds = %2
  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 nonnull %7, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %10 unwind label %21

10:                                               ; preds = %9
  %11 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  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
  %12 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.48)
  %.not54 = icmp eq ptr %12, null
  br i1 %.not54, label %25, label %13

13:                                               ; preds = %10
  %14 = call noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #7
  invoke void @_ZN4urdf8InertialC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %14)
          to label %15 unwind label %23

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZN13my_shared_ptrIN4urdf8InertialEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull %14)
  %17 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNK13my_shared_ptrIN4urdf8InertialEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %18 = call noundef zeroext i1 @_ZN4urdf13parseInertialERNS_8InertialEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(112) %17, ptr noundef nonnull %12)
  br i1 %18, label %25, label %19

19:                                               ; preds = %15
  %20 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.49, ptr noundef %20, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %79

21:                                               ; preds = %9
  %22 = landingpad { ptr, i32 }
          cleanup
  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 %80

23:                                               ; preds = %13
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 112) #8
  br label %80

25:                                               ; preds = %15, %10
  %26 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.50)
  %.not5573 = icmp eq ptr %26, null
  br i1 %.not5573, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %25
  %27 = getelementptr inbounds i8, ptr %0, i64 104
  br label %28

28:                                               ; preds = %.lr.ph, %42
  %.03874 = phi ptr [ %26, %.lr.ph ], [ %43, %42 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN13my_shared_ptrIN4urdf6VisualEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %29 = invoke noalias noundef nonnull dereferenceable(152) ptr @_Znwm(i64 noundef 152) #7
          to label %30 unwind label %.loopexit65

30:                                               ; preds = %28
  invoke void @_ZN4urdf6VisualC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %29)
          to label %31 unwind label %37

31:                                               ; preds = %30
  invoke void @_ZN13my_shared_ptrIN4urdf6VisualEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %29)
          to label %32 unwind label %.loopexit65

32:                                               ; preds = %31
  %33 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNK13my_shared_ptrIN4urdf6VisualEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %34 = invoke noundef zeroext i1 @_ZN4urdf11parseVisualERNS_6VisualEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(152) %33, ptr noundef nonnull %.03874)
          to label %35 unwind label %.loopexit65

35:                                               ; preds = %32
  br i1 %34, label %36, label %39

36:                                               ; preds = %35
  invoke void @_ZNSt6vectorI13my_shared_ptrIN4urdf6VisualEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %42 unwind label %.loopexit65

.loopexit65:                                      ; preds = %28, %31, %32, %36
  %lpad.loopexit67 = landingpad { ptr, i32 }
          cleanup
  br label %44

.loopexit.split-lp66:                             ; preds = %39, %40
  %lpad.loopexit.split-lp68 = landingpad { ptr, i32 }
          cleanup
  br label %44

37:                                               ; preds = %30
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %29, i64 noundef 152) #8
  br label %44

39:                                               ; preds = %35
  invoke void @_ZN13my_shared_ptrIN4urdf6VisualEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef null)
          to label %40 unwind label %.loopexit.split-lp66

40:                                               ; preds = %39
  %41 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.51, ptr noundef %41, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
          to label %45 unwind label %.loopexit.split-lp66

42:                                               ; preds = %36
  call void @_ZN13my_shared_ptrIN4urdf6VisualEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %43 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %.03874, ptr noundef nonnull @.str.50)
  %.not55 = icmp eq ptr %43, null
  br i1 %.not55, label %.critedge, label %28, !llvm.loop !5

44:                                               ; preds = %.loopexit65, %.loopexit.split-lp66, %37
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %lpad.loopexit67, %.loopexit65 ], [ %lpad.loopexit.split-lp68, %.loopexit.split-lp66 ]
  call void @_ZN13my_shared_ptrIN4urdf6VisualEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %80

45:                                               ; preds = %40
  call void @_ZN13my_shared_ptrIN4urdf6VisualEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %79

.critedge:                                        ; preds = %42, %25
  %46 = getelementptr inbounds i8, ptr %0, i64 104
  %47 = call noundef zeroext i1 @_ZNKSt6vectorI13my_shared_ptrIN4urdf6VisualEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #6
  br i1 %47, label %52, label %48

48:                                               ; preds = %.critedge
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI13my_shared_ptrIN4urdf6VisualEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef 0) #6
  %50 = getelementptr inbounds i8, ptr %0, i64 48
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13my_shared_ptrIN4urdf6VisualEEaSIS1_EERS2_RS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %49)
  br label %52

52:                                               ; preds = %48, %.critedge
  %53 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.52)
  %.not5775 = icmp eq ptr %53, null
  br i1 %.not5775, label %.critedge63, label %.lr.ph77

.lr.ph77:                                         ; preds = %52
  %54 = getelementptr inbounds i8, ptr %0, i64 80
  br label %55

55:                                               ; preds = %.lr.ph77, %69
  %.076 = phi ptr [ %53, %.lr.ph77 ], [ %70, %69 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %56 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #7
          to label %57 unwind label %.loopexit

57:                                               ; preds = %55
  invoke void @_ZN4urdf9CollisionC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %56)
          to label %58 unwind label %64

58:                                               ; preds = %57
  invoke void @_ZN13my_shared_ptrIN4urdf9CollisionEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %56)
          to label %59 unwind label %.loopexit

59:                                               ; preds = %58
  %60 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK13my_shared_ptrIN4urdf9CollisionEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %61 = invoke noundef zeroext i1 @_ZN4urdf14parseCollisionERNS_9CollisionEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(104) %60, ptr noundef nonnull %.076)
          to label %62 unwind label %.loopexit

62:                                               ; preds = %59
  br i1 %61, label %63, label %66

63:                                               ; preds = %62
  invoke void @_ZNSt6vectorI13my_shared_ptrIN4urdf9CollisionEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %69 unwind label %.loopexit

.loopexit:                                        ; preds = %55, %58, %59, %63
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %71

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

64:                                               ; preds = %57
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %56, i64 noundef 104) #8
  br label %71

66:                                               ; preds = %62
  invoke void @_ZN13my_shared_ptrIN4urdf9CollisionEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef null)
          to label %67 unwind label %.loopexit.split-lp

67:                                               ; preds = %66
  %68 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.53, ptr noundef %68, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
          to label %72 unwind label %.loopexit.split-lp

69:                                               ; preds = %63
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  %70 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %.076, ptr noundef nonnull @.str.52)
  %.not57 = icmp eq ptr %70, null
  br i1 %.not57, label %.critedge63, label %55, !llvm.loop !7

71:                                               ; preds = %.loopexit, %.loopexit.split-lp, %64
  %.pn58 = phi { ptr, i32 } [ %65, %64 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %80

72:                                               ; preds = %67
  call void @_ZN13my_shared_ptrIN4urdf9CollisionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %79

.critedge63:                                      ; preds = %69, %52
  %73 = getelementptr inbounds i8, ptr %0, i64 80
  %74 = call noundef zeroext i1 @_ZNKSt6vectorI13my_shared_ptrIN4urdf9CollisionEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #6
  br i1 %74, label %79, label %75

75:                                               ; preds = %.critedge63
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI13my_shared_ptrIN4urdf9CollisionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef 0) #6
  %77 = getelementptr inbounds i8, ptr %0, i64 64
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13my_shared_ptrIN4urdf9CollisionEEaSIS1_EERS2_RS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef nonnull align 8 dereferenceable(16) %76)
  br label %79

79:                                               ; preds = %72, %45, %19, %75, %.critedge63, %8
  %.7 = phi i1 [ false, %8 ], [ false, %72 ], [ false, %45 ], [ false, %19 ], [ true, %75 ], [ true, %.critedge63 ]
  ret i1 %.7

80:                                               ; preds = %23, %44, %71, %21
  %.pn58.pn.pn = phi { ptr, i32 } [ %22, %21 ], [ %.pn58, %71 ], [ %.pn, %44 ], [ %24, %23 ]
  resume { ptr, i32 } %.pn58.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(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 @_ZN13my_shared_ptrIN4urdf8InertialEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass