; 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::TiXmlParsingData" = type <{ %"struct.SimTK::TiXmlCursor", ptr, i32, [4 x i8] }>
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"class.SimTK::TiXmlDocument" = type { %"class.SimTK::TiXmlNode", i8, i32, %"class.SimTK::String", i32, %"struct.SimTK::TiXmlCursor", i8, %"class.SimTK::String" }
%"class.SimTK::TiXmlNode" = type { %"class.SimTK::TiXmlBase", ptr, i32, ptr, ptr, %"class.SimTK::String", ptr, ptr }
%"class.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.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.15 = external hidden unnamed_addr constant [4 x i8], align 1
@__PRETTY_FUNCTION__._ZN5SimTK13TiXmlDocument5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE = external hidden unnamed_addr constant [97 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 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 ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef, i32 noundef) #2 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 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 uwtable
define dso_local noundef ptr @_ZN5SimTK13TiXmlDocument5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %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 %"class.SimTK::TiXmlParsingData", align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = 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
  %22 = load ptr, ptr %6, align 8
  call void @_ZN5SimTK13TiXmlDocument10ClearErrorEv(ptr noundef nonnull align 8 dereferenceable(192) %22)
  %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 %30, label %29

29:                                               ; preds = %25, %4
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %22, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef 0)
  store ptr null, ptr %5, align 8
  br label %280

30:                                               ; preds = %25
  %31 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  call void @_ZN5SimTK11TiXmlCursor5ClearEv(ptr noundef nonnull align 4 dereferenceable(8) %31)
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %47

34:                                               ; preds = %30
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.SimTK::TiXmlParsingData", ptr %35, i32 0, i32 0
  %37 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !12
  %39 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  %40 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %39, i32 0, i32 0
  store i32 %38, ptr %40, align 8, !tbaa !16
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.SimTK::TiXmlParsingData", ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !18
  %45 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  %46 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %45, i32 0, i32 1
  store i32 %44, ptr %46, align 4, !tbaa !19
  br label %52

47:                                               ; preds = %30
  %48 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  %49 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %48, i32 0, i32 0
  store i32 0, ptr %49, align 8, !tbaa !16
  %50 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  %51 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %50, i32 0, i32 1
  store i32 0, ptr %51, align 4, !tbaa !19
  br label %52

52:                                               ; preds = %47, %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = call noundef i32 @_ZNK5SimTK13TiXmlDocument7TabSizeEv(ptr noundef nonnull align 8 dereferenceable(192) %22)
  %55 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  %56 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !16
  %58 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  %59 = getelementptr inbounds %"struct.SimTK::TiXmlCursor", ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !19
  call void @_ZN5SimTK16TiXmlParsingDataC2EPKciii(ptr noundef nonnull align 8 dereferenceable(20) %10, ptr noundef %53, i32 noundef %54, i32 noundef %57, i32 noundef %60)
  %61 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %10)
  %62 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %22, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 4 %61, i64 8, i1 false), !tbaa.struct !20
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %102

65:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %66, ptr %11, align 8, !tbaa !5
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 0
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %101

71:                                               ; preds = %65
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 0
  %74 = load i8, ptr %73, align 1, !tbaa !11
  %75 = zext i8 %74 to i32
  %76 = icmp eq i32 %75, 239
  br i1 %76, label %77, label %101

77:                                               ; preds = %71
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 1
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = icmp ne i8 %80, 0
  br i1 %81, label %82, label %101

82:                                               ; preds = %77
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 1
  %85 = load i8, ptr %84, align 1, !tbaa !11
  %86 = zext i8 %85 to i32
  %87 = icmp eq i32 %86, 187
  br i1 %87, label %88, label %101

88:                                               ; preds = %82
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 2
  %91 = load i8, ptr %90, align 1, !tbaa !11
  %92 = icmp ne i8 %91, 0
  br i1 %92, label %93, label %101

93:                                               ; preds = %88
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 2
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = zext i8 %96 to i32
  %98 = icmp eq i32 %97, 191
  br i1 %98, label %99, label %101

99:                                               ; preds = %93
  store i32 1, ptr %9, align 4, !tbaa !9
  %100 = getelementptr inbounds %"class.SimTK::TiXmlDocument", ptr %22, i32 0, i32 6
  store i8 1, ptr %100, align 4, !tbaa !22
  br label %101

101:                                              ; preds = %99, %93, %88, %82, %77, %71, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %102

102:                                              ; preds = %101, %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %103, ptr %12, align 8, !tbaa !5
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %104, i32 noundef %105)
  store ptr %106, ptr %7, align 8, !tbaa !5
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = icmp ne ptr %107, null
  br i1 %108, label %110, label %109

109:                                              ; preds = %102
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %22, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef 0)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %279

110:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  store i8 0, ptr %14, align 1, !tbaa !31
  br label %111

111:                                              ; preds = %269, %110
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %118

114:                                              ; preds = %111
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = load i8, ptr %115, align 1, !tbaa !11
  %117 = icmp ne i8 %116, 0
  br label %118

118:                                              ; preds = %114, %111
  %119 = phi i1 [ false, %111 ], [ %117, %114 ]
  br i1 %119, label %120, label %270

120:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store ptr null, ptr %15, align 8, !tbaa !5
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = load i8, ptr %121, align 1, !tbaa !11
  %123 = sext i8 %122 to i32
  %124 = icmp ne i32 %123, 60
  br i1 %124, label %125, label %173

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %126 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 112) #9
  invoke void @_ZN5SimTK9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(105) %126, ptr noundef @.str.11)
          to label %127 unwind label %132

127:                                              ; preds = %125
  store ptr %126, ptr %16, align 8, !tbaa !5
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = icmp ne ptr %128, null
  br i1 %129, label %136, label %130

130:                                              ; preds = %127
  %131 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %22, i32 noundef 3, ptr noundef null, ptr noundef null, i32 noundef %131)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %170

132:                                              ; preds = %125
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %17, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %18, align 4
  call void @_ZdlPvm(ptr noundef %126, i64 noundef 112) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  br label %282

136:                                              ; preds = %127
  %137 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase21IsWhiteSpaceCondensedEv()
  br i1 %137, label %138, label %146

138:                                              ; preds = %136
  %139 = load ptr, ptr %16, align 8, !tbaa !5
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = load ptr, ptr %139, align 8, !tbaa !32
  %143 = getelementptr inbounds ptr, ptr %142, i64 3
  %144 = load ptr, ptr %143, align 8
  %145 = call noundef ptr %144(ptr noundef nonnull align 8 dereferenceable(105) %139, ptr noundef %140, ptr noundef %10, i32 noundef %141)
  store ptr %145, ptr %7, align 8, !tbaa !5
  br label %154

146:                                              ; preds = %136
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = load i32, ptr %9, align 4, !tbaa !9
  %150 = load ptr, ptr %147, align 8, !tbaa !32
  %151 = getelementptr inbounds ptr, ptr %150, i64 3
  %152 = load ptr, ptr %151, align 8
  %153 = call noundef ptr %152(ptr noundef nonnull align 8 dereferenceable(105) %147, ptr noundef %148, ptr noundef %10, i32 noundef %149)
  store ptr %153, ptr %7, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %146, %138
  %155 = load ptr, ptr %16, align 8, !tbaa !5
  %156 = call noundef zeroext i1 @_ZNK5SimTK9TiXmlText5BlankEv(ptr noundef nonnull align 8 dereferenceable(105) %155)
  br i1 %156, label %161, label %157

157:                                              ; preds = %154
  %158 = load ptr, ptr %16, align 8, !tbaa !5
  %159 = call noundef ptr @_ZN5SimTK9TiXmlNode12LinkEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %22, ptr noundef %158)
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %160, ptr %15, align 8, !tbaa !5
  br label %169

161:                                              ; preds = %154
  %162 = load ptr, ptr %16, align 8, !tbaa !5
  %163 = icmp eq ptr %162, null
  br i1 %163, label %168, label %164

164:                                              ; preds = %161
  %165 = load ptr, ptr %162, align 8, !tbaa !32
  %166 = getelementptr inbounds ptr, ptr %165, i64 1
  %167 = load ptr, ptr %166, align 8
  call void %167(ptr noundef nonnull align 8 dereferenceable(105) %162) #8
  br label %168

168:                                              ; preds = %164, %161
  br label %169

169:                                              ; preds = %168, %157
  store i32 0, ptr %13, align 4
  br label %170

170:                                              ; preds = %169, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %171 = load i32, ptr %13, align 4
  switch i32 %171, label %267 [
    i32 0, label %172
  ]

172:                                              ; preds = %170
  br label %218

173:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load i32, ptr %9, align 4, !tbaa !9
  %176 = call noundef ptr @_ZN5SimTK9TiXmlNode8IdentifyEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(104) %22, ptr noundef %174, i32 noundef %175)
  store ptr %176, ptr %19, align 8, !tbaa !5
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %213

179:                                              ; preds = %173
  %180 = load ptr, ptr %19, align 8, !tbaa !5
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = load i32, ptr %9, align 4, !tbaa !9
  %183 = load ptr, ptr %180, align 8, !tbaa !32
  %184 = getelementptr inbounds ptr, ptr %183, i64 3
  %185 = load ptr, ptr %184, align 8
  %186 = call noundef ptr %185(ptr noundef nonnull align 8 dereferenceable(24) %180, ptr noundef %181, ptr noundef %10, i32 noundef %182)
  store ptr %186, ptr %7, align 8, !tbaa !5
  %187 = load ptr, ptr %19, align 8, !tbaa !5
  %188 = load ptr, ptr %187, align 8, !tbaa !32
  %189 = getelementptr inbounds ptr, ptr %188, i64 15
  %190 = load ptr, ptr %189, align 8
  %191 = call noundef ptr %190(ptr noundef nonnull align 8 dereferenceable(104) %187)
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %206

193:                                              ; preds = %179
  %194 = load i8, ptr %14, align 1, !tbaa !31, !range !34, !noundef !35
  %195 = trunc i8 %194 to i1
  br i1 %195, label %196, label %204

196:                                              ; preds = %193
  %197 = load ptr, ptr %19, align 8, !tbaa !5
  %198 = icmp eq ptr %197, null
  br i1 %198, label %203, label %199

199:                                              ; preds = %196
  %200 = load ptr, ptr %197, align 8, !tbaa !32
  %201 = getelementptr inbounds ptr, ptr %200, i64 1
  %202 = load ptr, ptr %201, align 8
  call void %202(ptr noundef nonnull align 8 dereferenceable(104) %197) #8
  br label %203

203:                                              ; preds = %199, %196
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %205

204:                                              ; preds = %193
  store i8 1, ptr %14, align 1, !tbaa !31
  br label %205

205:                                              ; preds = %204, %203
  br label %206

206:                                              ; preds = %205, %179
  %207 = load ptr, ptr %19, align 8, !tbaa !5
  %208 = icmp ne ptr %207, null
  br i1 %208, label %209, label %212

209:                                              ; preds = %206
  %210 = load ptr, ptr %19, align 8, !tbaa !5
  %211 = call noundef ptr @_ZN5SimTK9TiXmlNode12LinkEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %22, ptr noundef %210)
  br label %212

212:                                              ; preds = %209, %206
  br label %214

213:                                              ; preds = %173
  store i32 3, ptr %13, align 4
  br label %215

214:                                              ; preds = %212
  store i32 0, ptr %13, align 4
  br label %215

215:                                              ; preds = %214, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %216 = load i32, ptr %13, align 4
  switch i32 %216, label %267 [
    i32 0, label %217
  ]

217:                                              ; preds = %215
  br label %218

218:                                              ; preds = %217, %172
  %219 = load i32, ptr %9, align 4, !tbaa !9
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %262

221:                                              ; preds = %218
  %222 = load ptr, ptr %15, align 8, !tbaa !5
  %223 = icmp ne ptr %222, null
  br i1 %223, label %224, label %262

224:                                              ; preds = %221
  %225 = load ptr, ptr %15, align 8, !tbaa !5
  %226 = load ptr, ptr %225, align 8, !tbaa !32
  %227 = getelementptr inbounds ptr, ptr %226, i64 15
  %228 = load ptr, ptr %227, align 8
  %229 = call noundef ptr %228(ptr noundef nonnull align 8 dereferenceable(104) %225)
  %230 = icmp ne ptr %229, null
  br i1 %230, label %231, label %262

231:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = load ptr, ptr %232, align 8, !tbaa !32
  %234 = getelementptr inbounds ptr, ptr %233, i64 15
  %235 = load ptr, ptr %234, align 8
  %236 = call noundef ptr %235(ptr noundef nonnull align 8 dereferenceable(104) %232)
  store ptr %236, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %237 = load ptr, ptr %20, align 8, !tbaa !5
  %238 = call noundef ptr @_ZNK5SimTK16TiXmlDeclaration8EncodingEv(ptr noundef nonnull align 8 dereferenceable(200) %237)
  store ptr %238, ptr %21, align 8, !tbaa !5
  %239 = load ptr, ptr %21, align 8, !tbaa !5
  %240 = icmp ne ptr %239, null
  br i1 %240, label %241, label %242

241:                                              ; preds = %231
  br label %244

242:                                              ; preds = %231
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.6, i32 noundef 823, ptr noundef @__PRETTY_FUNCTION__._ZN5SimTK13TiXmlDocument5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE) #11
  unreachable

243:                                              ; No predecessors!
  br label %244

244:                                              ; preds = %243, %241
  %245 = load ptr, ptr %21, align 8, !tbaa !5
  %246 = load i8, ptr %245, align 1, !tbaa !11
  %247 = sext i8 %246 to i32
  %248 = icmp eq i32 %247, 0
  br i1 %248, label %249, label %250

249:                                              ; preds = %244
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %261

250:                                              ; preds = %244
  %251 = load ptr, ptr %21, align 8, !tbaa !5
  %252 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %251, ptr noundef @.str.16, i1 noundef zeroext true, i32 noundef 0)
  br i1 %252, label %253, label %254

253:                                              ; preds = %250
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %260

254:                                              ; preds = %250
  %255 = load ptr, ptr %21, align 8, !tbaa !5
  %256 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef %255, ptr noundef @.str.17, i1 noundef zeroext true, i32 noundef 0)
  br i1 %256, label %257, label %258

257:                                              ; preds = %254
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %259

258:                                              ; preds = %254
  store i32 2, ptr %9, align 4, !tbaa !9
  br label %259

259:                                              ; preds = %258, %257
  br label %260

260:                                              ; preds = %259, %253
  br label %261

261:                                              ; preds = %260, %249
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %262

262:                                              ; preds = %261, %224, %221, %218
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %263, ptr %12, align 8, !tbaa !5
  %264 = load ptr, ptr %7, align 8, !tbaa !5
  %265 = load i32, ptr %9, align 4, !tbaa !9
  %266 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %264, i32 noundef %265)
  store ptr %266, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %13, align 4
  br label %267

267:                                              ; preds = %262, %215, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %268 = load i32, ptr %13, align 4
  switch i32 %268, label %278 [
    i32 0, label %269
    i32 3, label %270
  ]

269:                                              ; preds = %267
  br label %111, !llvm.loop !36

270:                                              ; preds = %267, %118
  %271 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %22, i32 0, i32 3
  %272 = load ptr, ptr %271, align 8, !tbaa !38
  %273 = icmp ne ptr %272, null
  br i1 %273, label %276, label %274

274:                                              ; preds = %270
  %275 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %22, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef %275)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %278

276:                                              ; preds = %270
  %277 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %277, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %278

278:                                              ; preds = %276, %274, %267
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  br label %279

279:                                              ; preds = %278, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  br label %280

280:                                              ; preds = %279, %29
  %281 = load ptr, ptr %5, align 8
  ret ptr %281

282:                                              ; preds = %132
  %283 = load ptr, ptr %17, align 8
  %284 = load i32, ptr %18, align 4
  %285 = insertvalue { ptr, i32 } poison, ptr %283, 0
  %286 = insertvalue { ptr, i32 } %285, i32 %284, 1
  resume { ptr, i32 } %286
}

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

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

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

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

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

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

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

; 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5SimTK9TiXmlBase21IsWhiteSpaceCondensedEv() #3 align 2

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

declare noundef ptr @_ZN5SimTK9TiXmlNode12LinkEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #7

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN5SimTK13TiXmlEncodingE", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !15, i64 0}
!13 = !{!"_ZTSN5SimTK16TiXmlParsingDataE", !14, i64 0, !6, i64 8, !15, i64 16}
!14 = !{!"_ZTSN5SimTK11TiXmlCursorE", !15, i64 0, !15, i64 4}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !15, i64 8}
!17 = !{!"_ZTSN5SimTK9TiXmlBaseE", !14, i64 8, !6, i64 16}
!18 = !{!13, !15, i64 4}
!19 = !{!17, !15, i64 12}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !21}
!21 = !{!15, !15, i64 0}
!22 = !{!23, !30, i64 156}
!23 = !{!"_ZTSN5SimTK13TiXmlDocumentE", !24, i64 0, !30, i64 104, !15, i64 108, !26, i64 112, !15, i64 144, !14, i64 148, !30, i64 156, !26, i64 160}
!24 = !{!"_ZTSN5SimTK9TiXmlNodeE", !17, i64 0, !6, i64 24, !25, i64 32, !6, i64 40, !6, i64 48, !26, i64 56, !6, i64 88, !6, i64 96}
!25 = !{!"_ZTSN5SimTK9TiXmlNode8NodeTypeE", !7, i64 0}
!26 = !{!"_ZTSN5SimTK6StringE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !28, i64 0, !29, i64 8, !7, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!30, !30, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"vtable pointer", !8, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!24, !6, i64 40}


; 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::TiXmlParsingData" = type <{ %"struct.SimTK::TiXmlCursor", ptr, i32, [4 x i8] }>
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }

@.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.15 = external hidden unnamed_addr constant [4 x i8], align 1
@__PRETTY_FUNCTION__._ZN5SimTK13TiXmlDocument5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE = external hidden unnamed_addr constant [97 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 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 ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef, i32 noundef) local_unnamed_addr #2 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 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 uwtable
define dso_local noundef ptr @_ZN5SimTK13TiXmlDocument5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef %1, ptr noundef readonly %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.SimTK::TiXmlParsingData", align 8
  tail call void @_ZN5SimTK13TiXmlDocument10ClearErrorEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %8, label %6

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

8:                                                ; preds = %6, %4
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %97

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN5SimTK11TiXmlCursor5ClearEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
  %.not106 = icmp eq ptr %2, null
  br i1 %.not106, label %13, label %11

11:                                               ; preds = %9
  %12 = load <2 x i32>, ptr %2, align 8, !tbaa !8
  br label %13

13:                                               ; preds = %9, %11
  %14 = phi <2 x i32> [ %12, %11 ], [ zeroinitializer, %9 ]
  %15 = getelementptr inbounds i8, ptr %0, i64 12
  store <2 x i32> %14, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %16 = tail call noundef i32 @_ZNK5SimTK13TiXmlDocument7TabSizeEv(ptr noundef nonnull align 8 dereferenceable(192) %0)
  %17 = load i32, ptr %10, align 8, !tbaa !10
  %18 = load i32, ptr %15, align 4, !tbaa !14
  call void @_ZN5SimTK16TiXmlParsingDataC2EPKciii(ptr noundef nonnull align 8 dereferenceable(20) %5, ptr noundef nonnull %1, i32 noundef %16, i32 noundef %17, i32 noundef %18)
  %19 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %5)
  %20 = load i64, ptr %19, align 4
  store i64 %20, ptr %10, align 8
  %21 = icmp eq i32 %3, 0
  br i1 %21, label %22, label %32

22:                                               ; preds = %13
  %23 = load i8, ptr %1, align 1, !tbaa !5
  %cond = icmp eq i8 %23, -17
  br i1 %cond, label %24, label %32

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %1, i64 1
  %26 = load i8, ptr %25, align 1, !tbaa !5
  %cond120 = icmp eq i8 %26, -69
  br i1 %cond120, label %27, label %32

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %1, i64 2
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %cond121 = icmp eq i8 %29, -65
  br i1 %cond121, label %30, label %32

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %0, i64 156
  store i8 1, ptr %31, align 4, !tbaa !15
  br label %32

32:                                               ; preds = %27, %24, %22, %30, %13
  %.175 = phi i32 [ %3, %13 ], [ 1, %30 ], [ 0, %22 ], [ 0, %24 ], [ 0, %27 ]
  %33 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef nonnull %1, i32 noundef %.175)
  %.not110 = icmp eq ptr %33, null
  br i1 %.not110, label %.sink.split, label %.preheader

.preheader:                                       ; preds = %32, %.thread133
  %.066154 = phi ptr [ %93, %.thread133 ], [ %33, %32 ]
  %.276153 = phi i32 [ %.478, %.thread133 ], [ %.175, %32 ]
  %.081152 = phi ptr [ %.470139, %.thread133 ], [ %1, %32 ]
  %.089151 = phi i1 [ %.392138, %.thread133 ], [ false, %32 ]
  %34 = load i8, ptr %.066154, align 1, !tbaa !5
  switch i8 %34, label %35 [
    i8 0, label %.critedge
    i8 60, label %54
  ]

35:                                               ; preds = %.preheader
  %36 = call noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #8
  invoke void @_ZN5SimTK9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(105) %36, ptr noundef nonnull @.str.11)
          to label %39 unwind label %37

37:                                               ; preds = %35
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %36, i64 noundef 112) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  resume { ptr, i32 } %38

39:                                               ; preds = %35
  %40 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase21IsWhiteSpaceCondensedEv()
  %41 = load ptr, ptr %36, align 8, !tbaa !24
  %42 = getelementptr inbounds i8, ptr %41, i64 24
  %43 = load ptr, ptr %42, align 8
  br i1 %40, label %44, label %46

44:                                               ; preds = %39
  %45 = call noundef ptr %43(ptr noundef nonnull align 8 dereferenceable(105) %36, ptr noundef nonnull %.066154, ptr noundef nonnull %5, i32 noundef %.276153)
  br label %48

46:                                               ; preds = %39
  %47 = call noundef ptr %43(ptr noundef nonnull align 8 dereferenceable(105) %36, ptr noundef %.081152, ptr noundef nonnull %5, i32 noundef %.276153)
  br label %48

48:                                               ; preds = %46, %44
  %.167 = phi ptr [ %45, %44 ], [ %47, %46 ]
  %49 = call noundef zeroext i1 @_ZNK5SimTK9TiXmlText5BlankEv(ptr noundef nonnull align 8 dereferenceable(105) %36)
  br i1 %49, label %50, label %71

50:                                               ; preds = %48
  %51 = load ptr, ptr %36, align 8, !tbaa !24
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  %53 = load ptr, ptr %52, align 8
  call void %53(ptr noundef nonnull align 8 dereferenceable(105) %36) #7
  br label %.thread133

54:                                               ; preds = %.preheader
  %55 = call noundef ptr @_ZN5SimTK9TiXmlNode8IdentifyEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull %.066154, i32 noundef %.276153)
  %.not114.not = icmp eq ptr %55, null
  br i1 %.not114.not, label %.critedge, label %56

56:                                               ; preds = %54
  %57 = load ptr, ptr %55, align 8, !tbaa !24
  %58 = getelementptr inbounds i8, ptr %57, i64 24
  %59 = load ptr, ptr %58, align 8
  %60 = call noundef ptr %59(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull %.066154, ptr noundef nonnull %5, i32 noundef %.276153)
  %61 = load ptr, ptr %55, align 8, !tbaa !24
  %62 = getelementptr inbounds i8, ptr %61, i64 120
  %63 = load ptr, ptr %62, align 8
  %64 = call noundef ptr %63(ptr noundef nonnull align 8 dereferenceable(104) %55)
  %.not115 = icmp ne ptr %64, null
  %brmerge.not = select i1 %.not115, i1 %.089151, i1 false
  br i1 %brmerge.not, label %65, label %69

65:                                               ; preds = %56
  %66 = load ptr, ptr %55, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load ptr, ptr %67, align 8
  call void %68(ptr noundef nonnull align 8 dereferenceable(104) %55) #7
  br label %.thread133

69:                                               ; preds = %56
  %.089.mux = select i1 %.not115, i1 true, i1 %.089151
  %70 = call noundef ptr @_ZN5SimTK9TiXmlNode12LinkEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull %55)
  br label %.thread133

71:                                               ; preds = %48
  %72 = call noundef ptr @_ZN5SimTK9TiXmlNode12LinkEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull %36)
  %73 = icmp eq i32 %.276153, 0
  br i1 %73, label %74, label %.thread133

74:                                               ; preds = %71
  %75 = load ptr, ptr %36, align 8, !tbaa !24
  %76 = getelementptr inbounds i8, ptr %75, i64 120
  %77 = load ptr, ptr %76, align 8
  %78 = call noundef ptr %77(ptr noundef nonnull align 8 dereferenceable(104) %36)
  %.not117 = icmp eq ptr %78, null
  br i1 %.not117, label %.thread133, label %79

79:                                               ; preds = %74
  %80 = load ptr, ptr %36, align 8, !tbaa !24
  %81 = getelementptr inbounds i8, ptr %80, i64 120
  %82 = load ptr, ptr %81, align 8
  %83 = call noundef ptr %82(ptr noundef nonnull align 8 dereferenceable(104) %36)
  %84 = call noundef ptr @_ZNK5SimTK16TiXmlDeclaration8EncodingEv(ptr noundef nonnull align 8 dereferenceable(200) %83)
  %.not118 = icmp eq ptr %84, null
  br i1 %.not118, label %85, label %86

85:                                               ; preds = %79
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.6, i32 noundef 823, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5SimTK13TiXmlDocument5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE) #10
  unreachable

86:                                               ; preds = %79
  %87 = load i8, ptr %84, align 1, !tbaa !5
  %88 = icmp eq i8 %87, 0
  br i1 %88, label %.thread133, label %89

89:                                               ; preds = %86
  %90 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %84, ptr noundef nonnull @.str.16, i1 noundef zeroext true, i32 noundef 0)
  br i1 %90, label %.thread133, label %91

91:                                               ; preds = %89
  %92 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase11StringEqualEPKcS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %84, ptr noundef nonnull @.str.17, i1 noundef zeroext true, i32 noundef 0)
  %. = select i1 %92, i32 1, i32 2
  br label %.thread133

.thread133:                                       ; preds = %69, %65, %50, %71, %74, %91, %89, %86
  %.470139 = phi ptr [ %.167, %74 ], [ %.167, %71 ], [ %.167, %86 ], [ %.167, %89 ], [ %.167, %91 ], [ %.167, %50 ], [ %60, %65 ], [ %60, %69 ]
  %.392138 = phi i1 [ %.089151, %74 ], [ %.089151, %71 ], [ %.089151, %86 ], [ %.089151, %89 ], [ %.089151, %91 ], [ %.089151, %50 ], [ true, %65 ], [ %.089.mux, %69 ]
  %.478 = phi i32 [ 0, %74 ], [ %.276153, %71 ], [ 1, %86 ], [ 1, %89 ], [ %., %91 ], [ %.276153, %50 ], [ %.276153, %65 ], [ %.276153, %69 ]
  %93 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %.470139, i32 noundef %.478)
  %.not111 = icmp eq ptr %93, null
  br i1 %.not111, label %.critedge, label %.preheader

.critedge:                                        ; preds = %54, %.preheader, %.thread133
  %.276.lcssa = phi i32 [ %.276153, %54 ], [ %.276153, %.preheader ], [ %.478, %.thread133 ]
  %.066.lcssa = phi ptr [ %.066154, %54 ], [ %.066154, %.preheader ], [ null, %.thread133 ]
  %94 = getelementptr inbounds i8, ptr %0, i64 40
  %95 = load ptr, ptr %94, align 8, !tbaa !26
  %.not119 = icmp eq ptr %95, null
  br i1 %.not119, label %.sink.split, label %96

.sink.split:                                      ; preds = %.critedge, %32
  %.276.lcssa.sink = phi i32 [ 0, %32 ], [ %.276.lcssa, %.critedge ]
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %0, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef %.276.lcssa.sink)
  br label %96

96:                                               ; preds = %.sink.split, %.critedge
  %.5 = phi ptr [ %.066.lcssa, %.critedge ], [ null, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %97

97:                                               ; preds = %96, %8
  %.6 = phi ptr [ %.5, %96 ], [ null, %8 ]
  ret ptr %.6
}

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

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

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

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

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

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

; 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: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

declare noundef ptr @_ZN5SimTK9TiXmlNode12LinkEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #6

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !9, i64 8}
!11 = !{!"_ZTSN5SimTK9TiXmlBaseE", !12, i64 8, !13, i64 16}
!12 = !{!"_ZTSN5SimTK11TiXmlCursorE", !9, i64 0, !9, i64 4}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!11, !9, i64 12}
!15 = !{!16, !23, i64 156}
!16 = !{!"_ZTSN5SimTK13TiXmlDocumentE", !17, i64 0, !23, i64 104, !9, i64 108, !19, i64 112, !9, i64 144, !12, i64 148, !23, i64 156, !19, i64 160}
!17 = !{!"_ZTSN5SimTK9TiXmlNodeE", !11, i64 0, !13, i64 24, !18, i64 32, !13, i64 40, !13, i64 48, !19, i64 56, !13, i64 88, !13, i64 96}
!18 = !{!"_ZTSN5SimTK9TiXmlNode8NodeTypeE", !6, i64 0}
!19 = !{!"_ZTSN5SimTK6StringE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !6, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!22 = !{!"long", !6, i64 0}
!23 = !{!"bool", !6, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !7, i64 0}
!26 = !{!17, !13, i64 40}


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