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

; 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::JointSafety" = 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.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [41 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 @_Z8logDebugPKcS0_S0_(ptr noundef, ptr noundef, ptr noundef) #1

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

declare i32 @__gxx_personality_v0(...)

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

declare ptr @__cxa_begin_catch(ptr)

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

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

declare void @__cxa_end_catch()

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf16parseJointSafetyERNS_11JointSafetyEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #5 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 ptr, align 8
  %8 = alloca i32, align 4
  %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
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, 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 @_ZN4urdf11JointSafety5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %18, ptr noundef @.str.21)
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %25

22:                                               ; preds = %2
  call void @_Z8logDebugPKcS0_S0_(ptr noundef @.str.22, ptr noundef @.str.2, ptr noundef @.str.2)
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.urdf::JointSafety", ptr %23, i32 0, i32 1
  store double 0.000000e+00, ptr %24, align 8, !tbaa !9
  br label %53

25:                                               ; preds = %2
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %26)
          to label %28 unwind label %31

28:                                               ; preds = %25
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.urdf::JointSafety", ptr %29, i32 0, i32 1
  store double %27, ptr %30, align 8, !tbaa !9
  br label %52

31:                                               ; preds = %25
  %32 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %7, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %8, align 4
  br label %35

35:                                               ; preds = %31
  %36 = load i32, ptr %8, align 4
  %37 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN5boost16bad_lexical_castE) #6
  %38 = icmp eq i32 %36, %37
  br i1 %38, label %39, label %168

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %40 = load ptr, ptr %7, align 8
  %41 = call ptr @__cxa_begin_catch(ptr %40) #6
  store ptr %41, ptr %9, align 8
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = invoke noundef ptr @_ZN5boost16bad_lexical_cast4whatEv(ptr noundef nonnull align 1 dereferenceable(1) %43)
          to label %45 unwind label %47

45:                                               ; preds = %39
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.23, ptr noundef %42, ptr noundef %44, ptr noundef @.str.2)
          to label %46 unwind label %47

46:                                               ; preds = %45
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %166

47:                                               ; preds = %45, %39
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %51 unwind label %174

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

52:                                               ; preds = %28
  br label %53

53:                                               ; preds = %52, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %54, ptr noundef @.str.24)
  store ptr %55, ptr %11, align 8, !tbaa !5
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  call void @_Z8logDebugPKcS0_S0_(ptr noundef @.str.25, ptr noundef @.str.2, ptr noundef @.str.2)
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.urdf::JointSafety", ptr %59, i32 0, i32 0
  store double 0.000000e+00, ptr %60, align 8, !tbaa !12
  br label %89

61:                                               ; preds = %53
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %62)
          to label %64 unwind label %67

64:                                               ; preds = %61
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.urdf::JointSafety", ptr %65, i32 0, i32 0
  store double %63, ptr %66, align 8, !tbaa !12
  br label %88

67:                                               ; preds = %61
  %68 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  br label %71

71:                                               ; preds = %67
  %72 = load i32, ptr %8, align 4
  %73 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN5boost16bad_lexical_castE) #6
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %165

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %76 = load ptr, ptr %7, align 8
  %77 = call ptr @__cxa_begin_catch(ptr %76) #6
  store ptr %77, ptr %12, align 8
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = invoke noundef ptr @_ZN5boost16bad_lexical_cast4whatEv(ptr noundef nonnull align 1 dereferenceable(1) %79)
          to label %81 unwind label %83

81:                                               ; preds = %75
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.26, ptr noundef %78, ptr noundef %80, ptr noundef @.str.2)
          to label %82 unwind label %83

82:                                               ; preds = %81
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %164

83:                                               ; preds = %81, %75
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %7, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %87 unwind label %174

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

88:                                               ; preds = %64
  br label %89

89:                                               ; preds = %88, %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %90, ptr noundef @.str.27)
  store ptr %91, ptr %13, align 8, !tbaa !5
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %97

94:                                               ; preds = %89
  call void @_Z8logDebugPKcS0_S0_(ptr noundef @.str.28, ptr noundef @.str.2, ptr noundef @.str.2)
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.urdf::JointSafety", ptr %95, i32 0, i32 2
  store double 0.000000e+00, ptr %96, align 8, !tbaa !13
  br label %125

97:                                               ; preds = %89
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %98)
          to label %100 unwind label %103

100:                                              ; preds = %97
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.urdf::JointSafety", ptr %101, i32 0, i32 2
  store double %99, ptr %102, align 8, !tbaa !13
  br label %124

103:                                              ; preds = %97
  %104 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  br label %107

107:                                              ; preds = %103
  %108 = load i32, ptr %8, align 4
  %109 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN5boost16bad_lexical_castE) #6
  %110 = icmp eq i32 %108, %109
  br i1 %110, label %111, label %163

111:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %112 = load ptr, ptr %7, align 8
  %113 = call ptr @__cxa_begin_catch(ptr %112) #6
  store ptr %113, ptr %14, align 8
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = invoke noundef ptr @_ZN5boost16bad_lexical_cast4whatEv(ptr noundef nonnull align 1 dereferenceable(1) %115)
          to label %117 unwind label %119

117:                                              ; preds = %111
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.29, ptr noundef %114, ptr noundef %116, ptr noundef @.str.2)
          to label %118 unwind label %119

118:                                              ; preds = %117
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %162

119:                                              ; preds = %117, %111
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %123 unwind label %174

123:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %163

124:                                              ; preds = %100
  br label %125

125:                                              ; preds = %124, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %126, ptr noundef @.str.30)
  store ptr %127, ptr %15, align 8, !tbaa !5
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = icmp eq ptr %128, null
  br i1 %129, label %130, label %131

130:                                              ; preds = %125
  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 %10, align 4
  br label %160

131:                                              ; preds = %125
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  %133 = invoke noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef %132)
          to label %134 unwind label %137

134:                                              ; preds = %131
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.urdf::JointSafety", ptr %135, i32 0, i32 3
  store double %133, ptr %136, align 8, !tbaa !14
  br label %158

137:                                              ; preds = %131
  %138 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN5boost16bad_lexical_castE
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %7, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %8, align 4
  br label %141

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

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %146 = load ptr, ptr %7, align 8
  %147 = call ptr @__cxa_begin_catch(ptr %146) #6
  store ptr %147, ptr %16, align 8
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = invoke noundef ptr @_ZN5boost16bad_lexical_cast4whatEv(ptr noundef nonnull align 1 dereferenceable(1) %149)
          to label %151 unwind label %153

151:                                              ; preds = %145
  invoke void @_Z8logErrorPKcS0_S0_S0_(ptr noundef @.str.32, ptr noundef %148, ptr noundef %150, ptr noundef @.str.2)
          to label %152 unwind label %153

152:                                              ; preds = %151
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %160

153:                                              ; preds = %151, %145
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %7, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %157 unwind label %174

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

158:                                              ; preds = %134
  br label %159

159:                                              ; preds = %158
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %160

160:                                              ; preds = %159, %152, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %162

161:                                              ; preds = %157, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %163

162:                                              ; preds = %160, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %164

163:                                              ; preds = %161, %123, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %165

164:                                              ; preds = %162, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %166

165:                                              ; preds = %163, %87, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %168

166:                                              ; preds = %164, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %167 = load i1, ptr %3, align 1
  ret i1 %167

168:                                              ; preds = %165, %51, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %7, align 8
  %171 = load i32, ptr %8, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173

174:                                              ; preds = %153, %119, %83, %47
  %175 = landingpad { ptr, i32 }
          catch ptr null
  %176 = extractvalue { ptr, i32 } %175, 0
  call void @__clang_call_terminate(ptr %176) #7
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4urdf11JointSafety5clearEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 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 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 #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 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, !11, i64 8}
!10 = !{!"_ZTSN4urdf11JointSafetyE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!11 = !{!"double", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !11, i64 24}


; 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
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4urdf16parseJointSafetyERNS_11JointSafetyEP12TiXmlElement(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN4urdf11JointSafety5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %3 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull @.str.21)
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %6

5:                                                ; preds = %2
  tail call void @_Z8logDebugPKcS0_S0_(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %8

6:                                                ; preds = %2
  %7 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef nonnull %3)
  br label %8

8:                                                ; preds = %6, %5
  %.sink = phi double [ 0.000000e+00, %5 ], [ %7, %6 ]
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  store double %.sink, ptr %9, align 8
  %10 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull @.str.24)
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  tail call void @_Z8logDebugPKcS0_S0_(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %15

13:                                               ; preds = %8
  %14 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef nonnull %10)
  br label %15

15:                                               ; preds = %13, %12
  %storemerge = phi double [ %14, %13 ], [ 0.000000e+00, %12 ]
  store double %storemerge, ptr %0, align 8, !tbaa !5
  %16 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull @.str.27)
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  tail call void @_Z8logDebugPKcS0_S0_(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.2)
  br label %21

19:                                               ; preds = %15
  %20 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef nonnull %16)
  br label %21

21:                                               ; preds = %19, %18
  %.sink25 = phi double [ 0.000000e+00, %18 ], [ %20, %19 ]
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  store double %.sink25, ptr %22, align 8
  %23 = tail call noundef ptr @_ZNK12TiXmlElement9AttributeEPKc(ptr noundef nonnull align 8 dereferenceable(144) %1, ptr noundef nonnull @.str.30)
  %24 = icmp ne ptr %23, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  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 %29

26:                                               ; preds = %21
  %27 = tail call noundef double @_ZN5boost12lexical_castIdEET_PKc(ptr noundef nonnull %23)
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  store double %27, ptr %28, align 8, !tbaa !10
  br label %29

29:                                               ; preds = %26, %25
  ret i1 %24
}

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

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !7, i64 0}
!6 = !{!"_ZTSN4urdf11JointSafetyE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 24}


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