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

; 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::TiXmlText" = type <{ %"class.SimTK::TiXmlNode", i8, [7 x i8] }>
%"class.SimTK::TiXmlNode" = type { %"class.SimTK::TiXmlBase", ptr, i32, ptr, ptr, %"class.SimTK::String", ptr, ptr }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }
%"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.6 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE = external hidden unnamed_addr constant [69 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [9 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

declare noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEi(i32 noundef) #4 align 2

declare noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #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)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

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
define dso_local void @_ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.SimTK::TiXmlText", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8
  br label %25

25:                                               ; preds = %55, %3
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %26, i64 %29
  %31 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %30)
  br i1 %31, label %32, label %56

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %33)
  store i32 %34, ptr %7, align 4, !tbaa !11
  %35 = load i32, ptr %7, align 4, !tbaa !11
  %36 = icmp sle i32 %35, 0
  br i1 %36, label %37, label %44

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %38 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %24)
  store ptr %38, ptr %8, align 8, !tbaa !5
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %42, i32 noundef 14, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %43

43:                                               ; preds = %41, %37
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %53

44:                                               ; preds = %32
  %45 = load i32, ptr %7, align 4, !tbaa !11
  %46 = trunc i32 %45 to i8
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %47, i8 noundef signext %46)
  %49 = load i32, ptr %7, align 4, !tbaa !11
  %50 = icmp eq i32 %49, 62
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  store i32 3, ptr %9, align 4
  br label %53

52:                                               ; preds = %44
  store i32 0, ptr %9, align 4
  br label %53

53:                                               ; preds = %52, %51, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  %54 = load i32, ptr %9, align 4
  switch i32 %54, label %286 [
    i32 0, label %55
    i32 1, label %280
    i32 3, label %56
  ]

55:                                               ; preds = %53
  br label %25, !llvm.loop !13

56:                                               ; preds = %53, %25
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %57)
  %59 = icmp slt i32 %58, 3
  br i1 %59, label %60, label %61

60:                                               ; preds = %56
  br label %280

61:                                               ; preds = %56
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %63)
  %65 = sub nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %62, i64 noundef %66)
  %68 = load i8, ptr %67, align 1, !tbaa !15
  %69 = sext i8 %68 to i32
  %70 = icmp eq i32 %69, 62
  br i1 %70, label %71, label %82

71:                                               ; preds = %61
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %73)
  %75 = sub nsw i32 %74, 2
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %72, i64 noundef %76)
  %78 = load i8, ptr %77, align 1, !tbaa !15
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %79, 47
  br i1 %80, label %81, label %82

81:                                               ; preds = %71
  br label %280

82:                                               ; preds = %71, %61
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %84)
  %86 = sub nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %83, i64 noundef %87)
  %89 = load i8, ptr %88, align 1, !tbaa !15
  %90 = sext i8 %89 to i32
  %91 = icmp eq i32 %90, 62
  br i1 %91, label %92, label %279

92:                                               ; preds = %82
  br label %93

93:                                               ; preds = %278, %110, %92
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase16StreamWhiteSpaceEPSiPNS_6StringE(ptr noundef %94, ptr noundef %95)
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr i8, ptr %98, i64 -24
  %100 = load i64, ptr %99, align 8
  %101 = getelementptr inbounds i8, ptr %97, i64 %100
  %102 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %101)
  br i1 %102, label %103, label %115

103:                                              ; preds = %93
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %104)
  %106 = icmp ne i32 %105, 60
  br i1 %106, label %107, label %115

107:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 112, ptr %10) #8
  call void @_ZN5SimTK9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(105) %10, ptr noundef @.str.11)
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN5SimTK9TiXmlText8StreamInEPSiPNS_6StringE(ptr noundef nonnull align 8 dereferenceable(105) %10, ptr noundef %108, ptr noundef %109)
          to label %110 unwind label %111

110:                                              ; preds = %107
  store i32 5, ptr %9, align 4
  call void @_ZN5SimTK9TiXmlNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(105) %10) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr %10) #8
  br label %93

111:                                              ; preds = %107
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  call void @_ZN5SimTK9TiXmlNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(105) %10) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr %10) #8
  br label %281

115:                                              ; preds = %103, %93
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = getelementptr i8, ptr %117, i64 -24
  %119 = load i64, ptr %118, align 8
  %120 = getelementptr inbounds i8, ptr %116, i64 %119
  %121 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %120)
  br i1 %121, label %123, label %122

122:                                              ; preds = %115
  br label %280

123:                                              ; preds = %115
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %124)
  %126 = icmp eq i32 %125, 60
  br i1 %126, label %127, label %128

127:                                              ; preds = %123
  br label %130

128:                                              ; preds = %123
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.6, i32 noundef 1024, ptr noundef @__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE) #9
  unreachable

129:                                              ; No predecessors!
  br label %130

130:                                              ; preds = %129, %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %131)
  store i32 %132, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  store i8 0, ptr %14, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  store i8 0, ptr %15, align 1, !tbaa !16
  br label %133

133:                                              ; preds = %211, %130
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  %136 = getelementptr i8, ptr %135, i64 -24
  %137 = load i64, ptr %136, align 8
  %138 = getelementptr inbounds i8, ptr %134, i64 %137
  %139 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %138)
  br i1 %139, label %141, label %140

140:                                              ; preds = %133
  store i32 1, ptr %9, align 4
  br label %276

141:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %142)
  store i32 %143, ptr %16, align 4, !tbaa !11
  %144 = load i32, ptr %16, align 4, !tbaa !11
  %145 = icmp sle i32 %144, 0
  br i1 %145, label %146, label %153

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %147 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %24)
  store ptr %147, ptr %17, align 8, !tbaa !5
  %148 = load ptr, ptr %17, align 8, !tbaa !5
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %152

150:                                              ; preds = %146
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %151, i32 noundef 14, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %152

152:                                              ; preds = %150, %146
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %209

153:                                              ; preds = %141
  %154 = load i32, ptr %16, align 4, !tbaa !11
  %155 = icmp eq i32 %154, 62
  br i1 %155, label %156, label %157

156:                                              ; preds = %153
  store i32 6, ptr %9, align 4
  br label %209

157:                                              ; preds = %153
  %158 = load i32, ptr %16, align 4, !tbaa !11
  %159 = trunc i32 %158 to i8
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %160, i8 noundef signext %159)
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = call noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %162)
  %164 = load i32, ptr %16, align 4, !tbaa !11
  %165 = icmp eq i32 %164, 91
  br i1 %165, label %166, label %194

166:                                              ; preds = %157
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = call noundef i32 @_ZNK5SimTK6String4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %167)
  %169 = icmp sge i32 %168, 9
  br i1 %169, label %170, label %194

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = call noundef i32 @_ZNK5SimTK6String4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %171)
  %173 = sext i32 %172 to i64
  store i64 %173, ptr %18, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %174) #8
  %176 = load i64, ptr %18, align 8, !tbaa !18
  %177 = getelementptr inbounds i8, ptr %175, i64 %176
  %178 = getelementptr inbounds i8, ptr %177, i64 -9
  store ptr %178, ptr %19, align 8, !tbaa !5
  %179 = load ptr, ptr %19, align 8, !tbaa !5
  %180 = call i32 @strcmp(ptr noundef %179, ptr noundef @.str.22) #10
  %181 = icmp eq i32 %180, 0
  br i1 %181, label %182, label %190

182:                                              ; preds = %170
  %183 = load i8, ptr %14, align 1, !tbaa !16, !range !20, !noundef !21
  %184 = trunc i8 %183 to i1
  %185 = xor i1 %184, true
  br i1 %185, label %186, label %187

186:                                              ; preds = %182
  br label %189

187:                                              ; preds = %182
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.6, i32 noundef 1056, ptr noundef @__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE) #9
  unreachable

188:                                              ; No predecessors!
  br label %189

189:                                              ; preds = %188, %186
  store i32 6, ptr %9, align 4
  br label %191

190:                                              ; preds = %170
  store i32 0, ptr %9, align 4
  br label %191

191:                                              ; preds = %190, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %192 = load i32, ptr %9, align 4
  switch i32 %192, label %209 [
    i32 0, label %193
  ]

193:                                              ; preds = %191
  br label %194

194:                                              ; preds = %193, %166, %157
  %195 = load i8, ptr %15, align 1, !tbaa !16, !range !20, !noundef !21
  %196 = trunc i8 %195 to i1
  br i1 %196, label %208, label %197

197:                                              ; preds = %194
  %198 = load i32, ptr %16, align 4, !tbaa !11
  %199 = icmp ne i32 %198, 60
  br i1 %199, label %200, label %208

200:                                              ; preds = %197
  %201 = load i32, ptr %16, align 4, !tbaa !11
  %202 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEi(i32 noundef %201)
  br i1 %202, label %208, label %203

203:                                              ; preds = %200
  store i8 1, ptr %15, align 1, !tbaa !16
  %204 = load i32, ptr %16, align 4, !tbaa !11
  %205 = icmp eq i32 %204, 47
  br i1 %205, label %206, label %207

206:                                              ; preds = %203
  store i8 1, ptr %14, align 1, !tbaa !16
  br label %207

207:                                              ; preds = %206, %203
  br label %208

208:                                              ; preds = %207, %200, %197, %194
  store i32 0, ptr %9, align 4
  br label %209

209:                                              ; preds = %208, %191, %156, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  %210 = load i32, ptr %9, align 4
  switch i32 %210, label %276 [
    i32 0, label %211
    i32 6, label %212
  ]

211:                                              ; preds = %209
  br label %133, !llvm.loop !22

212:                                              ; preds = %209
  %213 = load i8, ptr %14, align 1, !tbaa !16, !range !20, !noundef !21
  %214 = trunc i8 %213 to i1
  br i1 %214, label %215, label %247

215:                                              ; preds = %212
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = load ptr, ptr %216, align 8, !tbaa !9
  %218 = getelementptr i8, ptr %217, i64 -24
  %219 = load i64, ptr %218, align 8
  %220 = getelementptr inbounds i8, ptr %216, i64 %219
  %221 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %220)
  br i1 %221, label %223, label %222

222:                                              ; preds = %215
  store i32 1, ptr %9, align 4
  br label %276

223:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = call noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %224)
  store i32 %225, ptr %20, align 4, !tbaa !11
  %226 = load i32, ptr %20, align 4, !tbaa !11
  %227 = icmp sle i32 %226, 0
  br i1 %227, label %228, label %235

228:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %229 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %24)
  store ptr %229, ptr %21, align 8, !tbaa !5
  %230 = load ptr, ptr %21, align 8, !tbaa !5
  %231 = icmp ne ptr %230, null
  br i1 %231, label %232, label %234

232:                                              ; preds = %228
  %233 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %233, i32 noundef 14, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %234

234:                                              ; preds = %232, %228
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %246

235:                                              ; preds = %223
  %236 = load i32, ptr %20, align 4, !tbaa !11
  %237 = icmp eq i32 %236, 62
  br i1 %237, label %238, label %239

238:                                              ; preds = %235
  br label %241

239:                                              ; preds = %235
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.6, i32 noundef 1083, ptr noundef @__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE) #9
  unreachable

240:                                              ; No predecessors!
  br label %241

241:                                              ; preds = %240, %238
  %242 = load i32, ptr %20, align 4, !tbaa !11
  %243 = trunc i32 %242 to i8
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %244, i8 noundef signext %243)
  store i32 1, ptr %9, align 4
  br label %246

246:                                              ; preds = %241, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %276

247:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %248) #8
  %250 = load i32, ptr %13, align 4, !tbaa !11
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds i8, ptr %249, i64 %251
  store ptr %252, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %253 = load ptr, ptr %22, align 8, !tbaa !5
  %254 = call noundef ptr @_ZN5SimTK9TiXmlNode8IdentifyEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(104) %24, ptr noundef %253, i32 noundef 0)
  store ptr %254, ptr %23, align 8, !tbaa !5
  %255 = load ptr, ptr %23, align 8, !tbaa !5
  %256 = icmp ne ptr %255, null
  br i1 %256, label %258, label %257

257:                                              ; preds = %247
  store i32 1, ptr %9, align 4
  br label %272

258:                                              ; preds = %247
  %259 = load ptr, ptr %23, align 8, !tbaa !5
  %260 = load ptr, ptr %5, align 8, !tbaa !5
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = load ptr, ptr %259, align 8, !tbaa !9
  %263 = getelementptr inbounds ptr, ptr %262, i64 18
  %264 = load ptr, ptr %263, align 8
  call void %264(ptr noundef nonnull align 8 dereferenceable(104) %259, ptr noundef %260, ptr noundef %261)
  %265 = load ptr, ptr %23, align 8, !tbaa !5
  %266 = icmp eq ptr %265, null
  br i1 %266, label %271, label %267

267:                                              ; preds = %258
  %268 = load ptr, ptr %265, align 8, !tbaa !9
  %269 = getelementptr inbounds ptr, ptr %268, i64 1
  %270 = load ptr, ptr %269, align 8
  call void %270(ptr noundef nonnull align 8 dereferenceable(104) %265) #8
  br label %271

271:                                              ; preds = %267, %258
  store ptr null, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %9, align 4
  br label %272

272:                                              ; preds = %271, %257
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  %273 = load i32, ptr %9, align 4
  switch i32 %273, label %276 [
    i32 0, label %274
  ]

274:                                              ; preds = %272
  br label %275

275:                                              ; preds = %274
  store i32 0, ptr %9, align 4
  br label %276

276:                                              ; preds = %275, %272, %246, %222, %209, %140
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %277 = load i32, ptr %9, align 4
  switch i32 %277, label %286 [
    i32 0, label %278
    i32 1, label %280
  ]

278:                                              ; preds = %276
  br label %93, !llvm.loop !23

279:                                              ; preds = %82
  br label %280

280:                                              ; preds = %279, %276, %122, %81, %60, %53
  ret void

281:                                              ; preds = %111
  %282 = load ptr, ptr %11, align 8
  %283 = load i32, ptr %12, align 4
  %284 = insertvalue { ptr, i32 } poison, ptr %282, 0
  %285 = insertvalue { ptr, i32 } %284, i32 %283, 1
  resume { ptr, i32 } %285

286:                                              ; preds = %276, %53
  unreachable
}

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

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

; Function Attrs: nounwind
declare void @_ZN5SimTK9TiXmlNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #6

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #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 = { "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 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 willreturn memory(read) "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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


; 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::TiXmlText" = type <{ %"class.SimTK::TiXmlNode", i8, [7 x i8] }>
%"class.SimTK::TiXmlNode" = type { %"class.SimTK::TiXmlBase", ptr, i32, ptr, ptr, %"class.SimTK::String", ptr, ptr }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }
%"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.6 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE = external hidden unnamed_addr constant [69 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [9 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

declare noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEi(i32 noundef) local_unnamed_addr #4 align 2

declare noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) 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 #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlNode8IdentifyEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, i32 noundef) local_unnamed_addr #2 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 #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5SimTK9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(105), ptr noundef) unnamed_addr #2 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
define dso_local void @_ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.SimTK::TiXmlText", align 8
  br label %5

5:                                                ; preds = %17, %3
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr %1, i64 %8
  %10 = tail call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %9)
  br i1 %10, label %11, label %.thread90

11:                                               ; preds = %5
  %12 = tail call noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %13 = icmp slt i32 %12, 1
  br i1 %13, label %14, label %17

14:                                               ; preds = %11
  %15 = tail call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not83 = icmp eq ptr %15, null
  br i1 %.not83, label %.thread, label %16

16:                                               ; preds = %14
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %15, i32 noundef 14, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %.thread

17:                                               ; preds = %11
  %18 = trunc i32 %12 to i8
  %19 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext %18)
  %20 = icmp eq i32 %12, 62
  br i1 %20, label %.thread90, label %5

.thread90:                                        ; preds = %17, %5
  %21 = tail call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %22 = icmp slt i32 %21, 3
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %.thread90
  %24 = tail call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %25 = add nsw i32 %24, -1
  %26 = sext i32 %25 to i64
  %27 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %26)
  %28 = load i8, ptr %27, align 1, !tbaa !8
  %29 = icmp eq i8 %28, 62
  br i1 %29, label %30, label %37

30:                                               ; preds = %23
  %31 = tail call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %32 = add nsw i32 %31, -2
  %33 = sext i32 %32 to i64
  %34 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %33)
  %35 = load i8, ptr %34, align 1, !tbaa !8
  %36 = icmp eq i8 %35, 47
  br i1 %36, label %.thread, label %37

37:                                               ; preds = %30, %23
  %38 = tail call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %39 = add nsw i32 %38, -1
  %40 = sext i32 %39 to i64
  %41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %40)
  %42 = load i8, ptr %41, align 1, !tbaa !8
  %43 = icmp eq i8 %42, 62
  br i1 %43, label %.preheader, label %.thread

.preheader:                                       ; preds = %37, %.preheader.backedge
  %44 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase16StreamWhiteSpaceEPSiPNS_6StringE(ptr noundef nonnull %1, ptr noundef nonnull %2)
  %45 = load ptr, ptr %1, align 8, !tbaa !5
  %46 = getelementptr i8, ptr %45, i64 -24
  %47 = load i64, ptr %46, align 8
  %48 = getelementptr inbounds i8, ptr %1, i64 %47
  %49 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %48)
  br i1 %49, label %50, label %56

50:                                               ; preds = %.preheader
  %51 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.not84 = icmp eq i32 %51, 60
  br i1 %.not84, label %56, label %52

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %4) #8
  call void @_ZN5SimTK9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(105) %4, ptr noundef nonnull @.str.11)
  invoke void @_ZN5SimTK9TiXmlText8StreamInEPSiPNS_6StringE(ptr noundef nonnull align 8 dereferenceable(105) %4, ptr noundef nonnull %1, ptr noundef nonnull %2)
          to label %53 unwind label %54

53:                                               ; preds = %52
  call void @_ZN5SimTK9TiXmlNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(105) %4) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #8
  br label %.preheader.backedge

.preheader.backedge:                              ; preds = %53, %131
  br label %.preheader

54:                                               ; preds = %52
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5SimTK9TiXmlNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(105) %4) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #8
  resume { ptr, i32 } %55

56:                                               ; preds = %50, %.preheader
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  %58 = getelementptr i8, ptr %57, i64 -24
  %59 = load i64, ptr %58, align 8
  %60 = getelementptr inbounds i8, ptr %1, i64 %59
  %61 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %60)
  br i1 %61, label %62, label %.thread

62:                                               ; preds = %56
  %63 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %64 = icmp eq i32 %63, 60
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.6, i32 noundef 1024, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE) #9
  unreachable

66:                                               ; preds = %62
  %67 = call noundef i32 @_ZNK5SimTK6String6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %68 = load ptr, ptr %1, align 8, !tbaa !5
  %69 = getelementptr i8, ptr %68, i64 -24
  %70 = load i64, ptr %69, align 8
  %71 = getelementptr inbounds i8, ptr %1, i64 %70
  %72 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %71)
  br i1 %72, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %66, %104
  %.070115 = phi i8 [ %.272, %104 ], [ 0, %66 ]
  %.073114 = phi i1 [ %.275, %104 ], [ false, %66 ]
  %73 = call noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %74 = icmp slt i32 %73, 1
  br i1 %74, label %75, label %78

75:                                               ; preds = %.lr.ph
  %76 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not = icmp eq ptr %76, null
  br i1 %.not, label %.thread, label %77

77:                                               ; preds = %75
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %76, i32 noundef 14, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %.thread

78:                                               ; preds = %.lr.ph
  %79 = icmp eq i32 %73, 62
  br i1 %79, label %.thread92, label %80

80:                                               ; preds = %78
  %81 = trunc i32 %73 to i8
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext %81)
  %83 = call noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %84 = icmp eq i32 %73, 91
  br i1 %84, label %85, label %98

85:                                               ; preds = %80
  %86 = call noundef i32 @_ZNK5SimTK6String4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %87 = icmp sgt i32 %86, 8
  br i1 %87, label %88, label %98

88:                                               ; preds = %85
  %89 = call noundef i32 @_ZNK5SimTK6String4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %90 = sext i32 %89 to i64
  %91 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  %92 = getelementptr inbounds i8, ptr %91, i64 %90
  %93 = getelementptr inbounds i8, ptr %92, i64 -9
  %94 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %93, ptr noundef nonnull dereferenceable(1) @.str.22) #10
  %.not85 = icmp eq i32 %94, 0
  br i1 %.not85, label %95, label %98

95:                                               ; preds = %88
  %96 = trunc nuw i8 %.070115 to i1
  br i1 %96, label %97, label %.thread92.thread

97:                                               ; preds = %95
  call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.6, i32 noundef 1056, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE) #9
  unreachable

98:                                               ; preds = %88, %85, %80
  %99 = icmp eq i32 %73, 60
  %or.cond.not = or i1 %.073114, %99
  br i1 %or.cond.not, label %104, label %100

100:                                              ; preds = %98
  %101 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEi(i32 noundef %73)
  br i1 %101, label %104, label %102

102:                                              ; preds = %100
  %103 = icmp eq i32 %73, 47
  %spec.select = select i1 %103, i8 1, i8 %.070115
  br label %104

104:                                              ; preds = %102, %98, %100
  %.275 = phi i1 [ false, %100 ], [ %.073114, %98 ], [ true, %102 ]
  %.272 = phi i8 [ %.070115, %100 ], [ %.070115, %98 ], [ %spec.select, %102 ]
  %105 = load ptr, ptr %1, align 8, !tbaa !5
  %106 = getelementptr i8, ptr %105, i64 -24
  %107 = load i64, ptr %106, align 8
  %108 = getelementptr inbounds i8, ptr %1, i64 %107
  %109 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %108)
  br i1 %109, label %.lr.ph, label %.thread

.thread92:                                        ; preds = %78
  %.pre = trunc nuw i8 %.070115 to i1
  br i1 %.pre, label %110, label %.thread92.thread

110:                                              ; preds = %.thread92
  %111 = load ptr, ptr %1, align 8, !tbaa !5
  %112 = getelementptr i8, ptr %111, i64 -24
  %113 = load i64, ptr %112, align 8
  %114 = getelementptr inbounds i8, ptr %1, i64 %113
  %115 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4goodEv(ptr noundef nonnull align 8 dereferenceable(264) %114)
  br i1 %115, label %116, label %.thread

116:                                              ; preds = %110
  %117 = call noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %118 = icmp slt i32 %117, 1
  br i1 %118, label %119, label %122

119:                                              ; preds = %116
  %120 = call noundef ptr @_ZN5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not88 = icmp eq ptr %120, null
  br i1 %.not88, label %.thread, label %121

121:                                              ; preds = %119
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %120, i32 noundef 14, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %.thread

122:                                              ; preds = %116
  %123 = icmp eq i32 %117, 62
  br i1 %123, label %125, label %124

124:                                              ; preds = %122
  call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.6, i32 noundef 1083, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5SimTK12TiXmlElement8StreamInEPSiPNS_6StringE) #9
  unreachable

125:                                              ; preds = %122
  %126 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 62)
  br label %.thread

.thread92.thread:                                 ; preds = %95, %.thread92
  %127 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  %128 = sext i32 %67 to i64
  %129 = getelementptr inbounds i8, ptr %127, i64 %128
  %130 = call noundef ptr @_ZN5SimTK9TiXmlNode8IdentifyEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %129, i32 noundef 0)
  %.not87 = icmp eq ptr %130, null
  br i1 %.not87, label %.thread, label %131

131:                                              ; preds = %.thread92.thread
  %132 = load ptr, ptr %130, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 144
  %134 = load ptr, ptr %133, align 8
  call void %134(ptr noundef nonnull align 8 dereferenceable(104) %130, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %135 = load ptr, ptr %130, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i64 8
  %137 = load ptr, ptr %136, align 8
  call void %137(ptr noundef nonnull align 8 dereferenceable(104) %130) #8
  br label %.preheader.backedge

.thread:                                          ; preds = %.thread92.thread, %56, %66, %104, %75, %77, %125, %121, %119, %110, %14, %16, %37, %30, %.thread90
  ret void
}

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

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

; Function Attrs: nounwind
declare void @_ZN5SimTK9TiXmlNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #6

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #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 = { "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 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}


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