; LLVM IR from mfem/mfem :: general/tinyxml2.ll (ZN8tinyxml210XMLElement9ParseDeepEPcPNS_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::XMLElement" = type { %"class.tinyxml2::XMLNode", i32, ptr, ptr, i64 }
%"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, i64, 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 }

@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [16 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #1

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml210XMLElement9ParseDeepEPcPNS_7StrPairEPi(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #3 align 2 {
  %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 ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %11 = load ptr, ptr %6, align 8
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = load ptr, ptr %9, align 8, !tbaa !5
  %14 = call noundef ptr @_ZN8tinyxml27XMLUtil14SkipWhiteSpaceEPcPi(ptr noundef %12, ptr noundef %13)
  store ptr %14, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = load i8, ptr %15, align 1, !tbaa !9
  %17 = sext i8 %16 to i32
  %18 = icmp eq i32 %17, 47
  br i1 %18, label %19, label %23

19:                                               ; preds = %4
  %20 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 1
  store i32 2, ptr %20, align 8, !tbaa !10
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i32 1
  store ptr %22, ptr %7, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %19, %4
  %24 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 3
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef ptr @_ZN8tinyxml27StrPair9ParseNameEPc(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef %25)
  store ptr %26, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 3
  %28 = call noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  br i1 %28, label %29, label %30

29:                                               ; preds = %23
  store ptr null, ptr %5, align 8
  br label %121

30:                                               ; preds = %23
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call noundef ptr @_ZN8tinyxml210XMLElement15ParseAttributesEPcPi(ptr noundef nonnull align 8 dereferenceable(136) %11, ptr noundef %31, ptr noundef %32)
  store ptr %33, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %44

36:                                               ; preds = %30
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = icmp ne i8 %38, 0
  br i1 %39, label %40, label %44

40:                                               ; preds = %36
  %41 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !10
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %46

44:                                               ; preds = %40, %36, %30
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %45, ptr %5, align 8
  br label %121

46:                                               ; preds = %40
  %47 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 3
  %48 = call noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %49 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %48, ptr noundef @.str.28, i32 noundef 12)
  br i1 %49, label %50, label %115

50:                                               ; preds = %46
  %51 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %115

54:                                               ; preds = %50
  %55 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = call noundef ptr @_ZNK8tinyxml212XMLAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(80) %56)
  %58 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %57, ptr noundef @.str.29, i32 noundef 8)
  br i1 %58, label %59, label %115

59:                                               ; preds = %54
  %60 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = call noundef ptr @_ZNK8tinyxml212XMLAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(80) %61)
  %63 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %62, ptr noundef @.str.30, i32 noundef 3)
  br i1 %63, label %64, label %115

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %65, ptr %10, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %102, %64
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !18
  %70 = getelementptr inbounds %"class.tinyxml2::XMLDocument", ptr %69, i32 0, i32 7
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !18
  %74 = getelementptr inbounds %"class.tinyxml2::XMLDocument", ptr %73, i32 0, i32 8
  %75 = load i64, ptr %74, align 8, !tbaa !34
  %76 = getelementptr inbounds i8, ptr %71, i64 %75
  %77 = icmp ult ptr %67, %76
  br i1 %77, label %78, label %105

78:                                               ; preds = %66
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %81, 60
  br i1 %82, label %83, label %102

83:                                               ; preds = %78
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %84, ptr noundef @.str.31, i32 noundef 15)
  br i1 %85, label %86, label %102

86:                                               ; preds = %83
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = ptrtoint ptr %87 to i64
  %90 = ptrtoint ptr %88 to i64
  %91 = sub i64 %89, %90
  %92 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 4
  store i64 %91, ptr %92, align 8, !tbaa !35
  %93 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 4
  %94 = load i64, ptr %93, align 8, !tbaa !35
  %95 = call noalias noundef nonnull ptr @_Znam(i64 noundef %94) #7
  %96 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 3
  store ptr %95, ptr %96, align 8, !tbaa !36
  %97 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 3
  %98 = load ptr, ptr %97, align 8, !tbaa !36
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 4
  %101 = load i64, ptr %100, align 8, !tbaa !35
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %98, ptr align 1 %99, i64 %101, i1 false)
  br label %105

102:                                              ; preds = %83, %78
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i32 1
  store ptr %104, ptr %7, align 8, !tbaa !5
  br label %66, !llvm.loop !37

105:                                              ; preds = %86, %66
  %106 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %11, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !36
  %108 = icmp eq ptr %107, null
  br i1 %108, label %109, label %114

109:                                              ; preds = %105
  %110 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %11, i32 0, i32 4
  %113 = load i32, ptr %112, align 8, !tbaa !39
  call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(784) %111, i32 noundef 13, i32 noundef %113, ptr noundef null)
  br label %114

114:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %115

115:                                              ; preds = %114, %59, %54, %50, %46
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = call noundef ptr @_ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairEPi(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef %116, ptr noundef %117, ptr noundef %118)
  store ptr %119, ptr %7, align 8, !tbaa !5
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %120, ptr %5, align 8
  br label %121

121:                                              ; preds = %115, %44, %29
  %122 = load ptr, ptr %5, align 8
  ret ptr %122
}

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

!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, !15, i64 104}
!11 = !{!"_ZTSN8tinyxml210XMLElementE", !12, i64 0, !15, i64 104, !6, i64 112, !6, i64 120, !16, i64 128}
!12 = !{!"_ZTSN8tinyxml27XMLNodeE", !6, i64 8, !6, i64 16, !13, i64 24, !14, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!13 = !{!"_ZTSN8tinyxml27StrPairE", !14, i64 0, !6, i64 8, !6, i64 16}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN8tinyxml210XMLElement18ElementClosingTypeE", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!11, !6, i64 112}
!18 = !{!12, !6, i64 8}
!19 = !{!20, !6, i64 152}
!20 = !{!"_ZTSN8tinyxml211XMLDocumentE", !12, i64 0, !21, i64 104, !21, i64 105, !22, i64 108, !23, i64 112, !13, i64 120, !14, i64 144, !6, i64 152, !16, i64 160, !14, i64 168, !14, i64 172, !24, i64 176, !25, i64 272, !28, i64 400, !30, i64 528, !32, i64 656}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN8tinyxml28XMLErrorE", !7, i64 0}
!23 = !{!"_ZTSN8tinyxml210WhitespaceE", !7, i64 0}
!24 = !{!"_ZTSN8tinyxml28DynArrayIPNS_7XMLNodeELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!25 = !{!"_ZTSN8tinyxml28MemPoolTILi136EEE", !26, i64 0, !27, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!26 = !{!"_ZTSN8tinyxml27MemPoolE"}
!27 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi136EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!28 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !26, i64 0, !29, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!29 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!30 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !26, i64 0, !31, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!31 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!32 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !26, i64 0, !33, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!33 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!34 = !{!20, !16, i64 160}
!35 = !{!11, !16, i64 128}
!36 = !{!11, !6, i64 120}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!12, !14, i64 48}


; 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.28 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8tinyxml210XMLElement9ParseDeepEPcPNS_7StrPairEPi(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #2 align 2 {
  %5 = tail call noundef ptr @_ZN8tinyxml27XMLUtil14SkipWhiteSpaceEPcPi(ptr noundef %1, ptr noundef %3)
  %6 = load i8, ptr %5, align 1, !tbaa !5
  %7 = icmp eq i8 %6, 47
  br i1 %7, label %8, label %11

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 2, ptr %9, align 8, !tbaa !8
  %10 = getelementptr inbounds i8, ptr %5, i64 1
  br label %11

11:                                               ; preds = %8, %4
  %.024 = phi ptr [ %10, %8 ], [ %5, %4 ]
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = tail call noundef ptr @_ZN8tinyxml27StrPair9ParseNameEPc(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull %.024)
  %14 = tail call noundef zeroext i1 @_ZNK8tinyxml27StrPair5EmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  br i1 %14, label %69, label %15

15:                                               ; preds = %11
  %16 = tail call noundef ptr @_ZN8tinyxml210XMLElement15ParseAttributesEPcPi(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %13, ptr noundef %3)
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %69, label %17

17:                                               ; preds = %15
  %18 = load i8, ptr %16, align 1, !tbaa !5
  %.not27 = icmp ne i8 %18, 0
  %19 = getelementptr inbounds i8, ptr %0, i64 104
  %20 = load i32, ptr %19, align 8
  %.not28 = icmp eq i32 %20, 0
  %or.cond = select i1 %.not27, i1 %.not28, i1 false
  br i1 %or.cond, label %21, label %69

21:                                               ; preds = %17
  %22 = tail call noundef ptr @_ZN8tinyxml27StrPair6GetStrEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %23 = tail call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %22, ptr noundef nonnull @.str.28, i32 noundef 12)
  br i1 %23, label %24, label %67

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %0, i64 112
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %.not29 = icmp eq ptr %26, null
  br i1 %.not29, label %67, label %27

27:                                               ; preds = %24
  %28 = tail call noundef ptr @_ZNK8tinyxml212XMLAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
  %29 = tail call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %28, ptr noundef nonnull @.str.29, i32 noundef 8)
  br i1 %29, label %30, label %67

30:                                               ; preds = %27
  %31 = load ptr, ptr %25, align 8, !tbaa !16
  %32 = tail call noundef ptr @_ZNK8tinyxml212XMLAttribute5ValueEv(ptr noundef nonnull align 8 dereferenceable(80) %31)
  %33 = tail call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef %32, ptr noundef nonnull @.str.30, i32 noundef 3)
  br i1 %33, label %.preheader, label %67

.preheader:                                       ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds i8, ptr %35, i64 152
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = getelementptr inbounds i8, ptr %35, i64 160
  %39 = load i64, ptr %38, align 8, !tbaa !33
  %40 = getelementptr inbounds i8, ptr %37, i64 %39
  %41 = icmp ult ptr %16, %40
  br i1 %41, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %53
  %42 = phi ptr [ %54, %53 ], [ %35, %.preheader ]
  %.134 = phi ptr [ %55, %53 ], [ %16, %.preheader ]
  %43 = load i8, ptr %.134, align 1, !tbaa !5
  %44 = icmp eq i8 %43, 60
  br i1 %44, label %45, label %53

45:                                               ; preds = %.lr.ph
  %46 = tail call noundef zeroext i1 @_ZN8tinyxml27XMLUtil11StringEqualEPKcS2_i(ptr noundef nonnull %.134, ptr noundef nonnull @.str.31, i32 noundef 15)
  br i1 %46, label %.thread, label %._crit_edge

._crit_edge:                                      ; preds = %45
  %.pre = load ptr, ptr %34, align 8, !tbaa !17
  br label %53

.thread:                                          ; preds = %45
  %47 = ptrtoint ptr %.134 to i64
  %48 = ptrtoint ptr %16 to i64
  %49 = sub i64 %47, %48
  %50 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %49, ptr %50, align 8, !tbaa !34
  %51 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %49) #5
  %52 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %51, ptr %52, align 8, !tbaa !35
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %51, ptr nonnull align 1 %16, i64 %49, i1 false)
  br label %67

53:                                               ; preds = %._crit_edge, %.lr.ph
  %54 = phi ptr [ %.pre, %._crit_edge ], [ %42, %.lr.ph ]
  %55 = getelementptr inbounds i8, ptr %.134, i64 1
  %56 = getelementptr inbounds i8, ptr %54, i64 152
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = getelementptr inbounds i8, ptr %54, i64 160
  %59 = load i64, ptr %58, align 8, !tbaa !33
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  %61 = icmp ult ptr %55, %60
  br i1 %61, label %.lr.ph, label %.loopexit, !llvm.loop !36

.loopexit:                                        ; preds = %53, %.preheader
  %.1.lcssa = phi ptr [ %16, %.preheader ], [ %55, %53 ]
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 120
  %.pre36 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !35
  %62 = icmp eq ptr %.pre36, null
  br i1 %62, label %63, label %67

63:                                               ; preds = %.loopexit
  %64 = load ptr, ptr %34, align 8, !tbaa !17
  %65 = getelementptr inbounds i8, ptr %0, i64 48
  %66 = load i32, ptr %65, align 8, !tbaa !38
  tail call void (ptr, i32, i32, ptr, ...) @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEiPKcz(ptr noundef nonnull align 8 dereferenceable(784) %64, i32 noundef 13, i32 noundef %66, ptr noundef null)
  br label %67

67:                                               ; preds = %.thread, %.loopexit, %63, %30, %27, %24, %21
  %.2 = phi ptr [ %16, %30 ], [ %16, %27 ], [ %16, %24 ], [ %16, %21 ], [ %.1.lcssa, %63 ], [ %.1.lcssa, %.loopexit ], [ %.134, %.thread ]
  %68 = tail call noundef ptr @_ZN8tinyxml27XMLNode9ParseDeepEPcPNS_7StrPairEPi(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull %.2, ptr noundef %2, ptr noundef %3)
  br label %69

69:                                               ; preds = %15, %17, %11, %67
  %.0 = phi ptr [ %68, %67 ], [ null, %11 ], [ %16, %17 ], [ null, %15 ]
  ret ptr %.0
}

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 #5 = { builtin allocsize(0) }

!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, !14, i64 104}
!9 = !{!"_ZTSN8tinyxml210XMLElementE", !10, i64 0, !14, i64 104, !11, i64 112, !11, i64 120, !15, i64 128}
!10 = !{!"_ZTSN8tinyxml27XMLNodeE", !11, i64 8, !11, i64 16, !12, i64 24, !13, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!"_ZTSN8tinyxml27StrPairE", !13, i64 0, !11, i64 8, !11, i64 16}
!13 = !{!"int", !6, i64 0}
!14 = !{!"_ZTSN8tinyxml210XMLElement18ElementClosingTypeE", !6, i64 0}
!15 = !{!"long", !6, i64 0}
!16 = !{!9, !11, i64 112}
!17 = !{!10, !11, i64 8}
!18 = !{!19, !11, i64 152}
!19 = !{!"_ZTSN8tinyxml211XMLDocumentE", !10, i64 0, !20, i64 104, !20, i64 105, !21, i64 108, !22, i64 112, !12, i64 120, !13, i64 144, !11, i64 152, !15, i64 160, !13, i64 168, !13, i64 172, !23, i64 176, !24, i64 272, !27, i64 400, !29, i64 528, !31, i64 656}
!20 = !{!"bool", !6, i64 0}
!21 = !{!"_ZTSN8tinyxml28XMLErrorE", !6, i64 0}
!22 = !{!"_ZTSN8tinyxml210WhitespaceE", !6, i64 0}
!23 = !{!"_ZTSN8tinyxml28DynArrayIPNS_7XMLNodeELi10EEE", !11, i64 0, !6, i64 8, !13, i64 88, !13, i64 92}
!24 = !{!"_ZTSN8tinyxml28MemPoolTILi136EEE", !25, i64 0, !26, i64 8, !11, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!25 = !{!"_ZTSN8tinyxml27MemPoolE"}
!26 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi136EE5BlockELi10EEE", !11, i64 0, !6, i64 8, !13, i64 88, !13, i64 92}
!27 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !25, i64 0, !28, i64 8, !11, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!28 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !11, i64 0, !6, i64 8, !13, i64 88, !13, i64 92}
!29 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !25, i64 0, !30, i64 8, !11, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!30 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !11, i64 0, !6, i64 8, !13, i64 88, !13, i64 92}
!31 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !25, i64 0, !32, i64 8, !11, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!32 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !11, i64 0, !6, i64 8, !13, i64 88, !13, i64 92}
!33 = !{!19, !15, i64 160}
!34 = !{!9, !15, i64 128}
!35 = !{!9, !11, i64 120}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!10, !13, i64 48}


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