; 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.urdf::Inertial" = type { %"class.urdf::Pose", double, double, double, double, double, double, double }
%"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 }

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIN5boost16bad_lexical_castE = external dso_local constant { ptr, ptr }, align 8
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [14 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #3

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf13parseInertialERNS_8InertialEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(112) %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 ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %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 @_ZN4urdf8Inertial5clearEv(ptr noundef nonnull align 8 dereferenceable(112) %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::Inertial", 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 %158

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.28)
  store ptr %28, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.29, 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 %156

32:                                               ; preds = %26
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %33, ptr noundef @.str.30)
  %35 = icmp ne ptr %34, null
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.31, 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 %156

37:                                               ; preds = %32
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %38, ptr noundef @.str.30)
          to label %40 unwind label %45

40:                                               ; preds = %37
  %41 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %39)
          to label %42 unwind label %45

42:                                               ; preds = %40
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.urdf::Inertial", ptr %43, i32 0, i32 1
  store double %41, ptr %44, align 8, !tbaa !9
  br label %62

45:                                               ; preds = %40, %37
  %46 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  br label %49

49:                                               ; preds = %45
  %50 = load i32, ptr %10, align 4
  %51 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN5boost16bad_lexical_castE) #6
  %52 = icmp eq i32 %50, %51
  br i1 %52, label %53, label %157

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %54 = load ptr, ptr %9, align 8
  %55 = call ptr @__cxa_begin_catch(ptr %54) #6
  store ptr %55, ptr %11, align 8
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.32, ptr noundef @.str.2, ptr noundef @.str.2, ptr noundef @.str.2)
          to label %56 unwind label %57

56:                                               ; preds = %53
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %156

57:                                               ; preds = %53
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %9, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %10, align 4
  invoke void @__cxa_end_catch()
          to label %61 unwind label %165

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

62:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %63, ptr noundef @.str.33)
  store ptr %64, ptr %12, align 8, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.34, 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 %154

68:                                               ; preds = %62
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %69, ptr noundef @.str.35)
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %92

72:                                               ; preds = %68
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %73, ptr noundef @.str.36)
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %92

76:                                               ; preds = %72
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %77, ptr noundef @.str.37)
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %92

80:                                               ; preds = %76
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %81, ptr noundef @.str.38)
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %92

84:                                               ; preds = %80
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %85, ptr noundef @.str.39)
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %92

88:                                               ; preds = %84
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %89, ptr noundef @.str.40)
  %91 = icmp ne ptr %90, null
  br i1 %91, label %93, label %92

92:                                               ; preds = %88, %84, %80, %76, %72, %68
  call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.41, 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 %154

93:                                               ; preds = %88
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %94, ptr noundef @.str.35)
          to label %96 unwind label %136

96:                                               ; preds = %93
  %97 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %95)
          to label %98 unwind label %136

98:                                               ; preds = %96
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.urdf::Inertial", ptr %99, i32 0, i32 2
  store double %97, ptr %100, align 8, !tbaa !15
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %101, ptr noundef @.str.36)
          to label %103 unwind label %136

103:                                              ; preds = %98
  %104 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %102)
          to label %105 unwind label %136

105:                                              ; preds = %103
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %"class.urdf::Inertial", ptr %106, i32 0, i32 3
  store double %104, ptr %107, align 8, !tbaa !16
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %108, ptr noundef @.str.37)
          to label %110 unwind label %136

110:                                              ; preds = %105
  %111 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %109)
          to label %112 unwind label %136

112:                                              ; preds = %110
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %"class.urdf::Inertial", ptr %113, i32 0, i32 4
  store double %111, ptr %114, align 8, !tbaa !17
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %115, ptr noundef @.str.38)
          to label %117 unwind label %136

117:                                              ; preds = %112
  %118 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %116)
          to label %119 unwind label %136

119:                                              ; preds = %117
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.urdf::Inertial", ptr %120, i32 0, i32 5
  store double %118, ptr %121, align 8, !tbaa !18
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %122, ptr noundef @.str.39)
          to label %124 unwind label %136

124:                                              ; preds = %119
  %125 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %123)
          to label %126 unwind label %136

126:                                              ; preds = %124
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %"class.urdf::Inertial", ptr %127, i32 0, i32 6
  store double %125, ptr %128, align 8, !tbaa !19
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %129, ptr noundef @.str.40)
          to label %131 unwind label %136

131:                                              ; preds = %126
  %132 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %130)
          to label %133 unwind label %136

133:                                              ; preds = %131
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.urdf::Inertial", ptr %134, i32 0, i32 7
  store double %132, ptr %135, align 8, !tbaa !20
  br label %153

136:                                              ; preds = %131, %126, %124, %119, %117, %112, %110, %105, %103, %98, %96, %93
  %137 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %9, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %10, align 4
  br label %140

140:                                              ; preds = %136
  %141 = load i32, ptr %10, align 4
  %142 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN5boost16bad_lexical_castE) #6
  %143 = icmp eq i32 %141, %142
  br i1 %143, label %144, label %155

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %145 = load ptr, ptr %9, align 8
  %146 = call ptr @__cxa_begin_catch(ptr %145) #6
  store ptr %146, ptr %13, align 8
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @.str.2, ptr noundef @.str.2)
          to label %147 unwind label %148

147:                                              ; preds = %144
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %154

148:                                              ; preds = %144
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %9, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %10, align 4
  invoke void @__cxa_end_catch()
          to label %152 unwind label %165

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

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

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

155:                                              ; preds = %152, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %157

156:                                              ; preds = %154, %56, %36, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %158

157:                                              ; preds = %155, %61, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %160

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

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

165:                                              ; preds = %148, %57
  %166 = landingpad { ptr, i32 }
          catch ptr null
  %167 = extractvalue { ptr, i32 } %166, 0
  call void @__clang_call_terminate(ptr %167) #7
  unreachable
}

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

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

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 = { nounwind memory(none) }
attributes #4 = { noinline noreturn nounwind uwtable "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 = { noreturn 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 = !{!10, !13, i64 56}
!10 = !{!"_ZTSN4urdf8InertialE", !11, i64 0, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104}
!11 = !{!"_ZTSN4urdf4PoseE", !12, i64 0, !14, i64 24}
!12 = !{!"_ZTSN4urdf7Vector3E", !13, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTSN4urdf8RotationE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!15 = !{!10, !13, i64 64}
!16 = !{!10, !13, i64 72}
!17 = !{!10, !13, i64 80}
!18 = !{!10, !13, i64 88}
!19 = !{!10, !13, i64 96}
!20 = !{!10, !13, i64 104}


; 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"

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIN5boost16bad_lexical_castE = external dso_local constant { ptr, ptr }, align 8
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf13parseInertialERNS_8InertialEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN4urdf8Inertial5clearEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  %3 = tail call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.27)
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %6, label %4

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

6:                                                ; preds = %4, %2
  %7 = tail call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.28)
  %.not45 = icmp eq ptr %7, null
  br i1 %.not45, label %8, label %9

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

9:                                                ; preds = %6
  %10 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %7, ptr noundef nonnull @.str.30)
  %.not46 = icmp eq ptr %10, null
  br i1 %.not46, label %11, label %12

11:                                               ; preds = %9
  tail call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %80

12:                                               ; preds = %9
  %13 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %7, ptr noundef nonnull @.str.30)
          to label %14 unwind label %18

14:                                               ; preds = %12
  %15 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %13)
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store double %15, ptr %16, align 8, !tbaa !5
  %17 = tail call noundef ptr @_ZN9TiXmlNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull @.str.33)
  %.not47 = icmp eq ptr %17, null
  br i1 %.not47, label %29, label %30

18:                                               ; preds = %12
  %19 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %20 = extractvalue { ptr, i32 } %19, 1
  %21 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN5boost16bad_lexical_castE) #5
  %22 = icmp eq i32 %20, %21
  br i1 %22, label %23, label %79

23:                                               ; preds = %18
  %24 = extractvalue { ptr, i32 } %19, 0
  %25 = tail call ptr @__cxa_begin_catch(ptr %24) #5
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
          to label %26 unwind label %27

26:                                               ; preds = %23
  tail call void @__cxa_end_catch()
  br label %80

27:                                               ; preds = %23
  %28 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %79 unwind label %81

29:                                               ; preds = %14
  tail call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %80

30:                                               ; preds = %14
  %31 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.35)
  %.not48 = icmp eq ptr %31, null
  br i1 %.not48, label %42, label %32

32:                                               ; preds = %30
  %33 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.36)
  %.not49 = icmp eq ptr %33, null
  br i1 %.not49, label %42, label %34

34:                                               ; preds = %32
  %35 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.37)
  %.not50 = icmp eq ptr %35, null
  br i1 %.not50, label %42, label %36

36:                                               ; preds = %34
  %37 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.38)
  %.not51 = icmp eq ptr %37, null
  br i1 %.not51, label %42, label %38

38:                                               ; preds = %36
  %39 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.39)
  %.not52 = icmp eq ptr %39, null
  br i1 %.not52, label %42, label %40

40:                                               ; preds = %38
  %41 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.40)
  %.not53 = icmp eq ptr %41, null
  br i1 %.not53, label %42, label %43

42:                                               ; preds = %40, %38, %36, %34, %32, %30
  tail call void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %80

43:                                               ; preds = %40
  %44 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.35)
          to label %45 unwind label %68

45:                                               ; preds = %43
  %46 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %44)
  %47 = getelementptr inbounds i8, ptr %0, i64 64
  store double %46, ptr %47, align 8, !tbaa !13
  %48 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.36)
          to label %49 unwind label %68

49:                                               ; preds = %45
  %50 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %48)
  %51 = getelementptr inbounds i8, ptr %0, i64 72
  store double %50, ptr %51, align 8, !tbaa !14
  %52 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.37)
          to label %53 unwind label %68

53:                                               ; preds = %49
  %54 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %52)
  %55 = getelementptr inbounds i8, ptr %0, i64 80
  store double %54, ptr %55, align 8, !tbaa !15
  %56 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.38)
          to label %57 unwind label %68

57:                                               ; preds = %53
  %58 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %56)
  %59 = getelementptr inbounds i8, ptr %0, i64 88
  store double %58, ptr %59, align 8, !tbaa !16
  %60 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.39)
          to label %61 unwind label %68

61:                                               ; preds = %57
  %62 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %60)
  %63 = getelementptr inbounds i8, ptr %0, i64 96
  store double %62, ptr %63, align 8, !tbaa !17
  %64 = invoke noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %17, ptr noundef nonnull @.str.40)
          to label %65 unwind label %68

65:                                               ; preds = %61
  %66 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %64)
  %67 = getelementptr inbounds i8, ptr %0, i64 104
  store double %66, ptr %67, align 8, !tbaa !18
  br label %80

68:                                               ; preds = %61, %57, %53, %49, %45, %43
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %70 = extractvalue { ptr, i32 } %69, 1
  %71 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN5boost16bad_lexical_castE) #5
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %79

73:                                               ; preds = %68
  %74 = extractvalue { ptr, i32 } %69, 0
  %75 = tail call ptr @__cxa_begin_catch(ptr %74) #5
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
          to label %76 unwind label %77

76:                                               ; preds = %73
  tail call void @__cxa_end_catch()
  br label %80

77:                                               ; preds = %73
  %78 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %79 unwind label %81

79:                                               ; preds = %77, %27, %68, %18
  %.merged = phi { ptr, i32 } [ %19, %18 ], [ %69, %68 ], [ %28, %27 ], [ %78, %77 ]
  resume { ptr, i32 } %.merged

80:                                               ; preds = %8, %11, %26, %65, %76, %42, %29, %4
  %.2 = phi i1 [ false, %4 ], [ false, %26 ], [ false, %11 ], [ false, %8 ], [ true, %65 ], [ false, %76 ], [ false, %42 ], [ false, %29 ]
  ret i1 %.2

81:                                               ; preds = %77, %27
  %82 = landingpad { ptr, i32 }
          catch ptr null
  %83 = extractvalue { ptr, i32 } %82, 0
  tail call void @__clang_call_terminate(ptr %83) #6
  unreachable
}

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

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

attributes #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nosync nounwind memory(none) }
attributes #3 = { noinline noreturn nounwind uwtable "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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !9, i64 56}
!6 = !{!"_ZTSN4urdf8InertialE", !7, i64 0, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !9, i64 88, !9, i64 96, !9, i64 104}
!7 = !{!"_ZTSN4urdf4PoseE", !8, i64 0, !12, i64 24}
!8 = !{!"_ZTSN4urdf7Vector3E", !9, i64 0, !9, i64 8, !9, i64 16}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN4urdf8RotationE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!13 = !{!6, !9, i64 64}
!14 = !{!6, !9, i64 72}
!15 = !{!6, !9, i64 80}
!16 = !{!6, !9, i64 88}
!17 = !{!6, !9, i64 96}
!18 = !{!6, !9, i64 104}


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