; LLVM IR from HiroIshida/tinyfk :: urdf_parser/tinyxml (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.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.std::allocator" = type { i8 }
%class.TiXmlBase = type { ptr, %struct.TiXmlCursor, ptr }
%struct.TiXmlCursor = type { i32, i32 }
%class.TiXmlNode = type { %class.TiXmlBase, ptr, i32, ptr, ptr, %"class.std::__cxx11::basic_string", ptr, ptr }
%class.TiXmlElement = type { %class.TiXmlNode, %class.TiXmlAttributeSet }
%class.TiXmlAttributeSet = type { %class.TiXmlAttribute }
%class.TiXmlAttribute = type { %class.TiXmlBase, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, ptr }

@.str.26 = external hidden unnamed_addr constant [3 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 @_ZN16TiXmlParsingData5StampEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef) #1 align 2

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12TiXmlElement5ParseEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = 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
  %19 = load ptr, ptr %6, align 8
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %20, i32 noundef %21)
  store ptr %22, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %23 = call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %19)
  store ptr %23, ptr %10, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %30

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

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

33:                                               ; preds = %30
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %34, i32 noundef 3, ptr noundef null, ptr noundef null, i32 noundef %35)
  br label %36

36:                                               ; preds = %33, %30
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %332

37:                                               ; preds = %26
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %47

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

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

52:                                               ; preds = %47
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %56, i32 noundef 3, ptr noundef %57, ptr noundef %58, i32 noundef %59)
  br label %60

60:                                               ; preds = %55, %52
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %332

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

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

77:                                               ; preds = %73, %61
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %85

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

85:                                               ; preds = %80, %77
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %331

86:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.26, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %87 unwind label %121

87:                                               ; preds = %86
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  %88 = getelementptr inbounds %class.TiXmlNode, ptr %19, i32 0, i32 5
  %89 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %88)
          to label %90 unwind label %125

90:                                               ; preds = %87
  br label %91

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

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

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

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

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

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

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

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

120:                                              ; preds = %115
  br label %129

121:                                              ; preds = %86
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %15, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %16, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %330

125:                                              ; preds = %226, %216, %190, %184, %177, %160, %145, %115, %100, %87
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %15, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %16, align 4
  br label %329

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

130:                                              ; preds = %108
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = load i8, ptr %131, align 1, !tbaa !11
  %133 = sext i8 %132 to i32
  %134 = icmp eq i32 %133, 47
  br i1 %134, label %135, label %155

135:                                              ; preds = %130
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i32 1
  store ptr %137, ptr %7, align 8, !tbaa !5
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load i8, ptr %138, align 1, !tbaa !11
  %140 = sext i8 %139 to i32
  %141 = icmp ne i32 %140, 62
  br i1 %141, label %142, label %152

142:                                              ; preds = %135
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = icmp ne ptr %143, null
  br i1 %144, label %145, label %151

145:                                              ; preds = %142
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %146, i32 noundef 7, ptr noundef %147, ptr noundef %148, i32 noundef %149)
          to label %150 unwind label %125

150:                                              ; preds = %145
  br label %151

151:                                              ; preds = %150, %142
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

152:                                              ; preds = %135
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds i8, ptr %153, i64 1
  store ptr %154, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

155:                                              ; preds = %130
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load i8, ptr %156, align 1, !tbaa !11
  %158 = sext i8 %157 to i32
  %159 = icmp eq i32 %158, 62
  br i1 %159, label %160, label %233

160:                                              ; preds = %155
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds i8, ptr %161, i32 1
  store ptr %162, ptr %7, align 8, !tbaa !5
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = load i32, ptr %9, align 4, !tbaa !9
  %166 = invoke noundef ptr @_ZN12TiXmlElement9ReadValueEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(216) %19, ptr noundef %163, ptr noundef %164, i32 noundef %165)
          to label %167 unwind label %125

167:                                              ; preds = %160
  store ptr %166, ptr %7, align 8, !tbaa !5
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = icmp ne ptr %168, null
  br i1 %169, label %170, label %174

170:                                              ; preds = %167
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = load i8, ptr %171, align 1, !tbaa !11
  %173 = icmp ne i8 %172, 0
  br i1 %173, label %184, label %174

174:                                              ; preds = %170, %167
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = icmp ne ptr %175, null
  br i1 %176, label %177, label %183

177:                                              ; preds = %174
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %178, i32 noundef 8, ptr noundef %179, ptr noundef %180, i32 noundef %181)
          to label %182 unwind label %125

182:                                              ; preds = %177
  br label %183

183:                                              ; preds = %182, %174
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

184:                                              ; preds = %170
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  %187 = load i32, ptr %9, align 4, !tbaa !9
  %188 = invoke noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef %185, ptr noundef %186, i1 noundef zeroext false, i32 noundef %187)
          to label %189 unwind label %125

189:                                              ; preds = %184
  br i1 %188, label %190, label %223

190:                                              ; preds = %189
  %191 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = getelementptr inbounds i8, ptr %192, i64 %191
  store ptr %193, ptr %7, align 8, !tbaa !5
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = load i32, ptr %9, align 4, !tbaa !9
  %196 = invoke noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %194, i32 noundef %195)
          to label %197 unwind label %125

197:                                              ; preds = %190
  store ptr %196, ptr %7, align 8, !tbaa !5
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = icmp ne ptr %198, null
  br i1 %199, label %200, label %213

200:                                              ; preds = %197
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = load i8, ptr %201, align 1, !tbaa !11
  %203 = icmp ne i8 %202, 0
  br i1 %203, label %204, label %213

204:                                              ; preds = %200
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load i8, ptr %205, align 1, !tbaa !11
  %207 = sext i8 %206 to i32
  %208 = icmp eq i32 %207, 62
  br i1 %208, label %209, label %213

209:                                              ; preds = %204
  %210 = load ptr, ptr %7, align 8, !tbaa !5
  %211 = getelementptr inbounds i8, ptr %210, i32 1
  store ptr %211, ptr %7, align 8, !tbaa !5
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %212, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

213:                                              ; preds = %204, %200, %197
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = icmp ne ptr %214, null
  br i1 %215, label %216, label %222

216:                                              ; preds = %213
  %217 = load ptr, ptr %10, align 8, !tbaa !5
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %217, i32 noundef 8, ptr noundef %218, ptr noundef %219, i32 noundef %220)
          to label %221 unwind label %125

221:                                              ; preds = %216
  br label %222

222:                                              ; preds = %221, %213
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

223:                                              ; preds = %189
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = icmp ne ptr %224, null
  br i1 %225, label %226, label %232

226:                                              ; preds = %223
  %227 = load ptr, ptr %10, align 8, !tbaa !5
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %227, i32 noundef 8, ptr noundef %228, ptr noundef %229, i32 noundef %230)
          to label %231 unwind label %125

231:                                              ; preds = %226
  br label %232

232:                                              ; preds = %231, %223
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

233:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %234 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 112) #8
          to label %235 unwind label %240

235:                                              ; preds = %233
  invoke void @_ZN14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %234)
          to label %236 unwind label %244

236:                                              ; preds = %235
  store ptr %234, ptr %17, align 8, !tbaa !5
  %237 = load ptr, ptr %17, align 8, !tbaa !5
  %238 = icmp ne ptr %237, null
  br i1 %238, label %248, label %239

239:                                              ; preds = %236
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %320

240:                                              ; preds = %271, %251, %248, %233
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %15, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %16, align 4
  br label %323

244:                                              ; preds = %235
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %15, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %234, i64 noundef 112) #9
  br label %323

248:                                              ; preds = %236
  %249 = load ptr, ptr %17, align 8, !tbaa !5
  %250 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN14TiXmlAttribute11SetDocumentEP13TiXmlDocument(ptr noundef nonnull align 8 dereferenceable(112) %249, ptr noundef %250)
          to label %251 unwind label %240

251:                                              ; preds = %248
  %252 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %252, ptr %12, align 8, !tbaa !5
  %253 = load ptr, ptr %17, align 8, !tbaa !5
  %254 = load ptr, ptr %7, align 8, !tbaa !5
  %255 = load ptr, ptr %8, align 8, !tbaa !5
  %256 = load i32, ptr %9, align 4, !tbaa !9
  %257 = load ptr, ptr %253, align 8, !tbaa !15
  %258 = getelementptr inbounds ptr, ptr %257, i64 3
  %259 = load ptr, ptr %258, align 8
  %260 = invoke noundef ptr %259(ptr noundef nonnull align 8 dereferenceable(112) %253, ptr noundef %254, ptr noundef %255, i32 noundef %256)
          to label %261 unwind label %240

261:                                              ; preds = %251
  store ptr %260, ptr %7, align 8, !tbaa !5
  %262 = load ptr, ptr %7, align 8, !tbaa !5
  %263 = icmp ne ptr %262, null
  br i1 %263, label %264, label %268

264:                                              ; preds = %261
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = load i8, ptr %265, align 1, !tbaa !11
  %267 = icmp ne i8 %266, 0
  br i1 %267, label %285, label %268

268:                                              ; preds = %264, %261
  %269 = load ptr, ptr %10, align 8, !tbaa !5
  %270 = icmp ne ptr %269, null
  br i1 %270, label %271, label %277

271:                                              ; preds = %268
  %272 = load ptr, ptr %10, align 8, !tbaa !5
  %273 = load ptr, ptr %12, align 8, !tbaa !5
  %274 = load ptr, ptr %8, align 8, !tbaa !5
  %275 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %272, i32 noundef 3, ptr noundef %273, ptr noundef %274, i32 noundef %275)
          to label %276 unwind label %240

276:                                              ; preds = %271
  br label %277

277:                                              ; preds = %276, %268
  %278 = load ptr, ptr %17, align 8, !tbaa !5
  %279 = icmp eq ptr %278, null
  br i1 %279, label %284, label %280

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

284:                                              ; preds = %280, %277
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %320

285:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %286 = getelementptr inbounds %class.TiXmlElement, ptr %19, i32 0, i32 1
  %287 = load ptr, ptr %17, align 8, !tbaa !5
  %288 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK14TiXmlAttribute8NameTStrB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(112) %287)
          to label %289 unwind label %303

289:                                              ; preds = %285
  %290 = invoke noundef ptr @_ZNK17TiXmlAttributeSet4FindERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(112) %286, ptr noundef nonnull align 8 dereferenceable(32) %288)
          to label %291 unwind label %303

291:                                              ; preds = %289
  store ptr %290, ptr %18, align 8, !tbaa !5
  %292 = load ptr, ptr %18, align 8, !tbaa !5
  %293 = icmp ne ptr %292, null
  br i1 %293, label %294, label %315

294:                                              ; preds = %291
  %295 = load ptr, ptr %10, align 8, !tbaa !5
  %296 = icmp ne ptr %295, null
  br i1 %296, label %297, label %307

297:                                              ; preds = %294
  %298 = load ptr, ptr %10, align 8, !tbaa !5
  %299 = load ptr, ptr %12, align 8, !tbaa !5
  %300 = load ptr, ptr %8, align 8, !tbaa !5
  %301 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %298, i32 noundef 3, ptr noundef %299, ptr noundef %300, i32 noundef %301)
          to label %302 unwind label %303

302:                                              ; preds = %297
  br label %307

303:                                              ; preds = %315, %297, %289, %285
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %15, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %323

307:                                              ; preds = %302, %294
  %308 = load ptr, ptr %17, align 8, !tbaa !5
  %309 = icmp eq ptr %308, null
  br i1 %309, label %314, label %310

310:                                              ; preds = %307
  %311 = load ptr, ptr %308, align 8, !tbaa !15
  %312 = getelementptr inbounds ptr, ptr %311, i64 1
  %313 = load ptr, ptr %312, align 8
  call void %313(ptr noundef nonnull align 8 dereferenceable(112) %308) #7
  br label %314

314:                                              ; preds = %310, %307
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %319

315:                                              ; preds = %291
  %316 = getelementptr inbounds %class.TiXmlElement, ptr %19, i32 0, i32 1
  %317 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN17TiXmlAttributeSet3AddEP14TiXmlAttribute(ptr noundef nonnull align 8 dereferenceable(112) %316, ptr noundef %317)
          to label %318 unwind label %303

318:                                              ; preds = %315
  store i32 0, ptr %11, align 4
  br label %319

319:                                              ; preds = %318, %314
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %320

320:                                              ; preds = %319, %284, %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %321 = load i32, ptr %11, align 4
  switch i32 %321, label %328 [
    i32 0, label %322
  ]

322:                                              ; preds = %320
  br label %324

323:                                              ; preds = %303, %244, %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %329

324:                                              ; preds = %322
  br label %325

325:                                              ; preds = %324
  br label %91, !llvm.loop !17

326:                                              ; preds = %98
  %327 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %327, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %328

328:                                              ; preds = %326, %320, %232, %222, %209, %183, %152, %151, %129
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %331

329:                                              ; preds = %323, %125
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %330

330:                                              ; preds = %329, %121
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %334

331:                                              ; preds = %328, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %332

332:                                              ; preds = %331, %60, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %333 = load ptr, ptr %5, align 8
  ret ptr %333

334:                                              ; preds = %330
  %335 = load ptr, ptr %15, align 8
  %336 = load i32, ptr %16, align 4
  %337 = insertvalue { ptr, i32 } poison, ptr %335, 0
  %338 = insertvalue { ptr, i32 } %337, i32 %336, 1
  resume { ptr, i32 } %338
}

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

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

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

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

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

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

declare noundef ptr @_ZNK17TiXmlAttributeSet4FindERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

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

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

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

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

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


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

%"class.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.std::allocator" = type { i8 }

@.str.26 = external hidden unnamed_addr constant [3 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 @_ZN16TiXmlParsingData5StampEPKc13TiXmlEncoding(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 @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12TiXmlElement5ParseEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %1, i32 noundef %3)
  %8 = tail call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %11, label %9

9:                                                ; preds = %4
  %10 = load i8, ptr %7, align 1, !tbaa !5
  %.not139 = icmp eq i8 %10, 0
  br i1 %.not139, label %11, label %13

11:                                               ; preds = %9, %4
  %.not140 = icmp eq ptr %8, null
  br i1 %.not140, label %108, label %12

12:                                               ; preds = %11
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef 3, ptr noundef null, ptr noundef null, i32 noundef %3)
  br label %108

13:                                               ; preds = %9
  %.not141 = icmp eq ptr %2, null
  br i1 %.not141, label %18, label %14

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

18:                                               ; preds = %14, %13
  %19 = phi i8 [ %.pr, %14 ], [ %10, %13 ]
  %.not142 = icmp eq i8 %19, 60
  br i1 %.not142, label %22, label %20

20:                                               ; preds = %18
  %.not169 = icmp eq ptr %8, null
  br i1 %.not169, label %108, label %21

21:                                               ; preds = %20
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef 3, ptr noundef nonnull %7, ptr noundef %2, i32 noundef %3)
  br label %108

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %7, i64 1
  %24 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef nonnull %23, i32 noundef %3)
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  %26 = tail call noundef ptr @_ZN9TiXmlBase8ReadNameEPKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE13TiXmlEncoding(ptr noundef %24, ptr noundef nonnull %25, i32 noundef %3)
  %.not143 = icmp eq ptr %26, null
  br i1 %.not143, label %29, label %27

27:                                               ; preds = %22
  %28 = load i8, ptr %26, align 1, !tbaa !5
  %.not144 = icmp eq i8 %28, 0
  br i1 %.not144, label %29, label %31

29:                                               ; preds = %27, %22
  %.not145 = icmp eq ptr %8, null
  br i1 %.not145, label %108, label %30

30:                                               ; preds = %29
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef 4, ptr noundef %24, ptr noundef %2, i32 noundef %3)
  br label %108

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.26, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %32 unwind label %45

32:                                               ; preds = %31
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  %33 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %32
  %34 = getelementptr inbounds i8, ptr %0, i64 104
  br label %35

35:                                               ; preds = %.preheader, %105
  %.0113 = phi ptr [ %85, %105 ], [ %26, %.preheader ]
  %36 = load i8, ptr %.0113, align 1, !tbaa !5
  %.not147 = icmp eq i8 %36, 0
  br i1 %.not147, label %.critedge, label %37

37:                                               ; preds = %35
  %38 = invoke noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef nonnull %.0113, i32 noundef %3)
          to label %39 unwind label %.loopexit

39:                                               ; preds = %37
  %.not148 = icmp eq ptr %38, null
  br i1 %.not148, label %42, label %40

40:                                               ; preds = %39
  %41 = load i8, ptr %38, align 1, !tbaa !5
  switch i8 %41, label %76 [
    i8 0, label %42
    i8 47, label %47
    i8 62, label %53
  ]

42:                                               ; preds = %40, %39
  %.not150 = icmp eq ptr %8, null
  br i1 %.not150, label %.critedge, label %.invoke

.invoke:                                          ; preds = %42, %75, %50
  %43 = phi i32 [ 7, %50 ], [ 8, %75 ], [ 6, %42 ]
  %44 = phi ptr [ %48, %50 ], [ %55, %75 ], [ %.0113, %42 ]
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef %43, ptr noundef nonnull %44, ptr noundef %2, i32 noundef %3)
          to label %.critedge unwind label %.loopexit.split-lp

45:                                               ; preds = %31
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %107

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

.loopexit.split-lp:                               ; preds = %.invoke243, %.invoke, %32, %53, %61, %65
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %106

47:                                               ; preds = %40
  %48 = getelementptr inbounds i8, ptr %38, i64 1
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %.not164 = icmp eq i8 %49, 62
  br i1 %.not164, label %51, label %50

50:                                               ; preds = %47
  %.not165 = icmp eq ptr %8, null
  br i1 %.not165, label %.critedge, label %.invoke

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %38, i64 2
  br label %.critedge

53:                                               ; preds = %40
  %54 = getelementptr inbounds i8, ptr %38, i64 1
  %55 = invoke noundef ptr @_ZN12TiXmlElement9ReadValueEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull %54, ptr noundef %2, i32 noundef %3)
          to label %56 unwind label %.loopexit.split-lp

56:                                               ; preds = %53
  %.not157 = icmp eq ptr %55, null
  br i1 %.not157, label %59, label %57

57:                                               ; preds = %56
  %58 = load i8, ptr %55, align 1, !tbaa !5
  %.not158 = icmp eq i8 %58, 0
  br i1 %.not158, label %59, label %61

59:                                               ; preds = %57, %56
  %.not159 = icmp eq ptr %8, null
  br i1 %.not159, label %.critedge, label %.invoke243

.invoke243:                                       ; preds = %74, %59
  %60 = phi ptr [ %55, %59 ], [ %68, %74 ]
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef 8, ptr noundef %60, ptr noundef %2, i32 noundef %3)
          to label %.critedge unwind label %.loopexit.split-lp

61:                                               ; preds = %57
  %62 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %63 = invoke noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef nonnull %55, ptr noundef %62, i1 noundef zeroext false, i32 noundef %3)
          to label %64 unwind label %.loopexit.split-lp

64:                                               ; preds = %61
  br i1 %63, label %65, label %75

65:                                               ; preds = %64
  %66 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %67 = getelementptr inbounds i8, ptr %55, i64 %66
  %68 = invoke noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef nonnull %67, i32 noundef %3)
          to label %69 unwind label %.loopexit.split-lp

69:                                               ; preds = %65
  %.not161 = icmp eq ptr %68, null
  br i1 %.not161, label %74, label %70

70:                                               ; preds = %69
  %71 = load i8, ptr %68, align 1, !tbaa !5
  %cond170 = icmp eq i8 %71, 62
  br i1 %cond170, label %72, label %74

72:                                               ; preds = %70
  %73 = getelementptr inbounds i8, ptr %68, i64 1
  br label %.critedge

74:                                               ; preds = %70, %69
  %.not163 = icmp eq ptr %8, null
  br i1 %.not163, label %.critedge, label %.invoke243

75:                                               ; preds = %64
  %.not160 = icmp eq ptr %8, null
  br i1 %.not160, label %.critedge, label %.invoke

76:                                               ; preds = %40
  %77 = invoke noalias noundef nonnull dereferenceable(112) ptr @_Znwm(i64 noundef 112) #7
          to label %78 unwind label %.loopexit173

78:                                               ; preds = %76
  invoke void @_ZN14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(112) %77)
          to label %81 unwind label %79

.loopexit173:                                     ; preds = %76, %81
  %lpad.loopexit175 = landingpad { ptr, i32 }
          cleanup
  br label %106

.loopexit.split-lp174:                            ; preds = %90
  %lpad.loopexit.split-lp176 = landingpad { ptr, i32 }
          cleanup
  br label %106

79:                                               ; preds = %78
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %77, i64 noundef 112) #8
  br label %106

81:                                               ; preds = %78
  call void @_ZN14TiXmlAttribute11SetDocumentEP13TiXmlDocument(ptr noundef nonnull align 8 dereferenceable(112) %77, ptr noundef %8)
  %82 = load ptr, ptr %77, align 8, !tbaa !8
  %83 = getelementptr inbounds i8, ptr %82, i64 24
  %84 = load ptr, ptr %83, align 8
  %85 = invoke noundef ptr %84(ptr noundef nonnull align 8 dereferenceable(112) %77, ptr noundef nonnull %38, ptr noundef %2, i32 noundef %3)
          to label %86 unwind label %.loopexit173

86:                                               ; preds = %81
  %.not151 = icmp eq ptr %85, null
  br i1 %.not151, label %89, label %87

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

89:                                               ; preds = %87, %86
  %.not153 = icmp eq ptr %8, null
  br i1 %.not153, label %91, label %90

90:                                               ; preds = %89
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef 3, ptr noundef nonnull %38, ptr noundef %2, i32 noundef %3)
          to label %91 unwind label %.loopexit.split-lp174

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

95:                                               ; preds = %87
  %96 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK14TiXmlAttribute8NameTStrB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(112) %77)
  %97 = invoke noundef ptr @_ZNK17TiXmlAttributeSet4FindERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(112) %34, ptr noundef nonnull align 8 dereferenceable(32) %96)
          to label %98 unwind label %.loopexit178

98:                                               ; preds = %95
  %.not154 = icmp eq ptr %97, null
  br i1 %.not154, label %105, label %99

99:                                               ; preds = %98
  %.not155 = icmp eq ptr %8, null
  br i1 %.not155, label %101, label %100

100:                                              ; preds = %99
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(157) %8, i32 noundef 3, ptr noundef nonnull %38, ptr noundef %2, i32 noundef %3)
          to label %101 unwind label %.loopexit.split-lp179

.loopexit178:                                     ; preds = %95, %105
  %lpad.loopexit180 = landingpad { ptr, i32 }
          cleanup
  br label %106

.loopexit.split-lp179:                            ; preds = %100
  %lpad.loopexit.split-lp181 = landingpad { ptr, i32 }
          cleanup
  br label %106

101:                                              ; preds = %99, %100
  %102 = load ptr, ptr %77, align 8, !tbaa !8
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load ptr, ptr %103, align 8
  call void %104(ptr noundef nonnull align 8 dereferenceable(112) %77) #6
  br label %.critedge

105:                                              ; preds = %98
  invoke void @_ZN17TiXmlAttributeSet3AddEP14TiXmlAttribute(ptr noundef nonnull align 8 dereferenceable(112) %34, ptr noundef nonnull %77)
          to label %35 unwind label %.loopexit178, !llvm.loop !10

.critedge:                                        ; preds = %35, %.invoke243, %.invoke, %101, %91, %75, %74, %59, %50, %42, %72, %51
  %.3 = phi ptr [ %52, %51 ], [ %73, %72 ], [ null, %42 ], [ null, %50 ], [ null, %59 ], [ null, %74 ], [ null, %75 ], [ null, %91 ], [ null, %101 ], [ null, %.invoke ], [ null, %.invoke243 ], [ %.0113, %35 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %108

106:                                              ; preds = %.loopexit178, %.loopexit.split-lp179, %.loopexit173, %.loopexit.split-lp174, %.loopexit, %.loopexit.split-lp, %79
  %.pn166 = phi { ptr, i32 } [ %80, %79 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit175, %.loopexit173 ], [ %lpad.loopexit.split-lp176, %.loopexit.split-lp174 ], [ %lpad.loopexit180, %.loopexit178 ], [ %lpad.loopexit.split-lp181, %.loopexit.split-lp179 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %107

107:                                              ; preds = %106, %45
  %.pn166.pn = phi { ptr, i32 } [ %.pn166, %106 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn166.pn

108:                                              ; preds = %.critedge, %30, %29, %20, %21, %11, %12
  %.5 = phi ptr [ null, %12 ], [ null, %11 ], [ null, %21 ], [ null, %20 ], [ %.3, %.critedge ], [ null, %30 ], [ null, %29 ]
  ret ptr %.5
}

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

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

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

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

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

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

declare noundef ptr @_ZNK17TiXmlAttributeSet4FindERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

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

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

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

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


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