; LLVM IR from facebookresearch/habitat-sim :: src/deps/tinyxml2/tinyxml2.ll (ZN8tinyxml210XMLElement15ParseAttributesEPcPi)

; 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::XMLNode" = type { ptr, ptr, ptr, %"class.tinyxml2::StrPair", i32, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.tinyxml2::StrPair" = type { i32, ptr, ptr }
%"class.tinyxml2::XMLDocument" = type { %"class.tinyxml2::XMLNode", i8, i8, i32, i32, %"class.tinyxml2::StrPair", i32, ptr, i32, i32, %"class.tinyxml2::DynArray", %"class.tinyxml2::MemPoolT", %"class.tinyxml2::MemPoolT.1", %"class.tinyxml2::MemPoolT.3", %"class.tinyxml2::MemPoolT.5" }
%"class.tinyxml2::DynArray" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.0", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::MemPool" = type { ptr }
%"class.tinyxml2::DynArray.0" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.1" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.2", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.2" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.3" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.4", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.4" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.5" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.6", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.6" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::XMLAttribute" = type { ptr, %"class.tinyxml2::StrPair", %"class.tinyxml2::StrPair", i32, ptr, ptr }
%"class.tinyxml2::XMLElement" = type { %"class.tinyxml2::XMLNode", i32, ptr }

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml210XMLElement15ParseAttributesEPcPi(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, ptr noundef %2) #2 align 2 {
  %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 ptr, align 8
  %11 = alloca i32, align 4
  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
  %12 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %107, %3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %108

16:                                               ; preds = %13
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = call noundef ptr @_ZN8tinyxml27XMLUtil14SkipWhiteSpaceEPcPi(ptr noundef %17, ptr noundef %18)
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %22 = icmp ne i8 %21, 0
  br i1 %22, label %29, label %23

23:                                               ; preds = %16
  %24 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !10
  %26 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 4
  %27 = load i32, ptr %26, align 8, !tbaa !14
  %28 = call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %12)
  call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %25, i32 noundef 7, i32 noundef %27, ptr noundef @.str.16, ptr noundef %28)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %110

29:                                               ; preds = %16
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load i8, ptr %30, align 1, !tbaa !9
  %32 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil15IsNameStartCharEh(i8 noundef zeroext %31)
  br i1 %32, label %33, label %79

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %34 = call noundef ptr @_ZN8tinyxml210XMLElement15CreateAttributeEv(ptr noundef nonnull align 8 dereferenceable(120) %12)
  store ptr %34, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !10
  %37 = getelementptr inbounds %"class.tinyxml2::XMLDocument", ptr %36, i32 0, i32 8
  %38 = load i32, ptr %37, align 8, !tbaa !15
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.tinyxml2::XMLAttribute", ptr %39, i32 0, i32 3
  store i32 %38, ptr %40, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.tinyxml2::XMLAttribute", ptr %41, i32 0, i32 3
  %43 = load i32, ptr %42, align 8, !tbaa !30
  store i32 %43, ptr %11, align 4, !tbaa !32
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !10
  %48 = call noundef zeroext i1 @_ZNK8tinyxml211XMLDocument15ProcessEntitiesEv(ptr noundef nonnull align 8 dereferenceable(776) %47)
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call noundef ptr @_ZN8tinyxml212XMLAttribute9ParseDeepEPcbPi(ptr noundef nonnull align 8 dereferenceable(80) %44, ptr noundef %45, i1 noundef zeroext %48, ptr noundef %49)
  store ptr %50, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %58

53:                                               ; preds = %33
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call noundef ptr @_ZNK8tinyxml212XMLAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(80) %54)
  %56 = call noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %12, ptr noundef %55, ptr noundef null)
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %64

58:                                               ; preds = %53, %33
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN8tinyxml210XMLElement15DeleteAttributeEPNS_12XMLAttributeE(ptr noundef %59)
  %60 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !10
  %62 = load i32, ptr %11, align 4, !tbaa !32
  %63 = call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %12)
  call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %61, i32 noundef 8, i32 noundef %62, ptr noundef @.str.16, ptr noundef %63)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %76

64:                                               ; preds = %53
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %71

67:                                               ; preds = %64
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.tinyxml2::XMLAttribute", ptr %69, i32 0, i32 4
  store ptr %68, ptr %70, align 8, !tbaa !33
  br label %74

71:                                               ; preds = %64
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %12, i32 0, i32 2
  store ptr %72, ptr %73, align 8, !tbaa !34
  br label %74

74:                                               ; preds = %71, %67
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %75, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %9, align 4
  br label %76

76:                                               ; preds = %74, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %77 = load i32, ptr %9, align 4
  switch i32 %77, label %110 [
    i32 0, label %78
  ]

78:                                               ; preds = %76
  br label %107

79:                                               ; preds = %29
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = sext i8 %81 to i32
  %83 = icmp eq i32 %82, 62
  br i1 %83, label %84, label %87

84:                                               ; preds = %79
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i32 1
  store ptr %86, ptr %6, align 8, !tbaa !5
  br label %108

87:                                               ; preds = %79
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = load i8, ptr %88, align 1, !tbaa !9
  %90 = sext i8 %89 to i32
  %91 = icmp eq i32 %90, 47
  br i1 %91, label %92, label %102

92:                                               ; preds = %87
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 1
  %95 = load i8, ptr %94, align 1, !tbaa !9
  %96 = sext i8 %95 to i32
  %97 = icmp eq i32 %96, 62
  br i1 %97, label %98, label %102

98:                                               ; preds = %92
  %99 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %12, i32 0, i32 1
  store i32 1, ptr %99, align 8, !tbaa !37
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 2
  store ptr %101, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %110

102:                                              ; preds = %92, %87
  %103 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !10
  %105 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %12, i32 0, i32 4
  %106 = load i32, ptr %105, align 8, !tbaa !14
  call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %104, i32 noundef 7, i32 noundef %106, ptr noundef null)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %110

107:                                              ; preds = %78
  br label %13, !llvm.loop !38

108:                                              ; preds = %84, %13
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %109, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %110

110:                                              ; preds = %108, %102, %98, %76, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %111 = load ptr, ptr %4, align 8
  ret ptr %111
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !13, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!12 = !{!"_ZTSN8tinyxml27StrPairE", !13, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = !{!11, !13, i64 48}
!15 = !{!16, !13, i64 160}
!16 = !{!"_ZTSN8tinyxml211XMLDocumentE", !11, i64 0, !17, i64 104, !17, i64 105, !18, i64 108, !19, i64 112, !12, i64 120, !13, i64 144, !6, i64 152, !13, i64 160, !13, i64 164, !20, i64 168, !21, i64 264, !24, i64 392, !26, i64 520, !28, i64 648}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN8tinyxml28XMLErrorE", !7, i64 0}
!19 = !{!"_ZTSN8tinyxml210WhitespaceE", !7, i64 0}
!20 = !{!"_ZTSN8tinyxml28DynArrayIPNS_7XMLNodeELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!21 = !{!"_ZTSN8tinyxml28MemPoolTILi120EEE", !22, i64 0, !23, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!22 = !{!"_ZTSN8tinyxml27MemPoolE"}
!23 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi120EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!24 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !22, i64 0, !25, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!25 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!26 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !22, i64 0, !27, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!27 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!28 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !22, i64 0, !29, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!29 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!30 = !{!31, !13, i64 56}
!31 = !{!"_ZTSN8tinyxml212XMLAttributeE", !12, i64 8, !12, i64 32, !13, i64 56, !6, i64 64, !6, i64 72}
!32 = !{!13, !13, i64 0}
!33 = !{!31, !6, i64 64}
!34 = !{!35, !6, i64 112}
!35 = !{!"_ZTSN8tinyxml210XMLElementE", !11, i64 0, !36, i64 104, !6, i64 112}
!36 = !{!"_ZTSN8tinyxml210XMLElement18ElementClosingTypeE", !7, i64 0}
!37 = !{!35, !36, i64 104}
!38 = distinct !{!38, !39}
!39 = !{!"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"

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml212XMLAttribute9ParseDeepEPcbPi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml210XMLElement15ParseAttributesEPcPi(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 align 2 {
  %.not45 = icmp eq ptr %1, null
  br i1 %.not45, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = getelementptr inbounds i8, ptr %0, i64 112
  %6 = tail call noundef ptr @_ZN8tinyxml27XMLUtil14SkipWhiteSpaceEPcPi(ptr noundef nonnull %1, ptr noundef %2)
  %7 = load i8, ptr %6, align 1, !tbaa !5
  %.not3463 = icmp eq i8 %7, 0
  br i1 %.not3463, label %._crit_edge, label %.lr.ph65

._crit_edge:                                      ; preds = %28, %.lr.ph
  %8 = load ptr, ptr %4, align 8, !tbaa !8
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = tail call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  tail call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %8, i32 noundef 7, i32 noundef %10, ptr noundef nonnull @.str.16, ptr noundef %11)
  br label %.loopexit

.lr.ph65:                                         ; preds = %.lr.ph, %28
  %12 = phi i8 [ %31, %28 ], [ %7, %.lr.ph ]
  %13 = phi ptr [ %30, %28 ], [ %6, %.lr.ph ]
  %.0304664 = phi ptr [ %16, %28 ], [ null, %.lr.ph ]
  %14 = tail call noundef zeroext i1 @_ZN8tinyxml27XMLUtil15IsNameStartCharEh(i8 noundef zeroext %12)
  br i1 %14, label %15, label %32

15:                                               ; preds = %.lr.ph65
  %16 = tail call noundef ptr @_ZN8tinyxml210XMLElement15CreateAttributeEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %17 = load ptr, ptr %4, align 8, !tbaa !8
  %18 = getelementptr inbounds i8, ptr %17, i64 160
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %16, i64 56
  store i32 %19, ptr %20, align 8, !tbaa !29
  %21 = tail call noundef zeroext i1 @_ZNK8tinyxml211XMLDocument15ProcessEntitiesEv(ptr noundef nonnull align 8 dereferenceable(776) %17)
  %22 = tail call noundef ptr @_ZN8tinyxml212XMLAttribute9ParseDeepEPcbPi(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull %13, i1 noundef zeroext %21, ptr noundef %2)
  %.not35 = icmp eq ptr %22, null
  br i1 %.not35, label %.thread, label %23

23:                                               ; preds = %15
  %24 = tail call noundef ptr @_ZNK8tinyxml212XMLAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %25 = tail call noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %24, ptr noundef null)
  %.not36 = icmp eq ptr %25, null
  br i1 %.not36, label %28, label %.thread

.thread:                                          ; preds = %15, %23
  tail call void @_ZN8tinyxml210XMLElement15DeleteAttributeEPNS_12XMLAttributeE(ptr noundef nonnull %16)
  %26 = load ptr, ptr %4, align 8, !tbaa !8
  %27 = tail call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  tail call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %26, i32 noundef 8, i32 noundef %19, ptr noundef nonnull @.str.16, ptr noundef %27)
  br label %.loopexit

28:                                               ; preds = %23
  %.not37 = icmp eq ptr %.0304664, null
  %29 = getelementptr inbounds i8, ptr %.0304664, i64 64
  %.sink = select i1 %.not37, ptr %5, ptr %29
  store ptr %16, ptr %.sink, align 8, !tbaa !31
  %30 = tail call noundef ptr @_ZN8tinyxml27XMLUtil14SkipWhiteSpaceEPcPi(ptr noundef nonnull %22, ptr noundef %2)
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %.not34 = icmp eq i8 %31, 0
  br i1 %.not34, label %._crit_edge, label %.lr.ph65

32:                                               ; preds = %.lr.ph65
  %33 = load i8, ptr %13, align 1, !tbaa !5
  switch i8 %33, label %43 [
    i8 62, label %34
    i8 47, label %36
  ]

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %13, i64 1
  br label %.loopexit

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %13, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %39 = icmp eq i8 %38, 62
  br i1 %39, label %40, label %43

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 1, ptr %41, align 8, !tbaa !32
  %42 = getelementptr inbounds i8, ptr %13, i64 2
  br label %.loopexit

43:                                               ; preds = %32, %36
  %44 = load ptr, ptr %4, align 8, !tbaa !8
  %45 = getelementptr inbounds i8, ptr %0, i64 48
  %46 = load i32, ptr %45, align 8, !tbaa !13
  tail call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(776) %44, i32 noundef 7, i32 noundef %46, ptr noundef null)
  br label %.loopexit

.loopexit:                                        ; preds = %3, %.thread, %34, %43, %40, %._crit_edge
  %.2 = phi ptr [ %42, %40 ], [ null, %43 ], [ null, %._crit_edge ], [ %35, %34 ], [ null, %.thread ], [ null, %3 ]
  ret ptr %.2
}

attributes #0 = { 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 #1 = { 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 #2 = { 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" }

!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, !10, i64 8}
!9 = !{!"_ZTSN8tinyxml27XMLNodeE", !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"_ZTSN8tinyxml27StrPairE", !12, i64 0, !10, i64 8, !10, i64 16}
!12 = !{!"int", !6, i64 0}
!13 = !{!9, !12, i64 48}
!14 = !{!15, !12, i64 160}
!15 = !{!"_ZTSN8tinyxml211XMLDocumentE", !9, i64 0, !16, i64 104, !16, i64 105, !17, i64 108, !18, i64 112, !11, i64 120, !12, i64 144, !10, i64 152, !12, i64 160, !12, i64 164, !19, i64 168, !20, i64 264, !23, i64 392, !25, i64 520, !27, i64 648}
!16 = !{!"bool", !6, i64 0}
!17 = !{!"_ZTSN8tinyxml28XMLErrorE", !6, i64 0}
!18 = !{!"_ZTSN8tinyxml210WhitespaceE", !6, i64 0}
!19 = !{!"_ZTSN8tinyxml28DynArrayIPNS_7XMLNodeELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!20 = !{!"_ZTSN8tinyxml28MemPoolTILi120EEE", !21, i64 0, !22, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!21 = !{!"_ZTSN8tinyxml27MemPoolE"}
!22 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi120EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!23 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !21, i64 0, !24, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!24 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!25 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !21, i64 0, !26, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!26 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!27 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !21, i64 0, !28, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!28 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!29 = !{!30, !12, i64 56}
!30 = !{!"_ZTSN8tinyxml212XMLAttributeE", !11, i64 8, !11, i64 32, !12, i64 56, !10, i64 64, !10, i64 72}
!31 = !{!10, !10, i64 0}
!32 = !{!33, !34, i64 104}
!33 = !{!"_ZTSN8tinyxml210XMLElementE", !9, i64 0, !34, i64 104, !10, i64 112}
!34 = !{!"_ZTSN8tinyxml210XMLElement18ElementClosingTypeE", !6, i64 0}


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