; LLVM IR from Xiangyu-Hu/SPHinXsys :: src/shared/tools/tinyxml2.ll (ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairEPi)

; 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.tinyxml2::XMLDocument::DepthTracker" = type { ptr }
%"class.tinyxml2::StrPair" = type { i32, ptr, ptr }
%"class.tinyxml2::XMLNode" = type { ptr, ptr, ptr, %"class.tinyxml2::StrPair", i32, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [19 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairEPi(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #0 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 ptr, align 8
  %10 = alloca %"class.tinyxml2::XMLDocument::DepthTracker", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.tinyxml2::StrPair", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  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 ptr %3, ptr %9, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %22 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  call void @_ZN8tinyxml211XMLDocument12DepthTrackerC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %23)
  %24 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = invoke noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(776) %25)
          to label %27 unwind label %29

27:                                               ; preds = %4
  br i1 %26, label %28, label %33

28:                                               ; preds = %27
  store ptr null, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %278

29:                                               ; preds = %4
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %11, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %12, align 4
  br label %280

33:                                               ; preds = %27
  br label %34

34:                                               ; preds = %271, %33
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %41

37:                                               ; preds = %34
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = icmp ne i8 %39, 0
  br label %41

41:                                               ; preds = %37, %34
  %42 = phi i1 [ false, %34 ], [ %40, %37 ]
  br i1 %42, label %43, label %277

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store ptr null, ptr %14, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = invoke noundef ptr @_ZN8tinyxml211XMLDocument8IdentifyEPcPPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %45, ptr noundef %46, ptr noundef %14)
          to label %48 unwind label %55

48:                                               ; preds = %43
  store ptr %47, ptr %7, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %59

54:                                               ; preds = %51
  store i32 3, ptr %13, align 4
  br label %269

55:                                               ; preds = %43
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %11, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %12, align 4
  br label %276

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %60, i32 0, i32 4
  %62 = load i32, ptr %61, align 8, !tbaa !14
  store i32 %62, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  invoke void @_ZN8tinyxml27StrPairC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %63 unwind label %88

63:                                               ; preds = %59
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load ptr, ptr %64, align 8, !tbaa !16
  %68 = getelementptr inbounds ptr, ptr %67, i64 17
  %69 = load ptr, ptr %68, align 8
  %70 = invoke noundef ptr %69(ptr noundef nonnull align 8 dereferenceable(104) %64, ptr noundef %65, ptr noundef %16, ptr noundef %66)
          to label %71 unwind label %92

71:                                               ; preds = %63
  store ptr %70, ptr %7, align 8, !tbaa !5
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br i1 %73, label %97, label %74

74:                                               ; preds = %71
  %75 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN8tinyxml211XMLDocument10DeleteNodeEPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %76, ptr noundef %77)
          to label %78 unwind label %92

78:                                               ; preds = %74
  %79 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = invoke noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(776) %80)
          to label %82 unwind label %92

82:                                               ; preds = %78
  br i1 %81, label %96, label %83

83:                                               ; preds = %82
  %84 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = load i32, ptr %15, align 4, !tbaa !15
  invoke void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %85, i32 noundef 15, i32 noundef %86, ptr noundef null)
          to label %87 unwind label %92

87:                                               ; preds = %83
  br label %96

88:                                               ; preds = %59
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %11, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %12, align 4
  br label %275

92:                                               ; preds = %83, %78, %74, %63
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  br label %274

96:                                               ; preds = %87, %82
  store i32 3, ptr %13, align 4
  br label %268

97:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  %100 = getelementptr inbounds ptr, ptr %99, i64 4
  %101 = load ptr, ptr %100, align 8
  %102 = invoke noundef ptr %101(ptr noundef nonnull align 8 dereferenceable(104) %98)
          to label %103 unwind label %146

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

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  store i8 0, ptr %18, align 1, !tbaa !18
  %107 = load ptr, ptr %21, align 8, !tbaa !16
  %108 = getelementptr inbounds ptr, ptr %107, i64 3
  %109 = load ptr, ptr %108, align 8
  %110 = invoke noundef ptr %109(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %111 unwind label %150

111:                                              ; preds = %106
  %112 = icmp ne ptr %110, null
  br i1 %112, label %113, label %156

113:                                              ; preds = %111
  %114 = invoke noundef ptr @_ZN8tinyxml27XMLNode10FirstChildEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %115 unwind label %150

115:                                              ; preds = %113
  %116 = icmp ne ptr %114, null
  br i1 %116, label %117, label %154

117:                                              ; preds = %115
  %118 = invoke noundef ptr @_ZN8tinyxml27XMLNode10FirstChildEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %119 unwind label %150

119:                                              ; preds = %117
  %120 = icmp ne ptr %118, null
  br i1 %120, label %121, label %143

121:                                              ; preds = %119
  %122 = invoke noundef ptr @_ZN8tinyxml27XMLNode10FirstChildEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %123 unwind label %150

123:                                              ; preds = %121
  %124 = load ptr, ptr %122, align 8, !tbaa !16
  %125 = getelementptr inbounds ptr, ptr %124, i64 4
  %126 = load ptr, ptr %125, align 8
  %127 = invoke noundef ptr %126(ptr noundef nonnull align 8 dereferenceable(104) %122)
          to label %128 unwind label %150

128:                                              ; preds = %123
  %129 = icmp ne ptr %127, null
  br i1 %129, label %130, label %143

130:                                              ; preds = %128
  %131 = invoke noundef ptr @_ZN8tinyxml27XMLNode9LastChildEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %132 unwind label %150

132:                                              ; preds = %130
  %133 = icmp ne ptr %131, null
  br i1 %133, label %134, label %143

134:                                              ; preds = %132
  %135 = invoke noundef ptr @_ZN8tinyxml27XMLNode9LastChildEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %136 unwind label %150

136:                                              ; preds = %134
  %137 = load ptr, ptr %135, align 8, !tbaa !16
  %138 = getelementptr inbounds ptr, ptr %137, i64 4
  %139 = load ptr, ptr %138, align 8
  %140 = invoke noundef ptr %139(ptr noundef nonnull align 8 dereferenceable(104) %135)
          to label %141 unwind label %150

141:                                              ; preds = %136
  %142 = icmp ne ptr %140, null
  br label %143

143:                                              ; preds = %141, %132, %128, %119
  %144 = phi i1 [ false, %132 ], [ false, %128 ], [ false, %119 ], [ %142, %141 ]
  %145 = zext i1 %144 to i8
  store i8 %145, ptr %18, align 1, !tbaa !18
  br label %155

146:                                              ; preds = %97
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %11, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %12, align 4
  br label %273

150:                                              ; preds = %166, %165, %159, %136, %134, %130, %123, %121, %117, %113, %106
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %11, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  br label %273

154:                                              ; preds = %115
  store i8 1, ptr %18, align 1, !tbaa !18
  br label %155

155:                                              ; preds = %154, %143
  br label %156

156:                                              ; preds = %155, %111
  %157 = load i8, ptr %18, align 1, !tbaa !18, !range !20, !noundef !21
  %158 = trunc i8 %157 to i1
  br i1 %158, label %171, label %159

159:                                              ; preds = %156
  %160 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  %162 = load i32, ptr %15, align 4, !tbaa !15
  %163 = load ptr, ptr %17, align 8, !tbaa !5
  %164 = invoke noundef ptr @_ZNK8tinyxml27XMLNode5ValueEv(ptr noundef nonnull align 8 dereferenceable(104) %163)
          to label %165 unwind label %150

165:                                              ; preds = %159
  invoke void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %161, i32 noundef 11, i32 noundef %162, ptr noundef @.str.22, ptr noundef %164)
          to label %166 unwind label %150

166:                                              ; preds = %165
  %167 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN8tinyxml211XMLDocument10DeleteNodeEPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %168, ptr noundef %169)
          to label %170 unwind label %150

170:                                              ; preds = %166
  store i32 3, ptr %13, align 4
  br label %172

171:                                              ; preds = %156
  store i32 0, ptr %13, align 4
  br label %172

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

174:                                              ; preds = %172
  br label %175

175:                                              ; preds = %174, %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = getelementptr inbounds ptr, ptr %177, i64 0
  %179 = load ptr, ptr %178, align 8
  %180 = invoke noundef ptr %179(ptr noundef nonnull align 8 dereferenceable(104) %176)
          to label %181 unwind label %197

181:                                              ; preds = %175
  store ptr %180, ptr %19, align 8, !tbaa !5
  %182 = load ptr, ptr %19, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %262

184:                                              ; preds = %181
  %185 = load ptr, ptr %19, align 8, !tbaa !5
  %186 = invoke noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(120) %185)
          to label %187 unwind label %197

187:                                              ; preds = %184
  %188 = icmp eq i32 %186, 2
  br i1 %188, label %189, label %212

189:                                              ; preds = %187
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %201

192:                                              ; preds = %189
  %193 = load ptr, ptr %19, align 8, !tbaa !5
  %194 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %193, i32 0, i32 3
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27StrPair10TransferToEPS0_(ptr noundef nonnull align 8 dereferenceable(24) %194, ptr noundef %195)
          to label %196 unwind label %197

196:                                              ; preds = %192
  br label %201

197:                                              ; preds = %262, %208, %201, %192, %184, %175
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %11, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %12, align 4
  br label %272

201:                                              ; preds = %196, %189
  %202 = load ptr, ptr %14, align 8, !tbaa !5
  %203 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %202, i32 0, i32 10
  %204 = load ptr, ptr %203, align 8, !tbaa !22
  %205 = load ptr, ptr %204, align 8, !tbaa !16
  %206 = getelementptr inbounds ptr, ptr %205, i64 5
  %207 = load ptr, ptr %206, align 8
  invoke void %207(ptr noundef nonnull align 8 dereferenceable(8) %204)
          to label %208 unwind label %197

208:                                              ; preds = %201
  %209 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %209)
          to label %210 unwind label %197

210:                                              ; preds = %208
  %211 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %211, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %266

212:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  store i8 0, ptr %20, align 1, !tbaa !18
  %213 = invoke noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %214 unwind label %221

214:                                              ; preds = %212
  br i1 %213, label %215, label %226

215:                                              ; preds = %214
  %216 = load ptr, ptr %19, align 8, !tbaa !5
  %217 = invoke noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(120) %216)
          to label %218 unwind label %221

218:                                              ; preds = %215
  %219 = icmp eq i32 %217, 0
  br i1 %219, label %220, label %225

220:                                              ; preds = %218
  store i8 1, ptr %20, align 1, !tbaa !18
  br label %225

221:                                              ; preds = %253, %252, %246, %237, %234, %232, %226, %215, %212
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %11, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  br label %272

225:                                              ; preds = %220, %218
  br label %243

226:                                              ; preds = %214
  %227 = load ptr, ptr %19, align 8, !tbaa !5
  %228 = invoke noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(120) %227)
          to label %229 unwind label %221

229:                                              ; preds = %226
  %230 = icmp ne i32 %228, 0
  br i1 %230, label %231, label %232

231:                                              ; preds = %229
  store i8 1, ptr %20, align 1, !tbaa !18
  br label %242

232:                                              ; preds = %229
  %233 = invoke noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %234 unwind label %221

234:                                              ; preds = %232
  %235 = load ptr, ptr %19, align 8, !tbaa !5
  %236 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %235)
          to label %237 unwind label %221

237:                                              ; preds = %234
  %238 = invoke noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %233, ptr noundef %236, i32 noundef 2147483647)
          to label %239 unwind label %221

239:                                              ; preds = %237
  br i1 %238, label %241, label %240

240:                                              ; preds = %239
  store i8 1, ptr %20, align 1, !tbaa !18
  br label %241

241:                                              ; preds = %240, %239
  br label %242

242:                                              ; preds = %241, %231
  br label %243

243:                                              ; preds = %242, %225
  %244 = load i8, ptr %20, align 1, !tbaa !18, !range !20, !noundef !21
  %245 = trunc i8 %244 to i1
  br i1 %245, label %246, label %258

246:                                              ; preds = %243
  %247 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %248 = load ptr, ptr %247, align 8, !tbaa !9
  %249 = load i32, ptr %15, align 4, !tbaa !15
  %250 = load ptr, ptr %19, align 8, !tbaa !5
  %251 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %250)
          to label %252 unwind label %221

252:                                              ; preds = %246
  invoke void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %248, i32 noundef 14, i32 noundef %249, ptr noundef @.str.23, ptr noundef %251)
          to label %253 unwind label %221

253:                                              ; preds = %252
  %254 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %21, i32 0, i32 1
  %255 = load ptr, ptr %254, align 8, !tbaa !9
  %256 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN8tinyxml211XMLDocument10DeleteNodeEPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %255, ptr noundef %256)
          to label %257 unwind label %221

257:                                              ; preds = %253
  store i32 3, ptr %13, align 4
  br label %259

258:                                              ; preds = %243
  store i32 0, ptr %13, align 4
  br label %259

259:                                              ; preds = %258, %257
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  %260 = load i32, ptr %13, align 4
  switch i32 %260, label %266 [
    i32 0, label %261
  ]

261:                                              ; preds = %259
  br label %262

262:                                              ; preds = %261, %181
  %263 = load ptr, ptr %14, align 8, !tbaa !5
  %264 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %21, ptr noundef %263)
          to label %265 unwind label %197

265:                                              ; preds = %262
  store i32 0, ptr %13, align 4
  br label %266

266:                                              ; preds = %265, %259, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %267

267:                                              ; preds = %266, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %268

268:                                              ; preds = %267, %96
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %269

269:                                              ; preds = %268, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %270 = load i32, ptr %13, align 4
  switch i32 %270, label %278 [
    i32 0, label %271
    i32 3, label %277
  ]

271:                                              ; preds = %269
  br label %34, !llvm.loop !23

272:                                              ; preds = %221, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %273

273:                                              ; preds = %272, %150, %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %274

274:                                              ; preds = %273, %92
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  br label %275

275:                                              ; preds = %274, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %276

276:                                              ; preds = %275, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %280

277:                                              ; preds = %269, %41
  store ptr null, ptr %5, align 8
  store i32 1, ptr %13, align 4
  br label %278

278:                                              ; preds = %277, %269, %28
  call void @_ZN8tinyxml211XMLDocument12DepthTrackerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %279 = load ptr, ptr %5, align 8
  ret ptr %279

280:                                              ; preds = %276, %29
  call void @_ZN8tinyxml211XMLDocument12DepthTrackerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %281

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(776)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776), i32 noundef, i32 noundef, ptr noundef, ...) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120)) #0 align 2

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

declare void @_ZN8tinyxml27StrPairD1Ev(ptr)

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !6, i64 8}
!10 = !{!"_ZTSN8tinyxml27XMLNodeE", !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!11 = !{!"_ZTSN8tinyxml27StrPairE", !12, i64 0, !6, i64 8, !6, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!10, !12, i64 48}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!10, !6, i64 96}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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

%"class.tinyxml2::XMLDocument::DepthTracker" = type { ptr }
%"class.tinyxml2::StrPair" = type { i32, ptr, ptr }

@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [19 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairEPi(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.tinyxml2::XMLDocument::DepthTracker", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.tinyxml2::StrPair", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN8tinyxml211XMLDocument12DepthTrackerC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %9)
  %10 = load ptr, ptr %8, align 8, !tbaa !5
  %11 = call noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(776) %10)
  %.not138 = icmp eq ptr %1, null
  %or.cond = or i1 %11, %.not138
  br i1 %or.cond, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %12 = load i8, ptr %1, align 1, !tbaa !12
  %.not53216 = icmp eq i8 %12, 0
  br i1 %.not53216, label %.critedge, label %.lr.ph218

.lr.ph218:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %.032139217 = phi ptr [ %27, %.lr.ph ], [ %1, %.lr.ph.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store ptr null, ptr %6, align 8, !tbaa !13
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  %14 = invoke noundef ptr @_ZN8tinyxml211XMLDocument8IdentifyEPcPPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %13, ptr noundef nonnull %.032139217, ptr noundef nonnull %6)
          to label %15 unwind label %18

15:                                               ; preds = %.lr.ph218
  %16 = load ptr, ptr %6, align 8, !tbaa !13
  %17 = icmp eq ptr %16, null
  br i1 %17, label %.thread86, label %20

.thread86:                                        ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %.critedge

18:                                               ; preds = %.lr.ph218
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %120

20:                                               ; preds = %15
  %21 = getelementptr inbounds i8, ptr %16, i64 48
  %22 = load i32, ptr %21, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @_ZN8tinyxml27StrPairC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %23 = load ptr, ptr %6, align 8, !tbaa !13
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %24, i64 136
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef ptr %26(ptr noundef nonnull align 8 dereferenceable(104) %23, ptr noundef %14, ptr noundef nonnull %7, ptr noundef %3)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %20
  %.not54 = icmp eq ptr %27, null
  br i1 %.not54, label %29, label %37

29:                                               ; preds = %28
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = load ptr, ptr %6, align 8, !tbaa !13
  invoke void @_ZN8tinyxml211XMLDocument10DeleteNodeEPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %30, ptr noundef %31)
          to label %32 unwind label %.loopexit.split-lp

32:                                               ; preds = %29
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(776) %33)
  br i1 %34, label %.thread91, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %36, i32 noundef 15, i32 noundef %22, ptr noundef null)
          to label %.thread91 unwind label %.loopexit.split-lp

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

.loopexit.split-lp:                               ; preds = %29, %35
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %119

37:                                               ; preds = %28
  %38 = load ptr, ptr %6, align 8, !tbaa !13
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  %41 = load ptr, ptr %40, align 8
  %42 = invoke noundef ptr %41(ptr noundef nonnull align 8 dereferenceable(104) %38)
          to label %43 unwind label %69

43:                                               ; preds = %37
  %.not55 = icmp eq ptr %42, null
  br i1 %.not55, label %.thread75, label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr %0, align 8, !tbaa !15
  %46 = getelementptr inbounds i8, ptr %45, i64 24
  %47 = load ptr, ptr %46, align 8
  %48 = invoke noundef ptr %47(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %49 unwind label %.loopexit98

49:                                               ; preds = %44
  %.not56 = icmp eq ptr %48, null
  br i1 %.not56, label %.thread, label %50

50:                                               ; preds = %49
  %51 = call noundef ptr @_ZN8tinyxml27XMLNode10FirstChildEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not57 = icmp eq ptr %51, null
  br i1 %.not57, label %.thread75, label %52

52:                                               ; preds = %50
  %53 = call noundef ptr @_ZN8tinyxml27XMLNode10FirstChildEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not58 = icmp eq ptr %53, null
  br i1 %.not58, label %.thread, label %54

54:                                               ; preds = %52
  %55 = call noundef ptr @_ZN8tinyxml27XMLNode10FirstChildEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = getelementptr inbounds i8, ptr %56, i64 32
  %58 = load ptr, ptr %57, align 8
  %59 = invoke noundef ptr %58(ptr noundef nonnull align 8 dereferenceable(104) %55)
          to label %60 unwind label %.loopexit98

60:                                               ; preds = %54
  %.not59 = icmp eq ptr %59, null
  br i1 %.not59, label %.thread, label %61

61:                                               ; preds = %60
  %62 = call noundef ptr @_ZN8tinyxml27XMLNode9LastChildEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not60 = icmp eq ptr %62, null
  br i1 %.not60, label %.thread, label %63

63:                                               ; preds = %61
  %64 = call noundef ptr @_ZN8tinyxml27XMLNode9LastChildEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds i8, ptr %65, i64 32
  %67 = load ptr, ptr %66, align 8
  %68 = invoke noundef ptr %67(ptr noundef nonnull align 8 dereferenceable(104) %64)
          to label %71 unwind label %.loopexit98

69:                                               ; preds = %37
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %119

.loopexit98:                                      ; preds = %44, %54, %63
  %lpad.loopexit100 = landingpad { ptr, i32 }
          cleanup
  br label %119

.loopexit.split-lp99:                             ; preds = %.thread, %74, %75
  %lpad.loopexit.split-lp101 = landingpad { ptr, i32 }
          cleanup
  br label %119

71:                                               ; preds = %63
  %.not97 = icmp eq ptr %68, null
  br i1 %.not97, label %.thread, label %.thread75

.thread:                                          ; preds = %52, %60, %61, %49, %71
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = invoke noundef ptr @_ZNK8tinyxml27XMLNode5ValueEv(ptr noundef nonnull align 8 dereferenceable(104) %42)
          to label %74 unwind label %.loopexit.split-lp99

74:                                               ; preds = %.thread
  invoke void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %72, i32 noundef 11, i32 noundef %22, ptr noundef nonnull @.str.22, ptr noundef %73)
          to label %75 unwind label %.loopexit.split-lp99

75:                                               ; preds = %74
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !13
  invoke void @_ZN8tinyxml211XMLDocument10DeleteNodeEPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %76, ptr noundef %77)
          to label %.thread91 unwind label %.loopexit.split-lp99

.thread75:                                        ; preds = %50, %71, %43
  %78 = load ptr, ptr %6, align 8, !tbaa !13
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  %80 = load ptr, ptr %79, align 8
  %81 = invoke noundef ptr %80(ptr noundef nonnull align 8 dereferenceable(104) %78)
          to label %82 unwind label %.loopexit103

82:                                               ; preds = %.thread75
  %.not61 = icmp eq ptr %81, null
  br i1 %.not61, label %.thread83, label %83

83:                                               ; preds = %82
  %84 = call noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(120) %81)
  %85 = icmp eq i32 %84, 2
  br i1 %85, label %86, label %98

86:                                               ; preds = %83
  %.not63 = icmp eq ptr %2, null
  br i1 %.not63, label %89, label %87

87:                                               ; preds = %86
  %88 = getelementptr inbounds i8, ptr %81, i64 24
  invoke void @_ZN8tinyxml27StrPair10TransferToEPS0_(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull %2)
          to label %89 unwind label %.loopexit.split-lp104

.loopexit103:                                     ; preds = %.thread75, %.thread83
  %lpad.loopexit105 = landingpad { ptr, i32 }
          cleanup
  br label %119

.loopexit.split-lp104:                            ; preds = %87, %89, %96
  %lpad.loopexit.split-lp106 = landingpad { ptr, i32 }
          cleanup
  br label %119

89:                                               ; preds = %87, %86
  %90 = load ptr, ptr %6, align 8, !tbaa !13
  %91 = getelementptr inbounds i8, ptr %90, i64 96
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = getelementptr inbounds i8, ptr %93, i64 40
  %95 = load ptr, ptr %94, align 8
  invoke void %95(ptr noundef nonnull align 8 dereferenceable(8) %92)
          to label %96 unwind label %.loopexit.split-lp104

96:                                               ; preds = %89
  %97 = load ptr, ptr %6, align 8, !tbaa !13
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %97)
          to label %.thread94 unwind label %.loopexit.split-lp104

.thread94:                                        ; preds = %96
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %.critedge

98:                                               ; preds = %83
  %99 = call noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %100 = call noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(120) %81)
  %101 = icmp eq i32 %100, 0
  br i1 %99, label %102, label %103

102:                                              ; preds = %98
  br i1 %101, label %.thread78, label %.thread83

.loopexit108:                                     ; preds = %104, %106
  %lpad.loopexit110 = landingpad { ptr, i32 }
          cleanup
  br label %119

.loopexit.split-lp109:                            ; preds = %.thread78, %112, %113
  %lpad.loopexit.split-lp111 = landingpad { ptr, i32 }
          cleanup
  br label %119

103:                                              ; preds = %98
  br i1 %101, label %104, label %.thread78

104:                                              ; preds = %103
  %105 = invoke noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %106 unwind label %.loopexit108

106:                                              ; preds = %104
  %107 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %81)
          to label %108 unwind label %.loopexit108

108:                                              ; preds = %106
  %109 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %105, ptr noundef %107, i32 noundef 2147483647)
  br i1 %109, label %.thread83, label %.thread78

.thread78:                                        ; preds = %103, %102, %108
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %81)
          to label %112 unwind label %.loopexit.split-lp109

112:                                              ; preds = %.thread78
  invoke void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %110, i32 noundef 14, i32 noundef %22, ptr noundef nonnull @.str.23, ptr noundef %111)
          to label %113 unwind label %.loopexit.split-lp109

113:                                              ; preds = %112
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = load ptr, ptr %6, align 8, !tbaa !13
  invoke void @_ZN8tinyxml211XMLDocument10DeleteNodeEPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(776) %114, ptr noundef %115)
          to label %.thread91 unwind label %.loopexit.split-lp109

.thread83:                                        ; preds = %102, %108, %82
  %116 = load ptr, ptr %6, align 8, !tbaa !13
  %117 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %116)
          to label %.lr.ph unwind label %.loopexit103

.thread91:                                        ; preds = %35, %32, %75, %113
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %.critedge

.lr.ph:                                           ; preds = %.thread83
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %118 = load i8, ptr %27, align 1, !tbaa !12
  %.not53 = icmp eq i8 %118, 0
  br i1 %.not53, label %.critedge, label %.lr.ph218

119:                                              ; preds = %.loopexit108, %.loopexit.split-lp109, %.loopexit103, %.loopexit.split-lp104, %.loopexit98, %.loopexit.split-lp99, %.loopexit, %.loopexit.split-lp, %69
  %.pn.pn.pn = phi { ptr, i32 } [ %70, %69 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit100, %.loopexit98 ], [ %lpad.loopexit.split-lp101, %.loopexit.split-lp99 ], [ %lpad.loopexit105, %.loopexit103 ], [ %lpad.loopexit.split-lp106, %.loopexit.split-lp104 ], [ %lpad.loopexit110, %.loopexit108 ], [ %lpad.loopexit.split-lp111, %.loopexit.split-lp109 ]
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %120

120:                                              ; preds = %119, %18
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %119 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN8tinyxml211XMLDocument12DepthTrackerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  resume { ptr, i32 } %.pn.pn.pn.pn

.critedge:                                        ; preds = %.lr.ph, %.lr.ph.preheader, %.thread86, %.thread91, %.thread94, %4
  %.5 = phi ptr [ null, %4 ], [ %27, %.thread94 ], [ null, %.thread91 ], [ null, %.thread86 ], [ null, %.lr.ph.preheader ], [ null, %.lr.ph ]
  call void @_ZN8tinyxml211XMLDocument12DepthTrackerD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret ptr %.5
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(776)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776), i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

declare void @_ZN8tinyxml27StrPairD1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !7, i64 8}
!6 = !{!"_ZTSN8tinyxml27XMLNodeE", !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN8tinyxml27StrPairE", !11, i64 0, !7, i64 8, !7, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!8, !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !11, i64 48}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !9, i64 0}
!17 = !{!6, !7, i64 96}


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