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

@.str.26 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 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: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef, ptr noundef, i32 noundef) #2 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: 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 i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 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) #3

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK12TiXmlElement5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(216) %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 ptr, align 8
  %13 = alloca %"class.SimTK::String", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, 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
  %18 = load ptr, ptr %6, align 8
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %19, i32 noundef %20)
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %22 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  store ptr %22, ptr %10, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %29

25:                                               ; preds = %4
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = icmp ne i8 %27, 0
  br i1 %28, label %36, label %29

29:                                               ; preds = %25, %4
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %35

32:                                               ; preds = %29
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %33, i32 noundef 4, ptr noundef null, ptr noundef null, i32 noundef %34)
  br label %35

35:                                               ; preds = %32, %29
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %306

36:                                               ; preds = %25
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %46

39:                                               ; preds = %36
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20) %40, ptr noundef %41, i32 noundef %42)
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %43)
  %45 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %18, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 4 %44, i64 8, i1 false), !tbaa.struct !12
  br label %46

46:                                               ; preds = %39, %36
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp ne i32 %49, 60
  br i1 %50, label %51, label %60

51:                                               ; preds = %46
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %59

54:                                               ; preds = %51
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %55, i32 noundef 4, ptr noundef %56, ptr noundef %57, i32 noundef %58)
  br label %59

59:                                               ; preds = %54, %51
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %306

60:                                               ; preds = %46
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 1
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %62, i32 noundef %63)
  store ptr %64, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %65, ptr %12, align 8, !tbaa !5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %18, i32 0, i32 5
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = call noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef %66, ptr noundef %67, i32 noundef %68)
  store ptr %69, ptr %7, align 8, !tbaa !5
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %76

72:                                               ; preds = %60
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = load i8, ptr %73, align 1, !tbaa !11
  %75 = icmp ne i8 %74, 0
  br i1 %75, label %85, label %76

76:                                               ; preds = %72, %60
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %84

79:                                               ; preds = %76
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %80, i32 noundef 5, ptr noundef %81, ptr noundef %82, i32 noundef %83)
  br label %84

84:                                               ; preds = %79, %76
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %305

85:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.26)
  %86 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %18, i32 0, i32 5
  %87 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %86)
          to label %88 unwind label %121

88:                                               ; preds = %85
  %89 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.27)
          to label %90 unwind label %121

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %300, %90
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %98

94:                                               ; preds = %91
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = icmp ne i8 %96, 0
  br label %98

98:                                               ; preds = %94, %91
  %99 = phi i1 [ false, %91 ], [ %97, %94 ]
  br i1 %99, label %100, label %301

100:                                              ; preds = %98
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %101, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = invoke noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %102, i32 noundef %103)
          to label %105 unwind label %121

105:                                              ; preds = %100
  store ptr %104, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %112

108:                                              ; preds = %105
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load i8, ptr %109, align 1, !tbaa !11
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %126, label %112

112:                                              ; preds = %108, %105
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %125

115:                                              ; preds = %112
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %116, i32 noundef 7, ptr noundef %117, ptr noundef %118, i32 noundef %119)
          to label %120 unwind label %121

120:                                              ; preds = %115
  br label %125

121:                                              ; preds = %196, %186, %180, %173, %156, %141, %115, %100, %88, %85
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %14, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %15, align 4
  br label %304

125:                                              ; preds = %120, %112
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

126:                                              ; preds = %108
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = load i8, ptr %127, align 1, !tbaa !11
  %129 = sext i8 %128 to i32
  %130 = icmp eq i32 %129, 47
  br i1 %130, label %131, label %151

131:                                              ; preds = %126
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i32 1
  store ptr %133, ptr %7, align 8, !tbaa !5
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load i8, ptr %134, align 1, !tbaa !11
  %136 = sext i8 %135 to i32
  %137 = icmp ne i32 %136, 62
  br i1 %137, label %138, label %148

138:                                              ; preds = %131
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %147

141:                                              ; preds = %138
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %142, i32 noundef 8, ptr noundef %143, ptr noundef %144, i32 noundef %145)
          to label %146 unwind label %121

146:                                              ; preds = %141
  br label %147

147:                                              ; preds = %146, %138
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

148:                                              ; preds = %131
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds i8, ptr %149, i64 1
  store ptr %150, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

151:                                              ; preds = %126
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load i8, ptr %152, align 1, !tbaa !11
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 %154, 62
  br i1 %155, label %156, label %203

156:                                              ; preds = %151
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = getelementptr inbounds i8, ptr %157, i32 1
  store ptr %158, ptr %7, align 8, !tbaa !5
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = invoke noundef ptr @_ZN5SimTK12TiXmlElement9ReadValueEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(216) %18, ptr noundef %159, ptr noundef %160, i32 noundef %161)
          to label %163 unwind label %121

163:                                              ; preds = %156
  store ptr %162, ptr %7, align 8, !tbaa !5
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %170

166:                                              ; preds = %163
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load i8, ptr %167, align 1, !tbaa !11
  %169 = icmp ne i8 %168, 0
  br i1 %169, label %180, label %170

170:                                              ; preds = %166, %163
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = icmp ne ptr %171, null
  br i1 %172, label %173, label %179

173:                                              ; preds = %170
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %174, i32 noundef 9, ptr noundef %175, ptr noundef %176, i32 noundef %177)
          to label %178 unwind label %121

178:                                              ; preds = %173
  br label %179

179:                                              ; preds = %178, %170
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

180:                                              ; preds = %166
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  %183 = load i32, ptr %9, align 4, !tbaa !9
  %184 = invoke noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %181, ptr noundef %182, i1 noundef zeroext false, i32 noundef %183)
          to label %185 unwind label %121

185:                                              ; preds = %180
  br i1 %184, label %186, label %193

186:                                              ; preds = %185
  %187 = invoke noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %188 unwind label %121

188:                                              ; preds = %186
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = sext i32 %187 to i64
  %191 = getelementptr inbounds i8, ptr %189, i64 %190
  store ptr %191, ptr %7, align 8, !tbaa !5
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %192, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

193:                                              ; preds = %185
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %202

196:                                              ; preds = %193
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %197, i32 noundef 9, ptr noundef %198, ptr noundef %199, i32 noundef %200)
          to label %201 unwind label %121

201:                                              ; preds = %196
  br label %202

202:                                              ; preds = %201, %193
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

203:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %204 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 112) #8
          to label %205 unwind label %218

205:                                              ; preds = %203
  invoke void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %204)
          to label %206 unwind label %222

206:                                              ; preds = %205
  store ptr %204, ptr %16, align 8, !tbaa !5
  %207 = load ptr, ptr %16, align 8, !tbaa !5
  %208 = icmp ne ptr %207, null
  br i1 %208, label %227, label %209

209:                                              ; preds = %206
  %210 = load ptr, ptr %10, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %226

212:                                              ; preds = %209
  %213 = load ptr, ptr %10, align 8, !tbaa !5
  %214 = load ptr, ptr %12, align 8, !tbaa !5
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %213, i32 noundef 3, ptr noundef %214, ptr noundef %215, i32 noundef %216)
          to label %217 unwind label %218

217:                                              ; preds = %212
  br label %226

218:                                              ; preds = %250, %230, %227, %212, %203
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %14, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %15, align 4
  br label %298

222:                                              ; preds = %205
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %14, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %204, i64 noundef 112) #9
  br label %298

226:                                              ; preds = %217, %209
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %295

227:                                              ; preds = %206
  %228 = load ptr, ptr %16, align 8, !tbaa !5
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN5SimTK14TiXmlAttribute11SetDocumentEPNS_13TiXmlDocumentE(ptr noundef nonnull align 8 dereferenceable(112) %228, ptr noundef %229)
          to label %230 unwind label %218

230:                                              ; preds = %227
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %231, ptr %12, align 8, !tbaa !5
  %232 = load ptr, ptr %16, align 8, !tbaa !5
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  %234 = load ptr, ptr %8, align 8, !tbaa !5
  %235 = load i32, ptr %9, align 4, !tbaa !9
  %236 = load ptr, ptr %232, align 8, !tbaa !15
  %237 = getelementptr inbounds ptr, ptr %236, i64 3
  %238 = load ptr, ptr %237, align 8
  %239 = invoke noundef ptr %238(ptr noundef nonnull align 8 dereferenceable(112) %232, ptr noundef %233, ptr noundef %234, i32 noundef %235)
          to label %240 unwind label %218

240:                                              ; preds = %230
  store ptr %239, ptr %7, align 8, !tbaa !5
  %241 = load ptr, ptr %7, align 8, !tbaa !5
  %242 = icmp ne ptr %241, null
  br i1 %242, label %243, label %247

243:                                              ; preds = %240
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = load i8, ptr %244, align 1, !tbaa !11
  %246 = icmp ne i8 %245, 0
  br i1 %246, label %264, label %247

247:                                              ; preds = %243, %240
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = icmp ne ptr %248, null
  br i1 %249, label %250, label %256

250:                                              ; preds = %247
  %251 = load ptr, ptr %10, align 8, !tbaa !5
  %252 = load ptr, ptr %12, align 8, !tbaa !5
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %251, i32 noundef 4, ptr noundef %252, ptr noundef %253, i32 noundef %254)
          to label %255 unwind label %218

255:                                              ; preds = %250
  br label %256

256:                                              ; preds = %255, %247
  %257 = load ptr, ptr %16, align 8, !tbaa !5
  %258 = icmp eq ptr %257, null
  br i1 %258, label %263, label %259

259:                                              ; preds = %256
  %260 = load ptr, ptr %257, align 8, !tbaa !15
  %261 = getelementptr inbounds ptr, ptr %260, i64 1
  %262 = load ptr, ptr %261, align 8
  call void %262(ptr noundef nonnull align 8 dereferenceable(112) %257) #7
  br label %263

263:                                              ; preds = %259, %256
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %295

264:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %265 = getelementptr inbounds %"class.SimTK::TiXmlElement", ptr %18, i32 0, i32 1
  %266 = load ptr, ptr %16, align 8, !tbaa !5
  %267 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5SimTK14TiXmlAttribute7NameStrEv(ptr noundef nonnull align 8 dereferenceable(112) %266)
          to label %268 unwind label %286

268:                                              ; preds = %264
  %269 = invoke noundef ptr @_ZN5SimTK17TiXmlAttributeSet4FindERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(112) %265, ptr noundef nonnull align 8 dereferenceable(32) %267)
          to label %270 unwind label %286

270:                                              ; preds = %268
  store ptr %269, ptr %17, align 8, !tbaa !5
  %271 = load ptr, ptr %17, align 8, !tbaa !5
  %272 = icmp ne ptr %271, null
  br i1 %272, label %273, label %290

273:                                              ; preds = %270
  %274 = load ptr, ptr %17, align 8, !tbaa !5
  %275 = load ptr, ptr %16, align 8, !tbaa !5
  %276 = invoke noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %275)
          to label %277 unwind label %286

277:                                              ; preds = %273
  invoke void @_ZN5SimTK14TiXmlAttribute8SetValueEPKc(ptr noundef nonnull align 8 dereferenceable(112) %274, ptr noundef %276)
          to label %278 unwind label %286

278:                                              ; preds = %277
  %279 = load ptr, ptr %16, align 8, !tbaa !5
  %280 = icmp eq ptr %279, null
  br i1 %280, label %285, label %281

281:                                              ; preds = %278
  %282 = load ptr, ptr %279, align 8, !tbaa !15
  %283 = getelementptr inbounds ptr, ptr %282, i64 1
  %284 = load ptr, ptr %283, align 8
  call void %284(ptr noundef nonnull align 8 dereferenceable(112) %279) #7
  br label %285

285:                                              ; preds = %281, %278
  br label %294

286:                                              ; preds = %290, %277, %273, %268, %264
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %14, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %298

290:                                              ; preds = %270
  %291 = getelementptr inbounds %"class.SimTK::TiXmlElement", ptr %18, i32 0, i32 1
  %292 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN5SimTK17TiXmlAttributeSet3AddEPNS_14TiXmlAttributeE(ptr noundef nonnull align 8 dereferenceable(112) %291, ptr noundef %292)
          to label %293 unwind label %286

293:                                              ; preds = %290
  br label %294

294:                                              ; preds = %293, %285
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  store i32 0, ptr %11, align 4
  br label %295

295:                                              ; preds = %294, %263, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %296 = load i32, ptr %11, align 4
  switch i32 %296, label %303 [
    i32 0, label %297
  ]

297:                                              ; preds = %295
  br label %299

298:                                              ; preds = %286, %222, %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %304

299:                                              ; preds = %297
  br label %300

300:                                              ; preds = %299
  br label %91, !llvm.loop !17

301:                                              ; preds = %98
  %302 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %302, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %303

303:                                              ; preds = %301, %295, %202, %188, %179, %148, %147, %125
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %305

304:                                              ; preds = %298, %121
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %308

305:                                              ; preds = %303, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %306

306:                                              ; preds = %305, %59, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %307 = load ptr, ptr %5, align 8
  ret ptr %307

308:                                              ; preds = %304
  %309 = load ptr, ptr %14, align 8
  %310 = load i32, ptr %15, align 4
  %311 = insertvalue { ptr, i32 } poison, ptr %309, 0
  %312 = insertvalue { ptr, i32 } %311, i32 %310, 1
  resume { ptr, i32 } %312
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK12TiXmlElement9ReadValueEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(216), ptr noundef, ptr noundef, i32 noundef) #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 void @_ZN5SimTK14TiXmlAttribute11SetDocumentEPNS_13TiXmlDocumentE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) #1 align 2

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

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

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

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

declare void @_ZN5SimTK17TiXmlAttributeSet3AddEPNS_14TiXmlAttributeE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) #6

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!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 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; 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] }

@.str.26 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 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: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2 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: 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 i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 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

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

declare i32 @__gxx_personality_v0(...)

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

; 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
define dso_local noundef ptr @_ZN5SimTK12TiXmlElement5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(216) %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 = tail call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %1, i32 noundef %3)
  %7 = tail call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %10, label %8

8:                                                ; preds = %4
  %9 = load i8, ptr %6, align 1, !tbaa !5
  %.not125 = icmp eq i8 %9, 0
  br i1 %.not125, label %10, label %12

10:                                               ; preds = %8, %4
  %.not126 = icmp eq ptr %7, null
  br i1 %.not126, label %101, label %11

11:                                               ; preds = %10
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %7, i32 noundef 4, ptr noundef null, ptr noundef null, i32 noundef %3)
  br label %101

12:                                               ; preds = %8
  %.not127 = icmp eq ptr %2, null
  br i1 %.not127, label %17, label %13

13:                                               ; preds = %12
  tail call void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20) %2, ptr noundef nonnull %6, i32 noundef %3)
  %14 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i64, ptr %14, align 4
  store i64 %16, ptr %15, align 8
  %.pr = load i8, ptr %6, align 1, !tbaa !5
  br label %17

17:                                               ; preds = %13, %12
  %18 = phi i8 [ %.pr, %13 ], [ %9, %12 ]
  %.not128 = icmp eq i8 %18, 60
  br i1 %.not128, label %21, label %19

19:                                               ; preds = %17
  %.not150 = icmp eq ptr %7, null
  br i1 %.not150, label %101, label %20

20:                                               ; preds = %19
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %7, i32 noundef 4, ptr noundef nonnull %6, ptr noundef %2, i32 noundef %3)
  br label %101

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %6, i64 1
  %23 = tail call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef nonnull %22, i32 noundef %3)
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  %25 = tail call noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef %23, ptr noundef nonnull %24, i32 noundef %3)
  %.not129 = icmp eq ptr %25, null
  br i1 %.not129, label %28, label %26

26:                                               ; preds = %21
  %27 = load i8, ptr %25, align 1, !tbaa !5
  %.not130 = icmp eq i8 %27, 0
  br i1 %.not130, label %28, label %30

28:                                               ; preds = %26, %21
  %.not131 = icmp eq ptr %7, null
  br i1 %.not131, label %101, label %29

29:                                               ; preds = %28
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %7, i32 noundef 5, ptr noundef %23, ptr noundef %2, i32 noundef %3)
  br label %101

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.26)
  %31 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %32 unwind label %.loopexit.split-lp

32:                                               ; preds = %30
  %33 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.27)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %32
  %34 = load i8, ptr %25, align 1, !tbaa !5
  %.not133175 = icmp eq i8 %34, 0
  br i1 %.not133175, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %35 = getelementptr inbounds i8, ptr %0, i64 104
  br label %36

36:                                               ; preds = %.lr.ph, %98
  %.0104176 = phi ptr [ %25, %.lr.ph ], [ %76, %98 ]
  %37 = invoke noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef nonnull %.0104176, i32 noundef %3)
          to label %38 unwind label %.loopexit

38:                                               ; preds = %36
  %.not134 = icmp eq ptr %37, null
  br i1 %.not134, label %41, label %39

39:                                               ; preds = %38
  %40 = load i8, ptr %37, align 1, !tbaa !5
  switch i8 %40, label %67 [
    i8 0, label %41
    i8 47, label %44
    i8 62, label %50
  ]

41:                                               ; preds = %39, %38
  %.not136 = icmp eq ptr %7, null
  br i1 %.not136, label %.critedge, label %.invoke

.invoke:                                          ; preds = %41, %66, %47
  %42 = phi i32 [ 8, %47 ], [ 9, %66 ], [ 7, %41 ]
  %43 = phi ptr [ %45, %47 ], [ %52, %66 ], [ %.0104176, %41 ]
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %7, i32 noundef %42, ptr noundef nonnull %43, ptr noundef %2, i32 noundef %3)
          to label %.critedge unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %36
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %100

.loopexit.split-lp:                               ; preds = %.invoke, %30, %32, %50, %57, %58
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %100

44:                                               ; preds = %39
  %45 = getelementptr inbounds i8, ptr %37, i64 1
  %46 = load i8, ptr %45, align 1, !tbaa !5
  %.not146 = icmp eq i8 %46, 62
  br i1 %.not146, label %48, label %47

47:                                               ; preds = %44
  %.not147 = icmp eq ptr %7, null
  br i1 %.not147, label %.critedge, label %.invoke

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %37, i64 2
  br label %.critedge

50:                                               ; preds = %39
  %51 = getelementptr inbounds i8, ptr %37, i64 1
  %52 = invoke noundef ptr @_ZN5SimTK12TiXmlElement9ReadValueEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull %51, ptr noundef %2, i32 noundef %3)
          to label %53 unwind label %.loopexit.split-lp

53:                                               ; preds = %50
  %.not142 = icmp eq ptr %52, null
  br i1 %.not142, label %56, label %54

54:                                               ; preds = %53
  %55 = load i8, ptr %52, align 1, !tbaa !5
  %.not143 = icmp eq i8 %55, 0
  br i1 %.not143, label %56, label %58

56:                                               ; preds = %54, %53
  %.not144 = icmp eq ptr %7, null
  br i1 %.not144, label %.critedge, label %57

57:                                               ; preds = %56
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %7, i32 noundef 9, ptr noundef %52, ptr noundef %2, i32 noundef %3)
          to label %.critedge unwind label %.loopexit.split-lp

58:                                               ; preds = %54
  %59 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %60 = invoke noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %52, ptr noundef %59, i1 noundef zeroext false, i32 noundef %3)
          to label %61 unwind label %.loopexit.split-lp

61:                                               ; preds = %58
  br i1 %60, label %62, label %66

62:                                               ; preds = %61
  %63 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %52, i64 %64
  br label %.critedge

66:                                               ; preds = %61
  %.not145 = icmp eq ptr %7, null
  br i1 %.not145, label %.critedge, label %.invoke

67:                                               ; preds = %39
  %68 = invoke noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #7
          to label %69 unwind label %.loopexit153

69:                                               ; preds = %67
  invoke void @_ZN5SimTK14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %68)
          to label %72 unwind label %70

.loopexit153:                                     ; preds = %67, %72
  %lpad.loopexit155 = landingpad { ptr, i32 }
          cleanup
  br label %100

.loopexit.split-lp154:                            ; preds = %81
  %lpad.loopexit.split-lp156 = landingpad { ptr, i32 }
          cleanup
  br label %100

70:                                               ; preds = %69
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %68, i64 noundef 112) #8
  br label %100

72:                                               ; preds = %69
  call void @_ZN5SimTK14TiXmlAttribute11SetDocumentEPNS_13TiXmlDocumentE(ptr noundef nonnull align 8 dereferenceable(112) %68, ptr noundef %7)
  %73 = load ptr, ptr %68, align 8, !tbaa !8
  %74 = getelementptr inbounds i8, ptr %73, i64 24
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef ptr %75(ptr noundef nonnull align 8 dereferenceable(112) %68, ptr noundef nonnull %37, ptr noundef %2, i32 noundef %3)
          to label %77 unwind label %.loopexit153

77:                                               ; preds = %72
  %.not137 = icmp eq ptr %76, null
  br i1 %.not137, label %80, label %78

78:                                               ; preds = %77
  %79 = load i8, ptr %76, align 1, !tbaa !5
  %.not138 = icmp eq i8 %79, 0
  br i1 %.not138, label %80, label %85

80:                                               ; preds = %78, %77
  %.not139 = icmp eq ptr %7, null
  br i1 %.not139, label %.critedge152, label %81

81:                                               ; preds = %80
  invoke void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %7, i32 noundef 4, ptr noundef nonnull %37, ptr noundef %2, i32 noundef %3)
          to label %.critedge152 unwind label %.loopexit.split-lp154

.critedge152:                                     ; preds = %80, %81
  %82 = load ptr, ptr %68, align 8, !tbaa !8
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load ptr, ptr %83, align 8
  call void %84(ptr noundef nonnull align 8 dereferenceable(112) %68) #6
  br label %.critedge

85:                                               ; preds = %78
  %86 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK5SimTK14TiXmlAttribute7NameStrEv(ptr noundef nonnull align 8 dereferenceable(112) %68)
  %87 = invoke noundef ptr @_ZN5SimTK17TiXmlAttributeSet4FindERKNS_6StringE(ptr noundef nonnull align 8 dereferenceable(112) %35, ptr noundef nonnull align 8 dereferenceable(32) %86)
          to label %88 unwind label %95

88:                                               ; preds = %85
  %.not140 = icmp eq ptr %87, null
  br i1 %.not140, label %97, label %89

89:                                               ; preds = %88
  %90 = call noundef ptr @_ZNK5SimTK14TiXmlAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(112) %68)
  invoke void @_ZN5SimTK14TiXmlAttribute8SetValueEPKc(ptr noundef nonnull align 8 dereferenceable(112) %87, ptr noundef %90)
          to label %91 unwind label %95

91:                                               ; preds = %89
  %92 = load ptr, ptr %68, align 8, !tbaa !8
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load ptr, ptr %93, align 8
  call void %94(ptr noundef nonnull align 8 dereferenceable(112) %68) #6
  br label %98

95:                                               ; preds = %97, %89, %85
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %100

97:                                               ; preds = %88
  invoke void @_ZN5SimTK17TiXmlAttributeSet3AddEPNS_14TiXmlAttributeE(ptr noundef nonnull align 8 dereferenceable(112) %35, ptr noundef nonnull %68)
          to label %98 unwind label %95

98:                                               ; preds = %91, %97
  %99 = load i8, ptr %76, align 1, !tbaa !5
  %.not133 = icmp eq i8 %99, 0
  br i1 %.not133, label %.critedge, label %36, !llvm.loop !10

.critedge:                                        ; preds = %98, %.invoke, %.preheader, %.critedge152, %66, %56, %57, %47, %41, %62, %48
  %.2 = phi ptr [ %49, %48 ], [ %65, %62 ], [ null, %41 ], [ null, %47 ], [ null, %57 ], [ null, %56 ], [ null, %66 ], [ null, %.critedge152 ], [ %25, %.preheader ], [ null, %.invoke ], [ %76, %98 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %101

100:                                              ; preds = %.loopexit153, %.loopexit.split-lp154, %.loopexit, %.loopexit.split-lp, %70, %95
  %.pn148 = phi { ptr, i32 } [ %96, %95 ], [ %71, %70 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit155, %.loopexit153 ], [ %lpad.loopexit.split-lp156, %.loopexit.split-lp154 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn148

101:                                              ; preds = %.critedge, %29, %28, %19, %20, %10, %11
  %.4 = phi ptr [ null, %11 ], [ null, %10 ], [ null, %20 ], [ null, %19 ], [ %.2, %.critedge ], [ null, %29 ], [ null, %28 ]
  ret ptr %.4
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK12TiXmlElement9ReadValueEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(216), ptr noundef, ptr noundef, i32 noundef) 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 void @_ZN5SimTK14TiXmlAttribute11SetDocumentEPNS_13TiXmlDocumentE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK14TiXmlAttribute8SetValueEPKc(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) local_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

declare void @_ZN5SimTK17TiXmlAttributeSet3AddEPNS_14TiXmlAttributeE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) local_unnamed_addr #5

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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"vtable pointer", !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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