; LLVM IR from ETH3D/dataset-pipeline :: thirdparty/tinyxml2/tinyxml2.ll (ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairE)

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

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(640), 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(88)) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.tinyxml2::StrPair", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  br label %17

17:                                               ; preds = %181, %3
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %24

20:                                               ; preds = %17
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load i8, ptr %21, align 1, !tbaa !9
  %23 = icmp ne i8 %22, 0
  br label %24

24:                                               ; preds = %20, %17
  %25 = phi i1 [ false, %17 ], [ %23, %20 ]
  br i1 %25, label %26, label %185

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %16, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !10
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call noundef ptr @_ZN8tinyxml211XMLDocument8IdentifyEPcPPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(640) %28, ptr noundef %29, ptr noundef %8)
  store ptr %30, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %34

33:                                               ; preds = %26
  store i32 3, ptr %9, align 4
  br label %179

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  call void @_ZN8tinyxml27StrPairC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %35, align 8, !tbaa !14
  %38 = getelementptr inbounds ptr, ptr %37, i64 17
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef ptr %39(ptr noundef nonnull align 8 dereferenceable(88) %35, ptr noundef %36, ptr noundef %10)
          to label %41 unwind label %55

41:                                               ; preds = %34
  store ptr %40, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %60, label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %45)
          to label %46 unwind label %55

46:                                               ; preds = %44
  %47 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %16, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !10
  %49 = invoke noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(640) %48)
          to label %50 unwind label %55

50:                                               ; preds = %46
  br i1 %49, label %59, label %51

51:                                               ; preds = %50
  %52 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %16, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !10
  invoke void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640) %53, i32 noundef 17, ptr noundef null, ptr noundef null)
          to label %54 unwind label %55

54:                                               ; preds = %51
  br label %59

55:                                               ; preds = %51, %46, %44, %34
  %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 %184

59:                                               ; preds = %54, %50
  store i32 3, ptr %9, align 4
  br label %178

60:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = getelementptr inbounds ptr, ptr %62, i64 4
  %64 = load ptr, ptr %63, align 8
  %65 = invoke noundef ptr %64(ptr noundef nonnull align 8 dereferenceable(88) %61)
          to label %66 unwind label %83

66:                                               ; preds = %60
  store ptr %65, ptr %13, align 8, !tbaa !5
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %88

69:                                               ; preds = %66
  %70 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %16, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !10
  %72 = invoke noundef zeroext i1 @_ZNK8tinyxml27XMLNode10NoChildrenEv(ptr noundef nonnull align 8 dereferenceable(88) %71)
          to label %73 unwind label %83

73:                                               ; preds = %69
  br i1 %72, label %87, label %74

74:                                               ; preds = %73
  %75 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %16, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !10
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = invoke noundef ptr @_ZNK8tinyxml27XMLNode5ValueEv(ptr noundef nonnull align 8 dereferenceable(88) %77)
          to label %79 unwind label %83

79:                                               ; preds = %74
  invoke void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640) %76, i32 noundef 13, ptr noundef %78, ptr noundef null)
          to label %80 unwind label %83

80:                                               ; preds = %79
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %81)
          to label %82 unwind label %83

82:                                               ; preds = %80
  store i32 3, ptr %9, align 4
  br label %177

83:                                               ; preds = %80, %79, %74, %69, %60
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %11, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %12, align 4
  br label %183

87:                                               ; preds = %73
  br label %88

88:                                               ; preds = %87, %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %89, align 8, !tbaa !14
  %91 = getelementptr inbounds ptr, ptr %90, i64 0
  %92 = load ptr, ptr %91, align 8
  %93 = invoke noundef ptr %92(ptr noundef nonnull align 8 dereferenceable(88) %89)
          to label %94 unwind label %110

94:                                               ; preds = %88
  store ptr %93, ptr %14, align 8, !tbaa !5
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %172

97:                                               ; preds = %94
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = invoke noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104) %98)
          to label %100 unwind label %110

100:                                              ; preds = %97
  %101 = icmp eq i32 %99, 2
  br i1 %101, label %102, label %125

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

105:                                              ; preds = %102
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %106, i32 0, i32 3
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27StrPair10TransferToEPS0_(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef %108)
          to label %109 unwind label %110

109:                                              ; preds = %105
  br label %114

110:                                              ; preds = %172, %121, %114, %105, %97, %88
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  br label %182

114:                                              ; preds = %109, %102
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %115, i32 0, i32 8
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = load ptr, ptr %117, align 8, !tbaa !14
  %119 = getelementptr inbounds ptr, ptr %118, i64 5
  %120 = load ptr, ptr %119, align 8
  invoke void %120(ptr noundef nonnull align 8 dereferenceable(8) %117)
          to label %121 unwind label %110

121:                                              ; preds = %114
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %122)
          to label %123 unwind label %110

123:                                              ; preds = %121
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %124, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %176

125:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  store i8 0, ptr %15, align 1, !tbaa !17
  %126 = invoke noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %127 unwind label %134

127:                                              ; preds = %125
  br i1 %126, label %128, label %139

128:                                              ; preds = %127
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = invoke noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104) %129)
          to label %131 unwind label %134

131:                                              ; preds = %128
  %132 = icmp eq i32 %130, 0
  br i1 %132, label %133, label %138

133:                                              ; preds = %131
  store i8 1, ptr %15, align 1, !tbaa !17
  br label %138

134:                                              ; preds = %165, %164, %159, %150, %147, %145, %139, %128, %125
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %11, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %182

138:                                              ; preds = %133, %131
  br label %156

139:                                              ; preds = %127
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = invoke noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104) %140)
          to label %142 unwind label %134

142:                                              ; preds = %139
  %143 = icmp ne i32 %141, 0
  br i1 %143, label %144, label %145

144:                                              ; preds = %142
  store i8 1, ptr %15, align 1, !tbaa !17
  br label %155

145:                                              ; preds = %142
  %146 = invoke noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %147 unwind label %134

147:                                              ; preds = %145
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(104) %148)
          to label %150 unwind label %134

150:                                              ; preds = %147
  %151 = invoke noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %146, ptr noundef %149, i32 noundef 2147483647)
          to label %152 unwind label %134

152:                                              ; preds = %150
  br i1 %151, label %154, label %153

153:                                              ; preds = %152
  store i8 1, ptr %15, align 1, !tbaa !17
  br label %154

154:                                              ; preds = %153, %152
  br label %155

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

156:                                              ; preds = %155, %138
  %157 = load i8, ptr %15, align 1, !tbaa !17, !range !19, !noundef !20
  %158 = trunc i8 %157 to i1
  br i1 %158, label %159, label %168

159:                                              ; preds = %156
  %160 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %16, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !10
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  %163 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(104) %162)
          to label %164 unwind label %134

164:                                              ; preds = %159
  invoke void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640) %161, i32 noundef 16, ptr noundef %163, ptr noundef null)
          to label %165 unwind label %134

165:                                              ; preds = %164
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %166)
          to label %167 unwind label %134

167:                                              ; preds = %165
  store i32 3, ptr %9, align 4
  br label %169

168:                                              ; preds = %156
  store i32 0, ptr %9, align 4
  br label %169

169:                                              ; preds = %168, %167
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  %170 = load i32, ptr %9, align 4
  switch i32 %170, label %176 [
    i32 0, label %171
  ]

171:                                              ; preds = %169
  br label %172

172:                                              ; preds = %171, %94
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(88) %16, ptr noundef %173)
          to label %175 unwind label %110

175:                                              ; preds = %172
  store i32 0, ptr %9, align 4
  br label %176

176:                                              ; preds = %175, %169, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %177

177:                                              ; preds = %176, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %178

178:                                              ; preds = %177, %59
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  br label %179

179:                                              ; preds = %178, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %180 = load i32, ptr %9, align 4
  switch i32 %180, label %193 [
    i32 0, label %181
    i32 3, label %185
    i32 1, label %186
  ]

181:                                              ; preds = %179
  br label %17, !llvm.loop !21

182:                                              ; preds = %134, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %183

183:                                              ; preds = %182, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %184

184:                                              ; preds = %183, %55
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %188

185:                                              ; preds = %179, %24
  store ptr null, ptr %4, align 8
  br label %186

186:                                              ; preds = %185, %179
  %187 = load ptr, ptr %4, align 8
  ret ptr %187

188:                                              ; preds = %184
  %189 = load ptr, ptr %11, align 8
  %190 = load i32, ptr %12, align 4
  %191 = insertvalue { ptr, i32 } poison, ptr %189, 0
  %192 = insertvalue { ptr, i32 } %191, i32 %190, 1
  resume { ptr, i32 } %192

193:                                              ; preds = %179
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640), i32 noundef, ptr noundef, ptr noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104)) #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

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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 8}
!11 = !{!"_ZTSN8tinyxml27XMLNodeE", !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!12 = !{!"_ZTSN8tinyxml27StrPairE", !13, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!11, !6, i64 80}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"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::StrPair" = type { i32, ptr, ptr }

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(640), 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(88)) 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
declare dso_local noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"class.tinyxml2::StrPair", align 8
  %.not107 = icmp eq ptr %1, null
  br i1 %.not107, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i8, ptr %1, align 1, !tbaa !5
  %.not42159 = icmp eq i8 %7, 0
  br i1 %.not42159, label %.critedge, label %.lr.ph161

.lr.ph161:                                        ; preds = %.lr.ph, %78
  %.025108160 = phi ptr [ %17, %78 ], [ %1, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr null, ptr %4, align 8, !tbaa !8
  %8 = load ptr, ptr %6, align 8, !tbaa !10
  %9 = call noundef ptr @_ZN8tinyxml211XMLDocument8IdentifyEPcPPNS_7XMLNodeE(ptr noundef nonnull align 8 dereferenceable(640) %8, ptr noundef nonnull %.025108160, ptr noundef nonnull %4)
  %10 = load ptr, ptr %4, align 8, !tbaa !8
  %11 = icmp eq ptr %10, null
  br i1 %11, label %.thread58, label %12

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

12:                                               ; preds = %.lr.ph161
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN8tinyxml27StrPairC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %13 = load ptr, ptr %4, align 8, !tbaa !8
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %14, i64 136
  %16 = load ptr, ptr %15, align 8
  %17 = invoke noundef ptr %16(ptr noundef nonnull align 8 dereferenceable(88) %13, ptr noundef %9, ptr noundef nonnull %5)
          to label %18 unwind label %.loopexit

18:                                               ; preds = %12
  %.not43 = icmp eq ptr %17, null
  %19 = load ptr, ptr %4, align 8, !tbaa !8
  br i1 %.not43, label %20, label %26

20:                                               ; preds = %18
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %19)
          to label %21 unwind label %.loopexit.split-lp

21:                                               ; preds = %20
  %22 = load ptr, ptr %6, align 8, !tbaa !10
  %23 = call noundef zeroext i1 @_ZNK8tinyxml211XMLDocument5ErrorEv(ptr noundef nonnull align 8 dereferenceable(640) %22)
  br i1 %23, label %.thread63, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr %6, align 8, !tbaa !10
  call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640) %25, i32 noundef 17, ptr noundef null, ptr noundef null)
  br label %.thread63

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

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

26:                                               ; preds = %18
  %27 = load ptr, ptr %19, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %27, i64 32
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef ptr %29(ptr noundef nonnull align 8 dereferenceable(88) %19)
          to label %31 unwind label %.loopexit69

31:                                               ; preds = %26
  %.not44 = icmp eq ptr %30, null
  br i1 %.not44, label %39, label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %6, align 8, !tbaa !10
  %34 = call noundef zeroext i1 @_ZNK8tinyxml27XMLNode10NoChildrenEv(ptr noundef nonnull align 8 dereferenceable(88) %33)
  br i1 %34, label %39, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %6, align 8, !tbaa !10
  %37 = invoke noundef ptr @_ZNK8tinyxml27XMLNode5ValueEv(ptr noundef nonnull align 8 dereferenceable(88) %30)
          to label %38 unwind label %.loopexit.split-lp70

38:                                               ; preds = %35
  call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640) %36, i32 noundef 13, ptr noundef %37, ptr noundef null)
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef nonnull %30)
          to label %.thread63 unwind label %.loopexit.split-lp70

.loopexit69:                                      ; preds = %26
  %lpad.loopexit71 = landingpad { ptr, i32 }
          cleanup
  br label %80

.loopexit.split-lp70:                             ; preds = %35, %38
  %lpad.loopexit.split-lp72 = landingpad { ptr, i32 }
          cleanup
  br label %80

39:                                               ; preds = %32, %31
  %40 = load ptr, ptr %4, align 8, !tbaa !8
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  %42 = load ptr, ptr %41, align 8
  %43 = invoke noundef ptr %42(ptr noundef nonnull align 8 dereferenceable(88) %40)
          to label %44 unwind label %.loopexit74

44:                                               ; preds = %39
  %.not45 = icmp eq ptr %43, null
  br i1 %.not45, label %.thread55, label %45

45:                                               ; preds = %44
  %46 = call noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104) %43)
  %47 = icmp eq i32 %46, 2
  br i1 %47, label %48, label %60

48:                                               ; preds = %45
  %.not47 = icmp eq ptr %2, null
  br i1 %.not47, label %51, label %49

49:                                               ; preds = %48
  %50 = getelementptr inbounds i8, ptr %43, i64 24
  invoke void @_ZN8tinyxml27StrPair10TransferToEPS0_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull %2)
          to label %51 unwind label %.loopexit.split-lp75

.loopexit74:                                      ; preds = %39, %.thread55
  %lpad.loopexit76 = landingpad { ptr, i32 }
          cleanup
  br label %80

.loopexit.split-lp75:                             ; preds = %49, %51, %58
  %lpad.loopexit.split-lp77 = landingpad { ptr, i32 }
          cleanup
  br label %80

51:                                               ; preds = %49, %48
  %52 = load ptr, ptr %4, align 8, !tbaa !8
  %53 = getelementptr inbounds i8, ptr %52, i64 80
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = getelementptr inbounds i8, ptr %55, i64 40
  %57 = load ptr, ptr %56, align 8
  invoke void %57(ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %58 unwind label %.loopexit.split-lp75

58:                                               ; preds = %51
  %59 = load ptr, ptr %4, align 8, !tbaa !8
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %59)
          to label %.thread66 unwind label %.loopexit.split-lp75

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

60:                                               ; preds = %45
  %61 = call noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %62 = call noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104) %43)
  %63 = icmp eq i32 %62, 0
  br i1 %61, label %64, label %65

64:                                               ; preds = %60
  br i1 %63, label %.thread, label %.thread55

.loopexit79:                                      ; preds = %66, %68
  %lpad.loopexit81 = landingpad { ptr, i32 }
          cleanup
  br label %80

.loopexit.split-lp80:                             ; preds = %.thread, %74
  %lpad.loopexit.split-lp82 = landingpad { ptr, i32 }
          cleanup
  br label %80

65:                                               ; preds = %60
  br i1 %63, label %66, label %.thread

66:                                               ; preds = %65
  %67 = invoke noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %68 unwind label %.loopexit79

68:                                               ; preds = %66
  %69 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(104) %43)
          to label %70 unwind label %.loopexit79

70:                                               ; preds = %68
  %71 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %67, ptr noundef %69, i32 noundef 2147483647)
  br i1 %71, label %.thread55, label %.thread

.thread:                                          ; preds = %65, %64, %70
  %72 = load ptr, ptr %6, align 8, !tbaa !10
  %73 = invoke noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(104) %43)
          to label %74 unwind label %.loopexit.split-lp80

74:                                               ; preds = %.thread
  call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_(ptr noundef nonnull align 8 dereferenceable(640) %72, i32 noundef 16, ptr noundef %73, ptr noundef null)
  %75 = load ptr, ptr %4, align 8, !tbaa !8
  invoke void @_ZN8tinyxml27XMLNode10DeleteNodeEPS0_(ptr noundef %75)
          to label %.thread63 unwind label %.loopexit.split-lp80

.thread55:                                        ; preds = %64, %70, %44
  %76 = load ptr, ptr %4, align 8, !tbaa !8
  %77 = invoke noundef ptr @_ZN8tinyxml27XMLNode14InsertEndChildEPS0_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %76)
          to label %78 unwind label %.loopexit74

.thread63:                                        ; preds = %24, %21, %38, %74
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %.critedge

78:                                               ; preds = %.thread55
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %79 = load i8, ptr %17, align 1, !tbaa !5
  %.not42 = icmp eq i8 %79, 0
  br i1 %.not42, label %.critedge, label %.lr.ph161

80:                                               ; preds = %.loopexit79, %.loopexit.split-lp80, %.loopexit74, %.loopexit.split-lp75, %.loopexit69, %.loopexit.split-lp70, %.loopexit, %.loopexit.split-lp
  %.pn.pn.pn = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit71, %.loopexit69 ], [ %lpad.loopexit.split-lp72, %.loopexit.split-lp70 ], [ %lpad.loopexit76, %.loopexit74 ], [ %lpad.loopexit.split-lp77, %.loopexit.split-lp75 ], [ %lpad.loopexit81, %.loopexit79 ], [ %lpad.loopexit.split-lp82, %.loopexit.split-lp80 ]
  call void @_ZN8tinyxml27StrPairD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn.pn

.critedge:                                        ; preds = %78, %.lr.ph, %3, %.thread58, %.thread63, %.thread66
  %.5 = phi ptr [ %17, %.thread66 ], [ null, %.thread63 ], [ null, %.thread58 ], [ null, %3 ], [ null, %.lr.ph ], [ null, %78 ]
  ret ptr %.5
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8tinyxml210XMLElement11ClosingTypeEv(ptr noundef nonnull align 8 dereferenceable(104)) 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

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, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !9, i64 8}
!11 = !{!"_ZTSN8tinyxml27XMLNodeE", !9, i64 8, !9, i64 16, !12, i64 24, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80}
!12 = !{!"_ZTSN8tinyxml27StrPairE", !13, i64 0, !9, i64 8, !9, i64 16}
!13 = !{!"int", !6, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !7, i64 0}
!16 = !{!11, !9, i64 80}


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