; LLVM IR from simbody/simbody :: SimTKcommon/src/Xml.ll (ZNK5SimTK3Xml7Element14isValueElementEv)

; 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.SimTK::Xml::element_iterator" = type { %"class.SimTK::Xml::node_iterator.base", %"class.SimTK::String" }
%"class.SimTK::Xml::node_iterator.base" = type <{ %"class.SimTK::Xml::Node", i32 }>
%"class.SimTK::Xml::Node" = type { ptr }
%"class.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"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.SimTK::Xml::node_iterator" = type <{ %"class.SimTK::Xml::Node", i32, [4 x i8] }>

@.str.34 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

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 noundef zeroext i1 @_ZNK5SimTK3Xml13node_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK5SimTK3Xml7Element14isValueElementEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.SimTK::Xml::element_iterator", align 8
  %5 = alloca %"class.SimTK::String", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.SimTK::Xml::element_iterator", align 8
  %9 = alloca %"class.SimTK::Xml::node_iterator", align 8
  %10 = alloca %"class.SimTK::Xml::node_iterator", align 8
  %11 = alloca %"class.SimTK::Xml::node_iterator", align 8
  %12 = alloca i1, align 1
  %13 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #4
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5SimTK3Xml7Element7unconstEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #4
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.34)
  invoke void @_ZN5SimTK3Xml7Element13element_beginERKNS_6StringE(ptr dead_on_unwind writable sret(%"class.SimTK::Xml::element_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %16 unwind label %21

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #4
  invoke void @_ZNK5SimTK3Xml7Element11element_endEv(ptr dead_on_unwind writable sret(%"class.SimTK::Xml::element_iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %17 unwind label %25

17:                                               ; preds = %16
  %18 = invoke noundef zeroext i1 @_ZNK5SimTK3Xml16element_iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %19 unwind label %29

19:                                               ; preds = %17
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #4
  br i1 %18, label %20, label %35

20:                                               ; preds = %19
  store i1 false, ptr %2, align 1
  br label %79

21:                                               ; preds = %1
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %6, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %7, align 4
  br label %34

25:                                               ; preds = %16
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %6, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %7, align 4
  br label %33

29:                                               ; preds = %17
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  br label %33

33:                                               ; preds = %29, %25
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #4
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  br label %34

34:                                               ; preds = %33, %21
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #4
  br label %81

35:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5SimTK3Xml7Element7unconstEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @_ZN5SimTK3Xml7Element10node_beginENS0_8NodeTypeE(ptr dead_on_unwind writable sret(%"class.SimTK::Xml::node_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %36, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  store i1 false, ptr %12, align 1
  store i1 false, ptr %13, align 1
  invoke void @_ZNK5SimTK3Xml7Element8node_endEv(ptr dead_on_unwind writable sret(%"class.SimTK::Xml::node_iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %37 unwind label %54

37:                                               ; preds = %35
  %38 = invoke noundef zeroext i1 @_ZNK5SimTK3Xml13node_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %10)
          to label %39 unwind label %58

39:                                               ; preds = %37
  br i1 %38, label %46, label %40

40:                                               ; preds = %39
  %41 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN5SimTK3Xml13node_iteratorppEv(ptr noundef nonnull align 8 dereferenceable(12) %9)
          to label %42 unwind label %58

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  store i1 true, ptr %12, align 1
  invoke void @_ZNK5SimTK3Xml7Element8node_endEv(ptr dead_on_unwind writable sret(%"class.SimTK::Xml::node_iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %43 unwind label %62

43:                                               ; preds = %42
  store i1 true, ptr %13, align 1
  %44 = invoke noundef zeroext i1 @_ZNK5SimTK3Xml13node_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(12) %41, ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %45 unwind label %66

45:                                               ; preds = %43
  br label %46

46:                                               ; preds = %45, %39
  %47 = phi i1 [ true, %39 ], [ %44, %45 ]
  store i1 %47, ptr %2, align 1
  %48 = load i1, ptr %13, align 1
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #4
  br label %50

50:                                               ; preds = %49, %46
  %51 = load i1, ptr %12, align 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  br label %53

53:                                               ; preds = %52, %50
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %79

54:                                               ; preds = %35
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  br label %78

58:                                               ; preds = %40, %37
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %6, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %7, align 4
  br label %77

62:                                               ; preds = %42
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %6, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %7, align 4
  br label %73

66:                                               ; preds = %43
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %6, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %7, align 4
  %70 = load i1, ptr %13, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %66
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %11) #4
  br label %72

72:                                               ; preds = %71, %66
  br label %73

73:                                               ; preds = %72, %62
  %74 = load i1, ptr %12, align 1
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  br label %76

76:                                               ; preds = %75, %73
  br label %77

77:                                               ; preds = %76, %58
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %10) #4
  br label %78

78:                                               ; preds = %77, %54
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %81

79:                                               ; preds = %53, %20
  %80 = load i1, ptr %2, align 1
  ret i1 %80

81:                                               ; preds = %78, %34
  %82 = load ptr, ptr %6, align 8
  %83 = load i32, ptr %7, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK3Xml7Element13element_beginERKNS_6StringE(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::element_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5SimTK3Xml7Element11element_endEv(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::element_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK3Xml7Element10node_beginENS0_8NodeTypeE(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::node_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5SimTK3Xml7Element8node_endEv(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::node_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #0 align 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 = { 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 = { inlinehint 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 = { 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.SimTK::Xml::element_iterator" = type { %"class.SimTK::Xml::node_iterator.base", %"class.SimTK::String" }
%"class.SimTK::Xml::node_iterator.base" = type <{ %"class.SimTK::Xml::Node", i32 }>
%"class.SimTK::Xml::Node" = type { ptr }
%"class.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"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.SimTK::Xml::node_iterator" = type <{ %"class.SimTK::Xml::Node", i32, [4 x i8] }>

@.str.34 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

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 noundef zeroext i1 @_ZNK5SimTK3Xml13node_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK5SimTK3Xml7Element14isValueElementEv(ptr noundef nonnull align 8 dereferenceable(8) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.SimTK::Xml::element_iterator", align 8
  %3 = alloca %"class.SimTK::String", align 8
  %4 = alloca %"class.SimTK::Xml::element_iterator", align 8
  %5 = alloca %"class.SimTK::Xml::node_iterator", align 8
  %6 = alloca %"class.SimTK::Xml::node_iterator", align 8
  %7 = alloca %"class.SimTK::Xml::node_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #4
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5SimTK3Xml7Element7unconstEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.34)
  invoke void @_ZN5SimTK3Xml7Element13element_beginERKNS_6StringE(ptr dead_on_unwind nonnull writable sret(%"class.SimTK::Xml::element_iterator") align 8 %2, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %9 unwind label %13

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #4
  invoke void @_ZNK5SimTK3Xml7Element11element_endEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTK::Xml::element_iterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %10 unwind label %15

10:                                               ; preds = %9
  %11 = invoke noundef zeroext i1 @_ZNK5SimTK3Xml16element_iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %12 unwind label %17

12:                                               ; preds = %10
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #4
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  br i1 %11, label %44, label %21

13:                                               ; preds = %1
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %20

15:                                               ; preds = %9
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %19

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #4
  br label %19

19:                                               ; preds = %17, %15
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #4
  call void @_ZN5SimTK3Xml16element_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  br label %20

20:                                               ; preds = %19, %13
  %.pn.pn = phi { ptr, i32 } [ %.pn, %19 ], [ %14, %13 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  br label %45

21:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5SimTK3Xml7Element7unconstEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  call void @_ZN5SimTK3Xml7Element10node_beginENS0_8NodeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.SimTK::Xml::node_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  invoke void @_ZNK5SimTK3Xml7Element8node_endEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTK::Xml::node_iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %23 unwind label %33

23:                                               ; preds = %21
  %24 = invoke noundef zeroext i1 @_ZNK5SimTK3Xml13node_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %25 unwind label %35

25:                                               ; preds = %23
  br i1 %24, label %.critedge, label %26

26:                                               ; preds = %25
  %27 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN5SimTK3Xml13node_iteratorppEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
          to label %28 unwind label %35

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZNK5SimTK3Xml7Element8node_endEv(ptr dead_on_unwind nonnull writable sret(%"class.SimTK::Xml::node_iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %29 unwind label %37

29:                                               ; preds = %28
  %30 = invoke noundef zeroext i1 @_ZNK5SimTK3Xml13node_iteratoreqERKS1_(ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %31 unwind label %39

31:                                               ; preds = %29
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %.critedge

.critedge:                                        ; preds = %25, %31
  %32 = phi i1 [ %30, %31 ], [ true, %25 ]
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %44

33:                                               ; preds = %21
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %43

35:                                               ; preds = %26, %23
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %42

37:                                               ; preds = %28
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %29
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %7) #4
  br label %41

41:                                               ; preds = %37, %39
  %.pn18 = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %42

42:                                               ; preds = %41, %35
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %41 ], [ %36, %35 ]
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %6) #4
  br label %43

43:                                               ; preds = %42, %33
  %.pn18.pn.pn = phi { ptr, i32 } [ %.pn18.pn, %42 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN5SimTK3Xml13node_iteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %45

44:                                               ; preds = %12, %.critedge
  %.015 = phi i1 [ %32, %.critedge ], [ false, %12 ]
  ret i1 %.015

45:                                               ; preds = %43, %20
  %.pn18.pn.pn.pn = phi { ptr, i32 } [ %.pn18.pn.pn, %43 ], [ %.pn.pn, %20 ]
  resume { ptr, i32 } %.pn18.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK3Xml7Element13element_beginERKNS_6StringE(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::element_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5SimTK3Xml7Element11element_endEv(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::element_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK3Xml7Element10node_beginENS0_8NodeTypeE(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::node_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5SimTK3Xml7Element8node_endEv(ptr dead_on_unwind noalias writable sret(%"class.SimTK::Xml::node_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 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 = { 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 = { inlinehint 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 = { 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,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass