; 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.my_shared_ptr = type { ptr, ptr }
%"class.urdf::Visual" = type { %"class.urdf::Pose", %class.my_shared_ptr, %"class.std::__cxx11::basic_string", %class.my_shared_ptr.1, %"class.std::__cxx11::basic_string" }
%"class.urdf::Pose" = type { %"class.urdf::Vector3", %"class.urdf::Rotation" }
%"class.urdf::Vector3" = type { double, double, double }
%"class.urdf::Rotation" = type { double, double, double, double }
%class.my_shared_ptr.1 = type { ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [80 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4urdf13parseMaterialERNS_8MaterialEP12TiXmlElementb(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i1 noundef zeroext) #0

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

declare noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) #2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4urdf13parseGeometryEP12TiXmlElement(ptr dead_on_unwind noalias writable sret(%class.my_shared_ptr) align 8, ptr noundef) #0

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

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

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

declare noundef zeroext i1 @_ZN4urdf9parsePoseERNS_4PoseEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf11parseVisualERNS_6VisualEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef %1) #0 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 ptr, align 8
  %9 = alloca %class.my_shared_ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4urdf6Visual5clearEv(ptr noundef nonnull align 8 dereferenceable(152) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %15, ptr noundef @.str.27)
  store ptr %16, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %26

19:                                               ; preds = %2
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.urdf::Visual", ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZN4urdf9parsePoseERNS_4PoseEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef %22)
  br i1 %23, label %25, label %24

24:                                               ; preds = %19
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %87

25:                                               ; preds = %19
  br label %26

26:                                               ; preds = %25, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %27, ptr noundef @.str.43)
  store ptr %28, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN4urdf13parseGeometryEP12TiXmlElement(ptr dead_on_unwind writable sret(%class.my_shared_ptr) align 8 %9, ptr noundef %29)
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.urdf::Visual", ptr %30, i32 0, i32 1
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN13my_shared_ptrIN4urdf8GeometryEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %33 unwind label %38

33:                                               ; preds = %26
  call void @_ZN13my_shared_ptrIN4urdf8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.urdf::Visual", ptr %34, i32 0, i32 1
  %36 = call noundef zeroext i1 @_ZNK13my_shared_ptrIN4urdf8GeometryEEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %35)
  br i1 %36, label %42, label %37

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

38:                                               ; preds = %26
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %10, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %11, align 4
  call void @_ZN13my_shared_ptrIN4urdf8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %86

42:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %43, ptr noundef @.str)
  store ptr %44, ptr %12, align 8, !tbaa !5
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %52

47:                                               ; preds = %42
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.urdf::Visual", ptr %49, i32 0, i32 4
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef %48)
  br label %52

52:                                               ; preds = %47, %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %53, ptr noundef @.str.44)
  store ptr %54, ptr %13, align 8, !tbaa !5
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %83

57:                                               ; preds = %52
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %58, ptr noundef @.str)
  %60 = icmp ne ptr %59, null
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.45, 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 %84

62:                                               ; preds = %57
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %63, ptr noundef @.str)
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.urdf::Visual", ptr %65, i32 0, i32 2
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %66, ptr noundef %64)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %"class.urdf::Visual", ptr %68, i32 0, i32 3
  %70 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #7
  invoke void @_ZN4urdf8MaterialC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %70)
          to label %71 unwind label %78

71:                                               ; preds = %62
  call void @_ZN13my_shared_ptrIN4urdf8MaterialEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef %70)
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.urdf::Visual", ptr %72, i32 0, i32 3
  %74 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK13my_shared_ptrIN4urdf8MaterialEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %73)
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = call noundef zeroext i1 @_ZN4urdf13parseMaterialERNS_8MaterialEP12TiXmlElementb(ptr noundef nonnull align 8 dereferenceable(80) %74, ptr noundef %75, i1 noundef zeroext true)
  br i1 %76, label %82, label %77

77:                                               ; preds = %71
  call void @_Z8logDebugPKcS0_S0_(ptr noundef @.str.46, ptr noundef @.str.2, ptr noundef @.str.2)
  br label %82

78:                                               ; preds = %62
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %10, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %70, i64 noundef 80) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %86

82:                                               ; preds = %77, %71
  br label %83

83:                                               ; preds = %82, %52
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %84

84:                                               ; preds = %83, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %85

85:                                               ; preds = %84, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %87

86:                                               ; preds = %78, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %89

87:                                               ; preds = %85, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %88 = load i1, ptr %3, align 1
  ret i1 %88

89:                                               ; preds = %86
  %90 = load ptr, ptr %10, align 8
  %91 = load i32, ptr %11, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

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

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

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

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

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

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

declare void @_Z8logDebugPKcS0_S0_(ptr noundef, ptr noundef, ptr noundef) #2

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


; 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.my_shared_ptr = 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.27 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [80 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4urdf13parseMaterialERNS_8MaterialEP12TiXmlElementb(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

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

declare noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) local_unnamed_addr #2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4urdf13parseGeometryEP12TiXmlElement(ptr dead_on_unwind noalias writable sret(%class.my_shared_ptr) align 8, ptr noundef) local_unnamed_addr #0

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

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

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

declare noundef zeroext i1 @_ZN4urdf9parsePoseERNS_4PoseEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf11parseVisualERNS_6VisualEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.my_shared_ptr, align 8
  tail call void @_ZN4urdf6Visual5clearEv(ptr noundef nonnull align 8 dereferenceable(152) %0)
  %4 = tail call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.27)
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %7, label %5

5:                                                ; preds = %2
  %6 = tail call noundef zeroext i1 @_ZN4urdf9parsePoseERNS_4PoseEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull %4)
  br i1 %6, label %7, label %34

7:                                                ; preds = %5, %2
  %8 = tail call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.43)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @_ZN4urdf13parseGeometryEP12TiXmlElement(ptr dead_on_unwind nonnull writable sret(%class.my_shared_ptr) align 8 %3, ptr noundef %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13my_shared_ptrIN4urdf8GeometryEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @_ZN13my_shared_ptrIN4urdf8GeometryEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %11 = call noundef zeroext i1 @_ZNK13my_shared_ptrIN4urdf8GeometryEEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  br i1 %11, label %12, label %34

12:                                               ; preds = %7
  %13 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull @.str)
  %.not26 = icmp eq ptr %13, null
  br i1 %.not26, label %17, label %14

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 120
  %16 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull %13)
  br label %17

17:                                               ; preds = %14, %12
  %18 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.44)
  %.not27 = icmp eq ptr %18, null
  br i1 %.not27, label %34, label %19

19:                                               ; preds = %17
  %20 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %18, ptr noundef nonnull @.str)
  %.not28 = icmp eq ptr %20, null
  br i1 %.not28, label %21, label %22

21:                                               ; preds = %19
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.45, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %34

22:                                               ; preds = %19
  %23 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %18, ptr noundef nonnull @.str)
  %24 = getelementptr inbounds i8, ptr %0, i64 72
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef %23)
  %26 = call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #7
  invoke void @_ZN4urdf8MaterialC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %26)
          to label %27 unwind label %32

27:                                               ; preds = %22
  %28 = getelementptr inbounds i8, ptr %0, i64 104
  call void @_ZN13my_shared_ptrIN4urdf8MaterialEE5resetEPKS1_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull %26)
  %29 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK13my_shared_ptrIN4urdf8MaterialEEdeEv(ptr noundef nonnull align 8 dereferenceable(16) %28)
  %30 = call noundef zeroext i1 @_ZN4urdf13parseMaterialERNS_8MaterialEP12TiXmlElementb(ptr noundef nonnull align 8 dereferenceable(80) %29, ptr noundef nonnull %18, i1 noundef zeroext true)
  br i1 %30, label %34, label %31

31:                                               ; preds = %27
  call void @_Z8logDebugPKcS0_S0_(ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %34

32:                                               ; preds = %22
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 80) #8
  resume { ptr, i32 } %33

34:                                               ; preds = %7, %17, %31, %27, %21, %5
  %.2 = phi i1 [ false, %5 ], [ false, %7 ], [ false, %21 ], [ true, %27 ], [ true, %31 ], [ true, %17 ]
  ret i1 %.2
}

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

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

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

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

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

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

declare void @_Z8logDebugPKcS0_S0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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


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