; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/rbdl/addons/urdfreader/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.TiXmlString = type { ptr }
%class.TiXmlBase = type { ptr, %struct.TiXmlCursor, ptr }
%struct.TiXmlCursor = type { i32, i32 }
%class.TiXmlNode = type { %class.TiXmlBase, ptr, i32, ptr, ptr, %class.TiXmlString, ptr, ptr }
%class.TiXmlElement = type { %class.TiXmlNode, %class.TiXmlAttributeSet }
%class.TiXmlAttributeSet = type { %class.TiXmlAttribute }
%class.TiXmlAttribute = type { %class.TiXmlBase, ptr, %class.TiXmlString, %class.TiXmlString, ptr, ptr }

@.str.23 = 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 @_ZN9TiXmlBase8ReadNameEPKcP11TiXmlString13TiXmlEncoding(ptr noundef, ptr noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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(109), 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 @_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
define dso_local noundef ptr @_ZN12TiXmlElement5ParseEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(144) %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.TiXmlString, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %18 = load ptr, ptr %6, align 8
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %19, i32 noundef %20)
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %22 = call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
  store ptr %22, ptr %10, align 8, !tbaa !5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %29

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

88:                                               ; preds = %85
  br label %89

89:                                               ; preds = %321, %88
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %96

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

96:                                               ; preds = %92, %89
  %97 = phi i1 [ false, %89 ], [ %95, %92 ]
  br i1 %97, label %98, label %322

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

103:                                              ; preds = %98
  store ptr %102, ptr %7, align 8, !tbaa !5
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %110

106:                                              ; preds = %103
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = icmp ne i8 %108, 0
  br i1 %109, label %124, label %110

110:                                              ; preds = %106, %103
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %123

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

118:                                              ; preds = %113
  br label %123

119:                                              ; preds = %222, %212, %187, %185, %181, %178, %171, %154, %139, %113, %98, %85
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %14, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %15, align 4
  br label %325

123:                                              ; preds = %118, %110
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

124:                                              ; preds = %106
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = load i8, ptr %125, align 1, !tbaa !11
  %127 = sext i8 %126 to i32
  %128 = icmp eq i32 %127, 47
  br i1 %128, label %129, label %149

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

136:                                              ; preds = %129
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %145

139:                                              ; preds = %136
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %140, i32 noundef 7, ptr noundef %141, ptr noundef %142, i32 noundef %143)
          to label %144 unwind label %119

144:                                              ; preds = %139
  br label %145

145:                                              ; preds = %144, %136
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

146:                                              ; preds = %129
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds i8, ptr %147, i64 1
  store ptr %148, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

149:                                              ; preds = %124
  %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 eq i32 %152, 62
  br i1 %153, label %154, label %229

154:                                              ; preds = %149
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i32 1
  store ptr %156, ptr %7, align 8, !tbaa !5
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = invoke noundef ptr @_ZN12TiXmlElement9ReadValueEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(144) %18, ptr noundef %157, ptr noundef %158, i32 noundef %159)
          to label %161 unwind label %119

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

164:                                              ; preds = %161
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = load i8, ptr %165, align 1, !tbaa !11
  %167 = icmp ne i8 %166, 0
  br i1 %167, label %178, label %168

168:                                              ; preds = %164, %161
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = icmp ne ptr %169, null
  br i1 %170, label %171, label %177

171:                                              ; preds = %168
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = load ptr, ptr %7, align 8, !tbaa !5
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %172, i32 noundef 8, ptr noundef %173, ptr noundef %174, i32 noundef %175)
          to label %176 unwind label %119

176:                                              ; preds = %171
  br label %177

177:                                              ; preds = %176, %168
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

178:                                              ; preds = %164
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = invoke noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %181 unwind label %119

181:                                              ; preds = %178
  %182 = load i32, ptr %9, align 4, !tbaa !9
  %183 = invoke noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef %179, ptr noundef %180, i1 noundef zeroext false, i32 noundef %182)
          to label %184 unwind label %119

184:                                              ; preds = %181
  br i1 %183, label %185, label %219

185:                                              ; preds = %184
  %186 = invoke noundef i64 @_ZNK11TiXmlString6lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %187 unwind label %119

187:                                              ; preds = %185
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = getelementptr inbounds i8, ptr %188, i64 %186
  store ptr %189, ptr %7, align 8, !tbaa !5
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = load i32, ptr %9, align 4, !tbaa !9
  %192 = invoke noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %190, i32 noundef %191)
          to label %193 unwind label %119

193:                                              ; preds = %187
  store ptr %192, ptr %7, align 8, !tbaa !5
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %209

196:                                              ; preds = %193
  %197 = load ptr, ptr %7, align 8, !tbaa !5
  %198 = load i8, ptr %197, align 1, !tbaa !11
  %199 = icmp ne i8 %198, 0
  br i1 %199, label %200, label %209

200:                                              ; preds = %196
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = load i8, ptr %201, align 1, !tbaa !11
  %203 = sext i8 %202 to i32
  %204 = icmp eq i32 %203, 62
  br i1 %204, label %205, label %209

205:                                              ; preds = %200
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = getelementptr inbounds i8, ptr %206, i32 1
  store ptr %207, ptr %7, align 8, !tbaa !5
  %208 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %208, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

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

212:                                              ; preds = %209
  %213 = load ptr, ptr %10, align 8, !tbaa !5
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %213, i32 noundef 8, ptr noundef %214, ptr noundef %215, i32 noundef %216)
          to label %217 unwind label %119

217:                                              ; preds = %212
  br label %218

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

219:                                              ; preds = %184
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = icmp ne ptr %220, null
  br i1 %221, label %222, label %228

222:                                              ; preds = %219
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  %224 = load ptr, ptr %7, align 8, !tbaa !5
  %225 = load ptr, ptr %8, align 8, !tbaa !5
  %226 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %223, i32 noundef 8, ptr noundef %224, ptr noundef %225, i32 noundef %226)
          to label %227 unwind label %119

227:                                              ; preds = %222
  br label %228

228:                                              ; preds = %227, %219
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

229:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %230 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #8
          to label %231 unwind label %236

231:                                              ; preds = %229
  invoke void @_ZN14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %230)
          to label %232 unwind label %240

232:                                              ; preds = %231
  store ptr %230, ptr %16, align 8, !tbaa !5
  %233 = load ptr, ptr %16, align 8, !tbaa !5
  %234 = icmp ne ptr %233, null
  br i1 %234, label %244, label %235

235:                                              ; preds = %232
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %316

236:                                              ; preds = %267, %247, %244, %229
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %14, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %15, align 4
  br label %319

240:                                              ; preds = %231
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %14, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %230, i64 noundef 64) #9
  br label %319

244:                                              ; preds = %232
  %245 = load ptr, ptr %16, align 8, !tbaa !5
  %246 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN14TiXmlAttribute11SetDocumentEP13TiXmlDocument(ptr noundef nonnull align 8 dereferenceable(64) %245, ptr noundef %246)
          to label %247 unwind label %236

247:                                              ; preds = %244
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %248, ptr %12, align 8, !tbaa !5
  %249 = load ptr, ptr %16, align 8, !tbaa !5
  %250 = load ptr, ptr %7, align 8, !tbaa !5
  %251 = load ptr, ptr %8, align 8, !tbaa !5
  %252 = load i32, ptr %9, align 4, !tbaa !9
  %253 = load ptr, ptr %249, align 8, !tbaa !15
  %254 = getelementptr inbounds ptr, ptr %253, i64 3
  %255 = load ptr, ptr %254, align 8
  %256 = invoke noundef ptr %255(ptr noundef nonnull align 8 dereferenceable(64) %249, ptr noundef %250, ptr noundef %251, i32 noundef %252)
          to label %257 unwind label %236

257:                                              ; preds = %247
  store ptr %256, ptr %7, align 8, !tbaa !5
  %258 = load ptr, ptr %7, align 8, !tbaa !5
  %259 = icmp ne ptr %258, null
  br i1 %259, label %260, label %264

260:                                              ; preds = %257
  %261 = load ptr, ptr %7, align 8, !tbaa !5
  %262 = load i8, ptr %261, align 1, !tbaa !11
  %263 = icmp ne i8 %262, 0
  br i1 %263, label %281, label %264

264:                                              ; preds = %260, %257
  %265 = load ptr, ptr %10, align 8, !tbaa !5
  %266 = icmp ne ptr %265, null
  br i1 %266, label %267, label %273

267:                                              ; preds = %264
  %268 = load ptr, ptr %10, align 8, !tbaa !5
  %269 = load ptr, ptr %12, align 8, !tbaa !5
  %270 = load ptr, ptr %8, align 8, !tbaa !5
  %271 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %268, i32 noundef 3, ptr noundef %269, ptr noundef %270, i32 noundef %271)
          to label %272 unwind label %236

272:                                              ; preds = %267
  br label %273

273:                                              ; preds = %272, %264
  %274 = load ptr, ptr %16, align 8, !tbaa !5
  %275 = icmp eq ptr %274, null
  br i1 %275, label %280, label %276

276:                                              ; preds = %273
  %277 = load ptr, ptr %274, align 8, !tbaa !15
  %278 = getelementptr inbounds ptr, ptr %277, i64 1
  %279 = load ptr, ptr %278, align 8
  call void %279(ptr noundef nonnull align 8 dereferenceable(64) %274) #7
  br label %280

280:                                              ; preds = %276, %273
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %316

281:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %282 = getelementptr inbounds %class.TiXmlElement, ptr %18, i32 0, i32 1
  %283 = load ptr, ptr %16, align 8, !tbaa !5
  %284 = invoke noundef ptr @_ZNK14TiXmlAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(64) %283)
          to label %285 unwind label %299

285:                                              ; preds = %281
  %286 = invoke noundef ptr @_ZNK17TiXmlAttributeSet4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64) %282, ptr noundef %284)
          to label %287 unwind label %299

287:                                              ; preds = %285
  store ptr %286, ptr %17, align 8, !tbaa !5
  %288 = load ptr, ptr %17, align 8, !tbaa !5
  %289 = icmp ne ptr %288, null
  br i1 %289, label %290, label %311

290:                                              ; preds = %287
  %291 = load ptr, ptr %10, align 8, !tbaa !5
  %292 = icmp ne ptr %291, null
  br i1 %292, label %293, label %303

293:                                              ; preds = %290
  %294 = load ptr, ptr %10, align 8, !tbaa !5
  %295 = load ptr, ptr %12, align 8, !tbaa !5
  %296 = load ptr, ptr %8, align 8, !tbaa !5
  %297 = load i32, ptr %9, align 4, !tbaa !9
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %294, i32 noundef 3, ptr noundef %295, ptr noundef %296, i32 noundef %297)
          to label %298 unwind label %299

298:                                              ; preds = %293
  br label %303

299:                                              ; preds = %311, %293, %285, %281
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %14, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %319

303:                                              ; preds = %298, %290
  %304 = load ptr, ptr %16, align 8, !tbaa !5
  %305 = icmp eq ptr %304, null
  br i1 %305, label %310, label %306

306:                                              ; preds = %303
  %307 = load ptr, ptr %304, align 8, !tbaa !15
  %308 = getelementptr inbounds ptr, ptr %307, i64 1
  %309 = load ptr, ptr %308, align 8
  call void %309(ptr noundef nonnull align 8 dereferenceable(64) %304) #7
  br label %310

310:                                              ; preds = %306, %303
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %315

311:                                              ; preds = %287
  %312 = getelementptr inbounds %class.TiXmlElement, ptr %18, i32 0, i32 1
  %313 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN17TiXmlAttributeSet3AddEP14TiXmlAttribute(ptr noundef nonnull align 8 dereferenceable(64) %312, ptr noundef %313)
          to label %314 unwind label %299

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

315:                                              ; preds = %314, %310
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %316

316:                                              ; preds = %315, %280, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %317 = load i32, ptr %11, align 4
  switch i32 %317, label %324 [
    i32 0, label %318
  ]

318:                                              ; preds = %316
  br label %320

319:                                              ; preds = %299, %240, %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %325

320:                                              ; preds = %318
  br label %321

321:                                              ; preds = %320
  br label %89, !llvm.loop !17

322:                                              ; preds = %96
  %323 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %323, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %324

324:                                              ; preds = %322, %316, %228, %218, %205, %177, %146, %145, %123
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %326

325:                                              ; preds = %319, %119
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, 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 %329

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

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

329:                                              ; preds = %325
  %330 = load ptr, ptr %14, align 8
  %331 = load i32, ptr %15, align 4
  %332 = insertvalue { ptr, i32 } poison, ptr %330, 0
  %333 = insertvalue { ptr, i32 } %332, i32 %331, 1
  resume { ptr, i32 } %333
}

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

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

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

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

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

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

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

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

declare noundef ptr @_ZNK17TiXmlAttributeSet4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #6

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

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

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

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

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

@.str.23 = 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 @_ZN9TiXmlBase8ReadNameEPKcP11TiXmlString13TiXmlEncoding(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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(109), 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 @_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
define dso_local noundef ptr @_ZN12TiXmlElement5ParseEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.TiXmlString, align 8
  %6 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %1, i32 noundef %3)
  %7 = tail call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %10, label %8

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

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

11:                                               ; preds = %10
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef 3, ptr noundef null, ptr noundef null, i32 noundef %3)
  br label %103

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

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

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

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

20:                                               ; preds = %19
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef 3, ptr noundef nonnull %6, ptr noundef %2, i32 noundef %3)
  br label %103

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

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

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

29:                                               ; preds = %28
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef 4, ptr noundef %23, ptr noundef %2, i32 noundef %3)
  br label %103

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

.preheader:                                       ; preds = %30
  %32 = getelementptr inbounds i8, ptr %0, i64 80
  br label %33

33:                                               ; preds = %.preheader, %101
  %.0113 = phi ptr [ %81, %101 ], [ %25, %.preheader ]
  %34 = load i8, ptr %.0113, align 1, !tbaa !5
  %.not145 = icmp eq i8 %34, 0
  br i1 %.not145, label %.critedge, label %35

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

37:                                               ; preds = %35
  %.not146 = icmp eq ptr %36, null
  br i1 %.not146, label %40, label %38

38:                                               ; preds = %37
  %39 = load i8, ptr %36, align 1, !tbaa !5
  switch i8 %39, label %72 [
    i8 0, label %40
    i8 47, label %43
    i8 62, label %49
  ]

40:                                               ; preds = %38, %37
  %.not148 = icmp eq ptr %7, null
  br i1 %.not148, label %.critedge, label %.invoke

.invoke:                                          ; preds = %40, %71, %46
  %41 = phi i32 [ 7, %46 ], [ 8, %71 ], [ 6, %40 ]
  %42 = phi ptr [ %44, %46 ], [ %51, %71 ], [ %.0113, %40 ]
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef %41, ptr noundef nonnull %42, ptr noundef %2, i32 noundef %3)
          to label %.critedge unwind label %.loopexit.split-lp

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

.loopexit.split-lp:                               ; preds = %.invoke240, %.invoke, %30, %49, %57, %61
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %102

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %36, i64 1
  %45 = load i8, ptr %44, align 1, !tbaa !5
  %.not162 = icmp eq i8 %45, 62
  br i1 %.not162, label %47, label %46

46:                                               ; preds = %43
  %.not163 = icmp eq ptr %7, null
  br i1 %.not163, label %.critedge, label %.invoke

47:                                               ; preds = %43
  %48 = getelementptr inbounds i8, ptr %36, i64 2
  br label %.critedge

49:                                               ; preds = %38
  %50 = getelementptr inbounds i8, ptr %36, i64 1
  %51 = invoke noundef ptr @_ZN12TiXmlElement9ReadValueEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull %50, ptr noundef %2, i32 noundef %3)
          to label %52 unwind label %.loopexit.split-lp

52:                                               ; preds = %49
  %.not155 = icmp eq ptr %51, null
  br i1 %.not155, label %55, label %53

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

55:                                               ; preds = %53, %52
  %.not157 = icmp eq ptr %7, null
  br i1 %.not157, label %.critedge, label %.invoke240

.invoke240:                                       ; preds = %70, %55
  %56 = phi ptr [ %51, %55 ], [ %64, %70 ]
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef 8, ptr noundef %56, ptr noundef %2, i32 noundef %3)
          to label %.critedge unwind label %.loopexit.split-lp

57:                                               ; preds = %53
  %58 = call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %59 = invoke noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef nonnull %51, ptr noundef %58, i1 noundef zeroext false, i32 noundef %3)
          to label %60 unwind label %.loopexit.split-lp

60:                                               ; preds = %57
  br i1 %59, label %61, label %71

61:                                               ; preds = %60
  %62 = call noundef i64 @_ZNK11TiXmlString6lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %63 = getelementptr inbounds i8, ptr %51, i64 %62
  %64 = invoke noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef nonnull %63, i32 noundef %3)
          to label %65 unwind label %.loopexit.split-lp

65:                                               ; preds = %61
  %.not159 = icmp eq ptr %64, null
  br i1 %.not159, label %70, label %66

66:                                               ; preds = %65
  %67 = load i8, ptr %64, align 1, !tbaa !5
  %cond167 = icmp eq i8 %67, 62
  br i1 %cond167, label %68, label %70

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %64, i64 1
  br label %.critedge

70:                                               ; preds = %66, %65
  %.not161 = icmp eq ptr %7, null
  br i1 %.not161, label %.critedge, label %.invoke240

71:                                               ; preds = %60
  %.not158 = icmp eq ptr %7, null
  br i1 %.not158, label %.critedge, label %.invoke

72:                                               ; preds = %38
  %73 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #7
          to label %74 unwind label %.loopexit170

74:                                               ; preds = %72
  invoke void @_ZN14TiXmlAttributeC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %73)
          to label %77 unwind label %75

.loopexit170:                                     ; preds = %72, %77
  %lpad.loopexit172 = landingpad { ptr, i32 }
          cleanup
  br label %102

.loopexit.split-lp171:                            ; preds = %86
  %lpad.loopexit.split-lp173 = landingpad { ptr, i32 }
          cleanup
  br label %102

75:                                               ; preds = %74
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %73, i64 noundef 64) #8
  br label %102

77:                                               ; preds = %74
  call void @_ZN14TiXmlAttribute11SetDocumentEP13TiXmlDocument(ptr noundef nonnull align 8 dereferenceable(64) %73, ptr noundef %7)
  %78 = load ptr, ptr %73, align 8, !tbaa !8
  %79 = getelementptr inbounds i8, ptr %78, i64 24
  %80 = load ptr, ptr %79, align 8
  %81 = invoke noundef ptr %80(ptr noundef nonnull align 8 dereferenceable(64) %73, ptr noundef nonnull %36, ptr noundef %2, i32 noundef %3)
          to label %82 unwind label %.loopexit170

82:                                               ; preds = %77
  %.not149 = icmp eq ptr %81, null
  br i1 %.not149, label %85, label %83

83:                                               ; preds = %82
  %84 = load i8, ptr %81, align 1, !tbaa !5
  %.not150 = icmp eq i8 %84, 0
  br i1 %.not150, label %85, label %91

85:                                               ; preds = %83, %82
  %.not151 = icmp eq ptr %7, null
  br i1 %.not151, label %87, label %86

86:                                               ; preds = %85
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef 3, ptr noundef nonnull %36, ptr noundef %2, i32 noundef %3)
          to label %87 unwind label %.loopexit.split-lp171

87:                                               ; preds = %85, %86
  %88 = load ptr, ptr %73, align 8, !tbaa !8
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  %90 = load ptr, ptr %89, align 8
  call void %90(ptr noundef nonnull align 8 dereferenceable(64) %73) #6
  br label %.critedge

91:                                               ; preds = %83
  %92 = call noundef ptr @_ZNK14TiXmlAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(64) %73)
  %93 = invoke noundef ptr @_ZNK17TiXmlAttributeSet4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64) %32, ptr noundef %92)
          to label %94 unwind label %.loopexit175

94:                                               ; preds = %91
  %.not152 = icmp eq ptr %93, null
  br i1 %.not152, label %101, label %95

95:                                               ; preds = %94
  %.not153 = icmp eq ptr %7, null
  br i1 %.not153, label %97, label %96

96:                                               ; preds = %95
  invoke void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(109) %7, i32 noundef 3, ptr noundef nonnull %36, ptr noundef %2, i32 noundef %3)
          to label %97 unwind label %.loopexit.split-lp176

.loopexit175:                                     ; preds = %91, %101
  %lpad.loopexit177 = landingpad { ptr, i32 }
          cleanup
  br label %102

.loopexit.split-lp176:                            ; preds = %96
  %lpad.loopexit.split-lp178 = landingpad { ptr, i32 }
          cleanup
  br label %102

97:                                               ; preds = %95, %96
  %98 = load ptr, ptr %73, align 8, !tbaa !8
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  %100 = load ptr, ptr %99, align 8
  call void %100(ptr noundef nonnull align 8 dereferenceable(64) %73) #6
  br label %.critedge

101:                                              ; preds = %94
  invoke void @_ZN17TiXmlAttributeSet3AddEP14TiXmlAttribute(ptr noundef nonnull align 8 dereferenceable(64) %32, ptr noundef nonnull %73)
          to label %33 unwind label %.loopexit175, !llvm.loop !10

.critedge:                                        ; preds = %33, %.invoke240, %.invoke, %97, %87, %71, %70, %55, %46, %40, %68, %47
  %.3 = phi ptr [ %48, %47 ], [ %69, %68 ], [ null, %40 ], [ null, %46 ], [ null, %55 ], [ null, %70 ], [ null, %71 ], [ null, %87 ], [ null, %97 ], [ null, %.invoke ], [ null, %.invoke240 ], [ %.0113, %33 ]
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %103

102:                                              ; preds = %.loopexit175, %.loopexit.split-lp176, %.loopexit170, %.loopexit.split-lp171, %.loopexit, %.loopexit.split-lp, %75
  %.pn164 = phi { ptr, i32 } [ %76, %75 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit172, %.loopexit170 ], [ %lpad.loopexit.split-lp173, %.loopexit.split-lp171 ], [ %lpad.loopexit177, %.loopexit175 ], [ %lpad.loopexit.split-lp178, %.loopexit.split-lp176 ]
  call void @_ZN11TiXmlStringD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn164

103:                                              ; preds = %.critedge, %29, %28, %19, %20, %10, %11
  %.5 = phi ptr [ null, %11 ], [ null, %10 ], [ null, %20 ], [ null, %19 ], [ %.3, %.critedge ], [ null, %29 ], [ null, %28 ]
  ret ptr %.5
}

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

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

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

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

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

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

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

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

declare noundef ptr @_ZNK17TiXmlAttributeSet4FindEPKc(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #5

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

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

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

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

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


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