; LLVM IR from HiroIshida/tinyfk :: urdf_parser/src/link.ll (ZN4urdf9parseLinkERNS_4LinkEP12TiXmlElement)

; 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.std::shared_ptr.11" = type { %"class.std::__shared_ptr.12" }
%"class.std::__shared_ptr.12" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.14" = type { %"class.std::__shared_ptr.15" }
%"class.std::__shared_ptr.15" = type { ptr, %"class.std::__shared_count" }
%"class.urdf::Link" = type { %"class.std::__cxx11::basic_string", i32, %"class.std::shared_ptr.8", %"class.std::shared_ptr.11", %"class.std::shared_ptr.14", %"class.std::vector.17", %"class.std::vector.22", %"class.std::shared_ptr.27", %"class.std::vector.30", %"class.std::vector.35", %"class.std::weak_ptr" }
%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Collision>, std::allocator<std::shared_ptr<urdf::Collision>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Collision>, std::allocator<std::shared_ptr<urdf::Collision>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Collision>, std::allocator<std::shared_ptr<urdf::Collision>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Collision>, std::allocator<std::shared_ptr<urdf::Collision>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Visual>, std::allocator<std::shared_ptr<urdf::Visual>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Visual>, std::allocator<std::shared_ptr<urdf::Visual>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Visual>, std::allocator<std::shared_ptr<urdf::Visual>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Visual>, std::allocator<std::shared_ptr<urdf::Visual>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.27" = type { %"class.std::__shared_ptr.28" }
%"class.std::__shared_ptr.28" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Joint>, std::allocator<std::shared_ptr<urdf::Joint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Joint>, std::allocator<std::shared_ptr<urdf::Joint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Joint>, std::allocator<std::shared_ptr<urdf::Joint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Joint>, std::allocator<std::shared_ptr<urdf::Joint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Link>, std::allocator<std::shared_ptr<urdf::Link>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Link>, std::allocator<std::shared_ptr<urdf::Link>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<urdf::Link>, std::allocator<std::shared_ptr<urdf::Link>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<urdf::Link>, std::allocator<std::shared_ptr<urdf::Link>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [10 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(216), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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: 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(216) %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.std::shared_ptr.11", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::shared_ptr.14", 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(216) %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(216) %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
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %156

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 %44

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(104) %29, ptr noundef @.str.34)
  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 %53

33:                                               ; preds = %25
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.urdf::Link", ptr %34, i32 0, i32 2
  %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 %48

37:                                               ; preds = %33
  call void @_ZNSt12__shared_ptrIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 2
  %40 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNKSt19__shared_ptr_accessIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  %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 %52, label %43

43:                                               ; preds = %37
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %154

44:                                               ; preds = %23
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, 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 %158

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

52:                                               ; preds = %37
  br label %53

53:                                               ; preds = %52, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %54, ptr noundef @.str.35)
  store ptr %55, ptr %13, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %86, %53
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @_ZNSt10shared_ptrIN4urdf6VisualEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  %61 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 152) #7
          to label %62 unwind label %73

62:                                               ; preds = %60
  invoke void @_ZN4urdf6VisualC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %61)
          to label %63 unwind label %77

63:                                               ; preds = %62
  invoke void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %61)
          to label %64 unwind label %73

64:                                               ; preds = %63
  %65 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNKSt19__shared_ptr_accessIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = invoke noundef zeroext i1 @_ZN4urdf11parseVisualERNS_6VisualEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(152) %65, ptr noundef %66)
          to label %68 unwind label %73

68:                                               ; preds = %64
  br i1 %67, label %69, label %81

69:                                               ; preds = %68
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.urdf::Link", ptr %70, i32 0, i32 6
  invoke void @_ZNSt6vectorISt10shared_ptrIN4urdf6VisualEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %72 unwind label %73

72:                                               ; preds = %69
  br label %82

73:                                               ; preds = %69, %64, %63, %60
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %10, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %11, align 4
  br label %89

77:                                               ; preds = %62
  %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
  call void @_ZdlPvm(ptr noundef %61, i64 noundef 152) #8
  br label %89

81:                                               ; preds = %68
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %83

82:                                               ; preds = %72
  store i32 0, ptr %7, align 4
  br label %83

83:                                               ; preds = %82, %81
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %84 = load i32, ptr %7, align 4
  switch i32 %84, label %90 [
    i32 0, label %85
  ]

85:                                               ; preds = %83
  br label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %87, ptr noundef @.str.35)
  store ptr %88, ptr %13, align 8, !tbaa !5
  br label %56, !llvm.loop !9

89:                                               ; preds = %77, %73
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(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 %155

90:                                               ; preds = %83, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %91 = load i32, ptr %7, align 4
  switch i32 %91, label %154 [
    i32 2, label %92
  ]

92:                                               ; preds = %90
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.urdf::Link", ptr %93, i32 0, i32 6
  %95 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN4urdf6VisualEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #6
  br i1 %95, label %103, label %96

96:                                               ; preds = %92
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.urdf::Link", ptr %97, i32 0, i32 6
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN4urdf6VisualEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef 0) #6
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.urdf::Link", ptr %100, i32 0, i32 3
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN4urdf6VisualEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 8 dereferenceable(16) %99) #6
  br label %103

103:                                              ; preds = %96, %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %104, ptr noundef @.str.36)
  store ptr %105, ptr %15, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %136, %103
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  %108 = icmp ne ptr %107, null
  br i1 %108, label %110, label %109

109:                                              ; preds = %106
  store i32 5, ptr %7, align 4
  br label %140

110:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @_ZNSt10shared_ptrIN4urdf9CollisionEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  %111 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #7
          to label %112 unwind label %123

112:                                              ; preds = %110
  invoke void @_ZN4urdf9CollisionC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %111)
          to label %113 unwind label %127

113:                                              ; preds = %112
  invoke void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef %111)
          to label %114 unwind label %123

114:                                              ; preds = %113
  %115 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNKSt19__shared_ptr_accessIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = invoke noundef zeroext i1 @_ZN4urdf14parseCollisionERNS_9CollisionEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(104) %115, ptr noundef %116)
          to label %118 unwind label %123

118:                                              ; preds = %114
  br i1 %117, label %119, label %131

119:                                              ; preds = %118
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.urdf::Link", ptr %120, i32 0, i32 5
  invoke void @_ZNSt6vectorISt10shared_ptrIN4urdf9CollisionEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %121, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %122 unwind label %123

122:                                              ; preds = %119
  br label %132

123:                                              ; preds = %119, %114, %113, %110
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %10, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %11, align 4
  br label %139

127:                                              ; preds = %112
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %10, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %111, i64 noundef 104) #8
  br label %139

131:                                              ; preds = %118
  call void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %133

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

133:                                              ; preds = %132, %131
  call void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  %134 = load i32, ptr %7, align 4
  switch i32 %134, label %140 [
    i32 0, label %135
  ]

135:                                              ; preds = %133
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %137, ptr noundef @.str.36)
  store ptr %138, ptr %15, align 8, !tbaa !5
  br label %106, !llvm.loop !11

139:                                              ; preds = %127, %123
  call void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EED2Ev(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 %155

140:                                              ; preds = %133, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %141 = load i32, ptr %7, align 4
  switch i32 %141, label %154 [
    i32 5, label %142
  ]

142:                                              ; preds = %140
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %"class.urdf::Link", ptr %143, i32 0, i32 5
  %145 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN4urdf9CollisionEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %144) #6
  br i1 %145, label %153, label %146

146:                                              ; preds = %142
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %"class.urdf::Link", ptr %147, i32 0, i32 5
  %149 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN4urdf9CollisionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef 0) #6
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.urdf::Link", ptr %150, i32 0, i32 4
  %152 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN4urdf9CollisionEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %151, ptr noundef nonnull align 8 dereferenceable(16) %149) #6
  br label %153

153:                                              ; preds = %146, %142
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %154

154:                                              ; preds = %153, %140, %90, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %156

155:                                              ; preds = %139, %89, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %158

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

158:                                              ; preds = %155, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %159

159:                                              ; preds = %158
  %160 = load ptr, ptr %10, align 8
  %161 = load i32, ptr %11, align 4
  %162 = insertvalue { ptr, i32 } poison, ptr %160, 0
  %163 = insertvalue { ptr, i32 } %162, i32 %161, 1
  resume { ptr, i32 } %163
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4urdf4Link5clearEv(ptr noundef nonnull align 8 dereferenceable(216)) #3 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 @_ZNSt12__shared_ptrIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 @_ZNKSt19__shared_ptr_accessIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 @_ZNKSt19__shared_ptr_accessIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_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 @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt10shared_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 @_ZNSt6vectorISt10shared_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 @_ZNSt10shared_ptrIN4urdf6VisualEEaSERKS2_(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 @_ZNSt10shared_ptrIN4urdf9CollisionEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 @_ZNKSt19__shared_ptr_accessIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_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 @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt10shared_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 @_ZNSt6vectorISt10shared_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 @_ZNSt10shared_ptrIN4urdf9CollisionEEaSERKS2_(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 @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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.std::shared_ptr.11" = type { %"class.std::__shared_ptr.12" }
%"class.std::__shared_ptr.12" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.14" = type { %"class.std::__shared_ptr.15" }
%"class.std::__shared_ptr.15" = type { ptr, %"class.std::__shared_count" }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [10 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(216), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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: 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(216) %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.std::shared_ptr.11", align 8
  %6 = alloca %"class.std::shared_ptr.14", align 8
  tail call void @_ZN4urdf4Link5clearEv(ptr noundef nonnull align 8 dereferenceable(216) %0)
  %7 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(216) %1, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %74, label %8

8:                                                ; 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 %9 unwind label %18

9:                                                ; preds = %8
  %10 = 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
  %11 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull @.str.34)
  %.not51 = icmp eq ptr %11, null
  br i1 %.not51, label %22, label %12

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

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZNSt12__shared_ptrIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull %13)
  %16 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNKSt19__shared_ptr_accessIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  %17 = call noundef zeroext i1 @_ZN4urdf13parseInertialERNS_8InertialEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(112) %16, ptr noundef nonnull %11)
  br i1 %17, label %22, label %74

18:                                               ; preds = %8
  %19 = 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 %75

20:                                               ; preds = %12
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %13, i64 noundef 112) #8
  br label %75

22:                                               ; preds = %14, %9
  %23 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull @.str.35)
  %.not5265 = icmp eq ptr %23, null
  br i1 %.not5265, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %24 = getelementptr inbounds i8, ptr %0, i64 112
  br label %25

25:                                               ; preds = %.lr.ph, %38
  %.03566 = phi ptr [ %23, %.lr.ph ], [ %39, %38 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZNSt10shared_ptrIN4urdf6VisualEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  %26 = invoke noalias noundef nonnull dereferenceable(152) ptr @_Znwm(i64 noundef 152) #7
          to label %27 unwind label %34

27:                                               ; preds = %25
  invoke void @_ZN4urdf6VisualC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %26)
          to label %28 unwind label %36

28:                                               ; preds = %27
  invoke void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %26)
          to label %29 unwind label %34

29:                                               ; preds = %28
  %30 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNKSt19__shared_ptr_accessIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  %31 = invoke noundef zeroext i1 @_ZN4urdf11parseVisualERNS_6VisualEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(152) %30, ptr noundef nonnull %.03566)
          to label %32 unwind label %34

32:                                               ; preds = %29
  br i1 %31, label %33, label %41

33:                                               ; preds = %32
  invoke void @_ZNSt6vectorISt10shared_ptrIN4urdf6VisualEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %38 unwind label %34

34:                                               ; preds = %33, %29, %28, %25
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %40

36:                                               ; preds = %27
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 152) #8
  br label %40

38:                                               ; preds = %33
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %39 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03566, ptr noundef nonnull @.str.35)
  %.not52 = icmp eq ptr %39, null
  br i1 %.not52, label %.critedge, label %25, !llvm.loop !5

40:                                               ; preds = %36, %34
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %37, %36 ]
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %75

41:                                               ; preds = %32
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %74

.critedge:                                        ; preds = %38, %22
  %42 = getelementptr inbounds i8, ptr %0, i64 112
  %43 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN4urdf6VisualEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #6
  br i1 %43, label %48, label %44

44:                                               ; preds = %.critedge
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN4urdf6VisualEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef 0) #6
  %46 = getelementptr inbounds i8, ptr %0, i64 56
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN4urdf6VisualEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %45) #6
  br label %48

48:                                               ; preds = %44, %.critedge
  %49 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull @.str.36)
  %.not5467 = icmp eq ptr %49, null
  br i1 %.not5467, label %.critedge60, label %.lr.ph69

.lr.ph69:                                         ; preds = %48
  %50 = getelementptr inbounds i8, ptr %0, i64 88
  br label %51

51:                                               ; preds = %.lr.ph69, %64
  %.068 = phi ptr [ %49, %.lr.ph69 ], [ %65, %64 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZNSt10shared_ptrIN4urdf9CollisionEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  %52 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #7
          to label %53 unwind label %60

53:                                               ; preds = %51
  invoke void @_ZN4urdf9CollisionC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %52)
          to label %54 unwind label %62

54:                                               ; preds = %53
  invoke void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %52)
          to label %55 unwind label %60

55:                                               ; preds = %54
  %56 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNKSt19__shared_ptr_accessIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  %57 = invoke noundef zeroext i1 @_ZN4urdf14parseCollisionERNS_9CollisionEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(104) %56, ptr noundef nonnull %.068)
          to label %58 unwind label %60

58:                                               ; preds = %55
  br i1 %57, label %59, label %67

59:                                               ; preds = %58
  invoke void @_ZNSt6vectorISt10shared_ptrIN4urdf9CollisionEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %64 unwind label %60

60:                                               ; preds = %59, %55, %54, %51
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %66

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %52, i64 noundef 104) #8
  br label %66

64:                                               ; preds = %59
  call void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  %65 = call noundef ptr @_ZN9TiXmlNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.068, ptr noundef nonnull @.str.36)
  %.not54 = icmp eq ptr %65, null
  br i1 %.not54, label %.critedge60, label %51, !llvm.loop !7

66:                                               ; preds = %62, %60
  %.pn55 = phi { ptr, i32 } [ %61, %60 ], [ %63, %62 ]
  call void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %75

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

.critedge60:                                      ; preds = %64, %48
  %68 = getelementptr inbounds i8, ptr %0, i64 88
  %69 = call noundef zeroext i1 @_ZNKSt6vectorISt10shared_ptrIN4urdf9CollisionEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #6
  br i1 %69, label %74, label %70

70:                                               ; preds = %.critedge60
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN4urdf9CollisionEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef 0) #6
  %72 = getelementptr inbounds i8, ptr %0, i64 72
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN4urdf9CollisionEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 8 dereferenceable(16) %71) #6
  br label %74

74:                                               ; preds = %67, %41, %14, %70, %.critedge60, %2
  %.7 = phi i1 [ false, %2 ], [ false, %67 ], [ false, %41 ], [ false, %14 ], [ true, %70 ], [ true, %.critedge60 ]
  ret i1 %.7

75:                                               ; preds = %20, %40, %66, %18
  %.pn55.pn.pn = phi { ptr, i32 } [ %19, %18 ], [ %.pn55, %66 ], [ %.pn, %40 ], [ %21, %20 ]
  resume { ptr, i32 } %.pn55.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4urdf4Link5clearEv(ptr noundef nonnull align 8 dereferenceable(216)) local_unnamed_addr #3 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 @_ZNSt12__shared_ptrIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 @_ZNKSt19__shared_ptr_accessIN4urdf8InertialELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 @_ZNKSt19__shared_ptr_accessIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_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 @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt10shared_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 @_ZNSt6vectorISt10shared_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 @_ZNSt10shared_ptrIN4urdf6VisualEEaSERKS2_(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 @_ZNSt10shared_ptrIN4urdf9CollisionEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetIS1_EENSt9enable_ifIXsr21__sp_is_constructibleIS1_T_EE5valueEvE4typeEPS7_(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 @_ZNKSt19__shared_ptr_accessIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_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 @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EE5resetEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt10shared_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 @_ZNSt6vectorISt10shared_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 @_ZNSt10shared_ptrIN4urdf9CollisionEEaSERKS2_(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 @_ZNSt12__shared_ptrIN4urdf6VisualELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN4urdf9CollisionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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