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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }
%"class.SimTK::TiXmlAttribute" = type { %"class.SimTK::TiXmlBase", ptr, %"class.SimTK::String", %"class.SimTK::String", ptr, ptr }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

; 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 noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef, ptr noundef, i32 noundef) #2 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca %"class.SimTK::String", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %16 = load ptr, ptr %6, align 8
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %17, i32 noundef %18)
  store ptr %19, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %26

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

26:                                               ; preds = %22, %4
  store ptr null, ptr %5, align 8
  br label %205

27:                                               ; preds = %22
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %37

30:                                               ; preds = %27
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20) %31, ptr noundef %32, i32 noundef %33)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %34)
  %36 = getelementptr inbounds %"class.SimTK::TiXmlBase", ptr %16, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 4 %35, i64 8, i1 false), !tbaa.struct !12
  br label %37

37:                                               ; preds = %30, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %38, ptr %10, align 8, !tbaa !5
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 2
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = call noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef %39, ptr noundef %40, i32 noundef %41)
  store ptr %42, ptr %7, align 8, !tbaa !5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %49

45:                                               ; preds = %37
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = icmp ne i8 %47, 0
  br i1 %48, label %60, label %49

49:                                               ; preds = %45, %37
  %50 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %59

53:                                               ; preds = %49
  %54 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %55, i32 noundef 7, ptr noundef %56, ptr noundef %57, i32 noundef %58)
  br label %59

59:                                               ; preds = %53, %49
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %204

60:                                               ; preds = %45
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %61, i32 noundef %62)
  store ptr %63, ptr %7, align 8, !tbaa !5
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %75

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

70:                                               ; preds = %66
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = icmp ne i32 %73, 61
  br i1 %74, label %75, label %86

75:                                               ; preds = %70, %66, %60
  %76 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %85

79:                                               ; preds = %75
  %80 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %81, i32 noundef 7, ptr noundef %82, ptr noundef %83, i32 noundef %84)
  br label %85

85:                                               ; preds = %79, %75
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %204

86:                                               ; preds = %70
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i32 1
  store ptr %88, ptr %7, align 8, !tbaa !5
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %89, i32 noundef %90)
  store ptr %91, ptr %7, align 8, !tbaa !5
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %98

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

98:                                               ; preds = %94, %86
  %99 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !15
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %108

102:                                              ; preds = %98
  %103 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !15
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %104, i32 noundef 7, ptr noundef %105, ptr noundef %106, i32 noundef %107)
  br label %108

108:                                              ; preds = %102, %98
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %204

109:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  store i8 39, ptr %13, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  store i8 34, ptr %14, align 1, !tbaa !11
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load i8, ptr %110, align 1, !tbaa !11
  %112 = sext i8 %111 to i32
  %113 = icmp eq i32 %112, 39
  br i1 %113, label %114, label %122

114:                                              ; preds = %109
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %115, i32 1
  store ptr %116, ptr %7, align 8, !tbaa !5
  store ptr @.str.29, ptr %12, align 8, !tbaa !5
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 3
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = call noundef ptr @_ZN5SimTK9TiXmlBase8ReadTextEPKcPNS_6StringEbS2_bNS_13TiXmlEncodingE(ptr noundef %117, ptr noundef %118, i1 noundef zeroext false, ptr noundef %119, i1 noundef zeroext false, i32 noundef %120)
  store ptr %121, ptr %7, align 8, !tbaa !5
  br label %201

122:                                              ; preds = %109
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = load i8, ptr %123, align 1, !tbaa !11
  %125 = sext i8 %124 to i32
  %126 = icmp eq i32 %125, 34
  br i1 %126, label %127, label %135

127:                                              ; preds = %122
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %128, i32 1
  store ptr %129, ptr %7, align 8, !tbaa !5
  store ptr @.str.30, ptr %12, align 8, !tbaa !5
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 3
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = call noundef ptr @_ZN5SimTK9TiXmlBase8ReadTextEPKcPNS_6StringEbS2_bNS_13TiXmlEncodingE(ptr noundef %130, ptr noundef %131, i1 noundef zeroext false, ptr noundef %132, i1 noundef zeroext false, i32 noundef %133)
  store ptr %134, ptr %7, align 8, !tbaa !5
  br label %200

135:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.11)
  %136 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 3
  %137 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %136, ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %138

138:                                              ; preds = %192, %135
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %169

141:                                              ; preds = %138
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load i8, ptr %142, align 1, !tbaa !11
  %144 = icmp ne i8 %143, 0
  br i1 %144, label %145, label %169

145:                                              ; preds = %141
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load i8, ptr %146, align 1, !tbaa !11
  %148 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext %147)
  br i1 %148, label %169, label %149

149:                                              ; preds = %145
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = load i8, ptr %150, align 1, !tbaa !11
  %152 = sext i8 %151 to i32
  %153 = icmp ne i32 %152, 10
  br i1 %153, label %154, label %169

154:                                              ; preds = %149
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = load i8, ptr %155, align 1, !tbaa !11
  %157 = sext i8 %156 to i32
  %158 = icmp ne i32 %157, 13
  br i1 %158, label %159, label %169

159:                                              ; preds = %154
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = load i8, ptr %160, align 1, !tbaa !11
  %162 = sext i8 %161 to i32
  %163 = icmp ne i32 %162, 47
  br i1 %163, label %164, label %169

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

169:                                              ; preds = %164, %159, %154, %149, %145, %141, %138
  %170 = phi i1 [ false, %159 ], [ false, %154 ], [ false, %149 ], [ false, %145 ], [ false, %141 ], [ false, %138 ], [ %168, %164 ]
  br i1 %170, label %171, label %199

171:                                              ; preds = %169
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = load i8, ptr %172, align 1, !tbaa !11
  %174 = sext i8 %173 to i32
  %175 = icmp eq i32 %174, 39
  br i1 %175, label %181, label %176

176:                                              ; preds = %171
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = load i8, ptr %177, align 1, !tbaa !11
  %179 = sext i8 %178 to i32
  %180 = icmp eq i32 %179, 34
  br i1 %180, label %181, label %192

181:                                              ; preds = %176, %171
  %182 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8, !tbaa !15
  %184 = icmp ne ptr %183, null
  br i1 %184, label %185, label %191

185:                                              ; preds = %181
  %186 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 1
  %187 = load ptr, ptr %186, align 8, !tbaa !15
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %187, i32 noundef 7, ptr noundef %188, ptr noundef %189, i32 noundef %190)
  br label %191

191:                                              ; preds = %185, %181
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %203

192:                                              ; preds = %176
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = load i8, ptr %193, align 1, !tbaa !11
  %195 = getelementptr inbounds %"class.SimTK::TiXmlAttribute", ptr %16, i32 0, i32 3
  %196 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %195, i8 noundef signext %194)
  %197 = load ptr, ptr %7, align 8, !tbaa !5
  %198 = getelementptr inbounds i8, ptr %197, i32 1
  store ptr %198, ptr %7, align 8, !tbaa !5
  br label %138, !llvm.loop !23

199:                                              ; preds = %169
  br label %200

200:                                              ; preds = %199, %127
  br label %201

201:                                              ; preds = %200, %114
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %202, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %203

203:                                              ; preds = %201, %191
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %204

204:                                              ; preds = %203, %108, %85, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %205

205:                                              ; preds = %204, %26
  %206 = load ptr, ptr %5, align 8
  ret ptr %206
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN5SimTK13TiXmlEncodingE", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 4, !13, i64 4, i64 4, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 24}
!16 = !{!"_ZTSN5SimTK14TiXmlAttributeE", !17, i64 0, !6, i64 24, !19, i64 32, !19, i64 64, !6, i64 96, !6, i64 104}
!17 = !{!"_ZTSN5SimTK9TiXmlBaseE", !18, i64 8, !6, i64 16}
!18 = !{!"_ZTSN5SimTK11TiXmlCursorE", !14, i64 0, !14, i64 4}
!19 = !{!"_ZTSN5SimTK6StringE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare 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 noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN5SimTK14TiXmlAttribute5ParseEPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 {
  %5 = alloca %"class.SimTK::String", align 8
  %6 = tail call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef %1, i32 noundef %3)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %.critedge, label %7

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

9:                                                ; preds = %7
  %.not76 = icmp eq ptr %2, null
  br i1 %.not76, label %14, label %10

10:                                               ; preds = %9
  tail call void @_ZN5SimTK16TiXmlParsingData5StampEPKcNS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(20) %2, ptr noundef nonnull %6, i32 noundef %3)
  %11 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5SimTK16TiXmlParsingData6CursorEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i64, ptr %11, align 4
  store i64 %13, ptr %12, align 8
  br label %14

14:                                               ; preds = %10, %9
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = tail call noundef ptr @_ZN5SimTK9TiXmlBase8ReadNameEPKcPNS_6StringENS_13TiXmlEncodingE(ptr noundef nonnull %6, ptr noundef nonnull %15, i32 noundef %3)
  %.not77 = icmp eq ptr %16, null
  br i1 %.not77, label %19, label %17

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

19:                                               ; preds = %17, %14
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !8
  %.not79 = icmp eq ptr %21, null
  br i1 %.not79, label %.critedge, label %22

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

23:                                               ; preds = %17
  %24 = tail call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef nonnull %16, i32 noundef %3)
  %.not80 = icmp eq ptr %24, null
  br i1 %.not80, label %27, label %25

25:                                               ; preds = %23
  %26 = load i8, ptr %24, align 1, !tbaa !5
  %cond = icmp eq i8 %26, 61
  br i1 %cond, label %31, label %27

27:                                               ; preds = %25, %23
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !8
  %.not92 = icmp eq ptr %29, null
  br i1 %.not92, label %.critedge, label %30

30:                                               ; preds = %27
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %29, i32 noundef 7, ptr noundef %24, ptr noundef %2, i32 noundef %3)
  br label %.critedge

31:                                               ; preds = %25
  %32 = getelementptr inbounds i8, ptr %24, i64 1
  %33 = tail call noundef ptr @_ZN5SimTK9TiXmlBase14SkipWhiteSpaceEPKcNS_13TiXmlEncodingE(ptr noundef nonnull %32, i32 noundef %3)
  %.not83 = icmp eq ptr %33, null
  br i1 %.not83, label %36, label %34

34:                                               ; preds = %31
  %35 = load i8, ptr %33, align 1, !tbaa !5
  switch i8 %35, label %48 [
    i8 0, label %36
    i8 39, label %40
    i8 34, label %44
  ]

36:                                               ; preds = %34, %31
  %37 = getelementptr inbounds i8, ptr %0, i64 24
  %38 = load ptr, ptr %37, align 8, !tbaa !8
  %.not85 = icmp eq ptr %38, null
  br i1 %.not85, label %.critedge, label %39

39:                                               ; preds = %36
  tail call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %38, i32 noundef 7, ptr noundef %33, ptr noundef %2, i32 noundef %3)
  br label %.critedge

40:                                               ; preds = %34
  %41 = getelementptr inbounds i8, ptr %33, i64 1
  %42 = getelementptr inbounds i8, ptr %0, i64 64
  %43 = tail call noundef ptr @_ZN5SimTK9TiXmlBase8ReadTextEPKcPNS_6StringEbS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %41, ptr noundef nonnull %42, i1 noundef zeroext false, ptr noundef nonnull @.str.29, i1 noundef zeroext false, i32 noundef %3)
  br label %.critedge

44:                                               ; preds = %34
  %45 = getelementptr inbounds i8, ptr %33, i64 1
  %46 = getelementptr inbounds i8, ptr %0, i64 64
  %47 = tail call noundef ptr @_ZN5SimTK9TiXmlBase8ReadTextEPKcPNS_6StringEbS2_bNS_13TiXmlEncodingE(ptr noundef nonnull %45, ptr noundef nonnull %46, i1 noundef zeroext false, ptr noundef nonnull @.str.30, i1 noundef zeroext false, i32 noundef %3)
  br label %.critedge

48:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZN5SimTK6StringC2EPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.11)
  %49 = getelementptr inbounds i8, ptr %0, i64 64
  %50 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5SimTK6StringaSEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  %51 = load i8, ptr %33, align 1, !tbaa !5
  %.not8694 = icmp eq i8 %51, 0
  br i1 %.not8694, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %48, %60
  %52 = phi i8 [ %63, %60 ], [ %51, %48 ]
  %.05995 = phi ptr [ %62, %60 ], [ %33, %48 ]
  %53 = call noundef zeroext i1 @_ZN5SimTK9TiXmlBase12IsWhiteSpaceEc(i8 noundef signext %52)
  br i1 %53, label %.critedge, label %54

54:                                               ; preds = %.lr.ph
  %55 = load i8, ptr %.05995, align 1, !tbaa !5
  switch i8 %55, label %60 [
    i8 10, label %.critedge
    i8 13, label %.critedge
    i8 47, label %.critedge
    i8 62, label %.critedge
    i8 39, label %56
    i8 34, label %56
  ]

56:                                               ; preds = %54, %54
  %57 = getelementptr inbounds i8, ptr %0, i64 24
  %58 = load ptr, ptr %57, align 8, !tbaa !8
  %.not91 = icmp eq ptr %58, null
  br i1 %.not91, label %.critedge, label %59

59:                                               ; preds = %56
  call void @_ZN5SimTK13TiXmlDocument8SetErrorEiPKcPNS_16TiXmlParsingDataENS_13TiXmlEncodingE(ptr noundef nonnull align 8 dereferenceable(192) %58, i32 noundef 7, ptr noundef nonnull %.05995, ptr noundef %2, i32 noundef %3)
  br label %.critedge

60:                                               ; preds = %54
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %49, i8 noundef signext %55)
  %62 = getelementptr inbounds i8, ptr %.05995, i64 1
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %.not86 = icmp eq i8 %63, 0
  br i1 %.not86, label %.critedge, label %.lr.ph, !llvm.loop !18

.critedge:                                        ; preds = %54, %54, %54, %54, %.lr.ph, %60, %48, %22, %19, %30, %27, %39, %36, %40, %44, %56, %59, %4, %7
  %.2 = phi ptr [ null, %7 ], [ null, %4 ], [ null, %22 ], [ null, %19 ], [ null, %30 ], [ null, %27 ], [ null, %39 ], [ null, %36 ], [ null, %59 ], [ null, %56 ], [ %43, %40 ], [ %47, %44 ], [ %33, %48 ], [ %.05995, %54 ], [ %.05995, %54 ], [ %.05995, %54 ], [ %.05995, %54 ], [ %.05995, %.lr.ph ], [ %62, %60 ]
  ret ptr %.2
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 24}
!9 = !{!"_ZTSN5SimTK14TiXmlAttributeE", !10, i64 0, !13, i64 24, !14, i64 32, !14, i64 64, !13, i64 96, !13, i64 104}
!10 = !{!"_ZTSN5SimTK9TiXmlBaseE", !11, i64 8, !13, i64 16}
!11 = !{!"_ZTSN5SimTK11TiXmlCursorE", !12, i64 0, !12, i64 4}
!12 = !{!"int", !6, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!"_ZTSN5SimTK6StringE", !15, i64 0}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !6, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!17 = !{!"long", !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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