; LLVM IR from simbody/simbody :: SimTKcommon/src (tinyxmlparser)

; 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::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::TiXmlAttribute" = type { %"class.SimTK::TiXmlBase", ptr, %"class.SimTK::String", %"class.SimTK::String", ptr, ptr }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }
%"class.SimTK::TiXmlDeclaration" = type { %"class.SimTK::TiXmlNode", %"class.SimTK::String", %"class.SimTK::String", %"class.SimTK::String" }
%"class.SimTK::TiXmlNode" = type { %"class.SimTK::TiXmlBase", ptr, i32, ptr, ptr, %"class.SimTK::String", ptr, ptr }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [11 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef, i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef, ptr noundef, i1 noundef zeroext, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK16TiXmlDeclaration5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.SimTK::String", align 8
  %13 = alloca %"class.SimTK::String", align 8
  %14 = alloca %"class.SimTK::String", align 8
  %15 = alloca %"class.SimTK::TiXmlAttribute", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.SimTK::String", align 8
  %19 = alloca %"class.SimTK::TiXmlAttribute", align 8
  %20 = alloca %"class.SimTK::String", align 8
  %21 = alloca %"class.SimTK::TiXmlAttribute", align 8
  %22 = alloca %"class.SimTK::String", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %23 = load ptr, ptr %6, align 8
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %24, i32 noundef %25)
  store ptr %26, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %27 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %23)
  store ptr %27, ptr %10, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %38

30:                                               ; preds = %4
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = icmp ne i8 %32, 0
  br i1 %33, label %34, label %38

34:                                               ; preds = %30
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %35, ptr noundef @.str.19, i1 noundef zeroext true, i32 noundef %36)
  br i1 %37, label %45, label %38

38:                                               ; preds = %34, %30, %4
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %44

41:                                               ; preds = %38
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %42, i32 noundef 12, ptr noundef null, ptr noundef null, i32 noundef %43)
  br label %44

44:                                               ; preds = %41, %38
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %185

45:                                               ; preds = %34
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %55

48:                                               ; preds = %45
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20) %49, ptr noundef %50, i32 noundef %51)
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %52)
  %54 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 4 %53, i64 8, i1 false), !tbaa.struct !12
  br label %55

55:                                               ; preds = %48, %45
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 5
  store ptr %57, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.11)
  %58 = getelementptr inbounds %"class.SimTK::TiXmlDeclaration", ptr %23, i32 0, i32 1
  %59 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.11)
  %60 = getelementptr inbounds %"class.SimTK::TiXmlDeclaration", ptr %23, i32 0, i32 2
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.11)
  %62 = getelementptr inbounds %"class.SimTK::TiXmlDeclaration", ptr %23, i32 0, i32 3
  %63 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %64

64:                                               ; preds = %183, %55
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %71

67:                                               ; preds = %64
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = icmp ne i8 %69, 0
  br label %71

71:                                               ; preds = %67, %64
  %72 = phi i1 [ false, %64 ], [ %70, %67 ]
  br i1 %72, label %73, label %184

73:                                               ; preds = %71
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 62
  br i1 %77, label %78, label %82

78:                                               ; preds = %73
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i32 1
  store ptr %80, ptr %7, align 8, !tbaa !5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %81, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %185

82:                                               ; preds = %73
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %83, i32 noundef %84)
  store ptr %85, ptr %7, align 8, !tbaa !5
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %86, ptr noundef @.str.33, i1 noundef zeroext true, i32 noundef %87)
  br i1 %88, label %89, label %109

89:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 112, ptr %15) #5
  call void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %15)
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load i32, ptr %9, align 4, !tbaa !9
  %93 = invoke noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %15, ptr noundef %90, ptr noundef %91, i32 noundef %92)
          to label %94 unwind label %100

94:                                               ; preds = %89
  store ptr %93, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  %95 = invoke noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %15)
          to label %96 unwind label %104

96:                                               ; preds = %94
  invoke void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %95)
          to label %97 unwind label %104

97:                                               ; preds = %96
  %98 = getelementptr inbounds %"class.SimTK::TiXmlDeclaration", ptr %23, i32 0, i32 1
  %99 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %98, ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %15) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %15) #5
  br label %183

100:                                              ; preds = %89
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %16, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %17, align 4
  br label %108

104:                                              ; preds = %96, %94
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %16, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %108

108:                                              ; preds = %104, %100
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %15) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %15) #5
  br label %187

109:                                              ; preds = %82
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %110, ptr noundef @.str.34, i1 noundef zeroext true, i32 noundef %111)
  br i1 %112, label %113, label %133

113:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 112, ptr %19) #5
  call void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %19)
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = invoke noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %19, ptr noundef %114, ptr noundef %115, i32 noundef %116)
          to label %118 unwind label %124

118:                                              ; preds = %113
  store ptr %117, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  %119 = invoke noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %19)
          to label %120 unwind label %128

120:                                              ; preds = %118
  invoke void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %119)
          to label %121 unwind label %128

121:                                              ; preds = %120
  %122 = getelementptr inbounds %"class.SimTK::TiXmlDeclaration", ptr %23, i32 0, i32 2
  %123 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %122, ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %19) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %19) #5
  br label %182

124:                                              ; preds = %113
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %16, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %17, align 4
  br label %132

128:                                              ; preds = %120, %118
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %16, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  br label %132

132:                                              ; preds = %128, %124
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %19) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %19) #5
  br label %187

133:                                              ; preds = %109
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %134, ptr noundef @.str.35, i1 noundef zeroext true, i32 noundef %135)
  br i1 %136, label %137, label %157

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 112, ptr %21) #5
  call void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %21)
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = invoke noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %21, ptr noundef %138, ptr noundef %139, i32 noundef %140)
          to label %142 unwind label %148

142:                                              ; preds = %137
  store ptr %141, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #5
  %143 = invoke noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %21)
          to label %144 unwind label %152

144:                                              ; preds = %142
  invoke void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %143)
          to label %145 unwind label %152

145:                                              ; preds = %144
  %146 = getelementptr inbounds %"class.SimTK::TiXmlDeclaration", ptr %23, i32 0, i32 3
  %147 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %146, ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %21) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %21) #5
  br label %181

148:                                              ; preds = %137
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %16, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %17, align 4
  br label %156

152:                                              ; preds = %144, %142
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %16, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  br label %156

156:                                              ; preds = %152, %148
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %21) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %21) #5
  br label %187

157:                                              ; preds = %133
  br label %158

158:                                              ; preds = %177, %157
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %175

161:                                              ; preds = %158
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = load i8, ptr %162, align 1, !tbaa !11
  %164 = icmp ne i8 %163, 0
  br i1 %164, label %165, label %175

165:                                              ; preds = %161
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = load i8, ptr %166, align 1, !tbaa !11
  %168 = sext i8 %167 to i32
  %169 = icmp ne i32 %168, 62
  br i1 %169, label %170, label %175

170:                                              ; preds = %165
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = load i8, ptr %171, align 1, !tbaa !11
  %173 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext %172)
  %174 = xor i1 %173, true
  br label %175

175:                                              ; preds = %170, %165, %161, %158
  %176 = phi i1 [ false, %165 ], [ false, %161 ], [ false, %158 ], [ %174, %170 ]
  br i1 %176, label %177, label %180

177:                                              ; preds = %175
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = getelementptr inbounds i8, ptr %178, i32 1
  store ptr %179, ptr %7, align 8, !tbaa !5
  br label %158, !llvm.loop !15

180:                                              ; preds = %175
  br label %181

181:                                              ; preds = %180, %145
  br label %182

182:                                              ; preds = %181, %121
  br label %183

183:                                              ; preds = %182, %97
  br label %64, !llvm.loop !17

184:                                              ; preds = %71
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %185

185:                                              ; preds = %184, %78, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %186 = load ptr, ptr %5, align 8
  ret ptr %186

187:                                              ; preds = %156, %132, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr %16, align 8
  %190 = load i32, ptr %17, align 4
  %191 = insertvalue { ptr, i32 } poison, ptr %189, 0
  %192 = insertvalue { ptr, i32 } %191, i32 %190, 1
  resume { ptr, i32 } %192
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !10, i64 0}
!10 = !{!"_ZTSN5SimTK13TiXmlEncodingE", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 4, !13, i64 4, i64 4, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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::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::TiXmlAttribute" = type { %"class.SimTK::TiXmlBase", ptr, %"class.SimTK::String", %"class.SimTK::String", ptr, ptr }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef, ptr noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK16TiXmlDeclaration5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.SimTK::String", align 8
  %6 = alloca %"class.SimTK::String", align 8
  %7 = alloca %"class.SimTK::String", align 8
  %8 = alloca %"class.SimTK::TiXmlAttribute", align 8
  %9 = alloca %"class.SimTK::String", align 8
  %10 = alloca %"class.SimTK::TiXmlAttribute", align 8
  %11 = alloca %"class.SimTK::String", align 8
  %12 = alloca %"class.SimTK::TiXmlAttribute", align 8
  %13 = alloca %"class.SimTK::String", align 8
  %14 = tail call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %1, i32 noundef %3)
  %15 = tail call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %20, label %16

16:                                               ; preds = %4
  %17 = load i8, ptr %14, align 1, !tbaa !5
  %.not60 = icmp eq i8 %17, 0
  br i1 %.not60, label %20, label %18

18:                                               ; preds = %16
  %19 = tail call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %14, ptr noundef nonnull @.str.19, i1 noundef zeroext true, i32 noundef %3)
  br i1 %19, label %22, label %20

20:                                               ; preds = %18, %16, %4
  %.not61 = icmp eq ptr %15, null
  br i1 %.not61, label %.critedge, label %21

21:                                               ; preds = %20
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %15, i32 noundef 12, ptr noundef null, ptr noundef null, i32 noundef %3)
  br label %.critedge

22:                                               ; preds = %18
  %.not62 = icmp eq ptr %2, null
  br i1 %.not62, label %27, label %23

23:                                               ; preds = %22
  tail call void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20) %2, ptr noundef nonnull %14, i32 noundef %3)
  %24 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load i64, ptr %24, align 4
  store i64 %26, ptr %25, align 8
  br label %27

27:                                               ; preds = %23, %22
  %28 = getelementptr inbounds i8, ptr %14, i64 5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.11)
  %29 = getelementptr inbounds i8, ptr %0, i64 104
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(32) %5) #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 nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.11)
  %31 = getelementptr inbounds i8, ptr %0, i64 136
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.11)
  %33 = getelementptr inbounds i8, ptr %0, i64 168
  %34 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %35

35:                                               ; preds = %27, %.critedge2
  %.05289 = phi ptr [ %28, %27 ], [ %.254, %.critedge2 ]
  %36 = load i8, ptr %.05289, align 1, !tbaa !5
  switch i8 %36, label %39 [
    i8 0, label %.critedge
    i8 62, label %37
  ]

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %.05289, i64 1
  br label %.critedge

39:                                               ; preds = %35
  %40 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef nonnull %.05289, i32 noundef %3)
  %41 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %40, ptr noundef nonnull @.str.33, i1 noundef zeroext true, i32 noundef %3)
  br i1 %41, label %42, label %53

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %8) #4
  call void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %8)
  %43 = invoke noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %8, ptr noundef %40, ptr noundef %2, i32 noundef %3)
          to label %44 unwind label %48

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  %45 = call noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %8)
  invoke void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %45)
          to label %46 unwind label %50

46:                                               ; preds = %44
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %8) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #4
  br label %.critedge2

48:                                               ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %44
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %52

52:                                               ; preds = %50, %48
  %.pn71 = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %8) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #4
  br label %84

53:                                               ; preds = %39
  %54 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %40, ptr noundef nonnull @.str.34, i1 noundef zeroext true, i32 noundef %3)
  br i1 %54, label %55, label %66

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %10) #4
  call void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %10)
  %56 = invoke noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %10, ptr noundef %40, ptr noundef %2, i32 noundef %3)
          to label %57 unwind label %61

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  %58 = call noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %10)
  invoke void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %58)
          to label %59 unwind label %63

59:                                               ; preds = %57
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %10) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %10) #4
  br label %.critedge2

61:                                               ; preds = %55
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %57
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  br label %65

65:                                               ; preds = %63, %61
  %.pn69 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %10) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %10) #4
  br label %84

66:                                               ; preds = %53
  %67 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %40, ptr noundef nonnull @.str.35, i1 noundef zeroext true, i32 noundef %3)
  br i1 %67, label %68, label %.preheader

.preheader:                                       ; preds = %66
  %.not6581 = icmp eq ptr %40, null
  br i1 %.not6581, label %.critedge, label %.lr.ph

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %12) #4
  call void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %12)
  %69 = invoke noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %12, ptr noundef %40, ptr noundef %2, i32 noundef %3)
          to label %70 unwind label %74

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  %71 = call noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %12)
  invoke void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %71)
          to label %72 unwind label %76

72:                                               ; preds = %70
  %73 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %12) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %12) #4
  br label %.critedge2

74:                                               ; preds = %68
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %70
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  br label %78

78:                                               ; preds = %76, %74
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZN5SimTK14TiXmlAttributeD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %12) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %12) #4
  br label %84

.lr.ph:                                           ; preds = %.preheader, %82
  %.15382 = phi ptr [ %83, %82 ], [ %40, %.preheader ]
  %79 = load i8, ptr %.15382, align 1, !tbaa !5
  switch i8 %79, label %80 [
    i8 0, label %.critedge2
    i8 62, label %.critedge2
  ]

80:                                               ; preds = %.lr.ph
  %81 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext %79)
  br i1 %81, label %.critedge2, label %82

82:                                               ; preds = %80
  %83 = getelementptr inbounds i8, ptr %.15382, i64 1
  br label %.lr.ph, !llvm.loop !8

.critedge2:                                       ; preds = %80, %.lr.ph, %.lr.ph, %59, %72, %46
  %.254 = phi ptr [ %43, %46 ], [ %56, %59 ], [ %69, %72 ], [ %.15382, %.lr.ph ], [ %.15382, %.lr.ph ], [ %.15382, %80 ]
  %.not63 = icmp eq ptr %.254, null
  br i1 %.not63, label %.critedge, label %35, !llvm.loop !10

.critedge:                                        ; preds = %.preheader, %.critedge2, %35, %20, %21, %37
  %.051 = phi ptr [ %38, %37 ], [ null, %21 ], [ null, %20 ], [ null, %35 ], [ null, %.critedge2 ], [ null, %.preheader ]
  ret ptr %.051

84:                                               ; preds = %78, %65, %52
  %.pn71.pn = phi { ptr, i32 } [ %.pn71, %52 ], [ %.pn69, %65 ], [ %.pn, %78 ]
  resume { ptr, i32 } %.pn71.pn
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass