; LLVM IR from ysyesilyurt/ComputerGraphics :: ForwardRenderingPipeline/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", %"class.tinyxml2::StrPair", i32, ptr, i32, %"class.tinyxml2::MemPoolT", %"class.tinyxml2::MemPoolT.0", %"class.tinyxml2::MemPoolT.2", %"class.tinyxml2::MemPoolT.4" }
%"class.tinyxml2::MemPoolT" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::MemPool" = type { ptr }
%"class.tinyxml2::DynArray" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.0" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.1", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.1" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.2" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.3", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.3" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.4" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.5", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.5" = 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 }

; 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_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704), i32 noundef, ptr noundef, ptr noundef, i32 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(704)) #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 ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = 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
  %13 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %14, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %113, %3
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %114

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

25:                                               ; preds = %18
  %26 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %13, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !10
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %13)
  %30 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %13, i32 0, i32 4
  %31 = load i32, ptr %30, align 8, !tbaa !14
  call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704) %27, i32 noundef 7, ptr noundef %28, ptr noundef %29, i32 noundef %31)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %116

32:                                               ; preds = %18
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = call noundef zeroext i1 @_ZN8tinyxml27XMLUtil15IsNameStartCharEh(i8 noundef zeroext %34)
  br i1 %35, label %36, label %83

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

56:                                               ; preds = %36
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = call noundef ptr @_ZNK8tinyxml212XMLAttribute4NameEv(ptr noundef nonnull align 8 dereferenceable(80) %57)
  %59 = call noundef ptr @_ZNK8tinyxml210XMLElement9AttributeEPKcS2_(ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef %58, ptr noundef null)
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %68

61:                                               ; preds = %56, %36
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN8tinyxml210XMLElement15DeleteAttributeEPNS_12XMLAttributeE(ptr noundef %62)
  %63 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %13, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !10
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load i32, ptr %12, align 4, !tbaa !31
  call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704) %64, i32 noundef 8, ptr noundef %65, ptr noundef %66, i32 noundef %67)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %80

68:                                               ; preds = %56
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %75

71:                                               ; preds = %68
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.tinyxml2::XMLAttribute", ptr %73, i32 0, i32 4
  store ptr %72, ptr %74, align 8, !tbaa !32
  br label %78

75:                                               ; preds = %68
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %13, i32 0, i32 2
  store ptr %76, ptr %77, align 8, !tbaa !33
  br label %78

78:                                               ; preds = %75, %71
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %79, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %10, align 4
  br label %80

80:                                               ; preds = %78, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %81 = load i32, ptr %10, align 4
  switch i32 %81, label %116 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %113

83:                                               ; preds = %32
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 62
  br i1 %87, label %88, label %91

88:                                               ; preds = %83
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i32 1
  store ptr %90, ptr %6, align 8, !tbaa !5
  br label %114

91:                                               ; preds = %83
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i8, ptr %92, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = icmp eq i32 %94, 47
  br i1 %95, label %96, label %106

96:                                               ; preds = %91
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 1
  %99 = load i8, ptr %98, align 1, !tbaa !9
  %100 = sext i8 %99 to i32
  %101 = icmp eq i32 %100, 62
  br i1 %101, label %102, label %106

102:                                              ; preds = %96
  %103 = getelementptr inbounds %"class.tinyxml2::XMLElement", ptr %13, i32 0, i32 1
  store i32 1, ptr %103, align 8, !tbaa !35
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 2
  store ptr %105, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %116

106:                                              ; preds = %96, %91
  %107 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %13, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !10
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %"class.tinyxml2::XMLNode", ptr %13, i32 0, i32 4
  %112 = load i32, ptr %111, align 8, !tbaa !14
  call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704) %108, i32 noundef 7, ptr noundef %109, ptr noundef %110, i32 noundef %112)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %116

113:                                              ; preds = %82
  br label %15, !llvm.loop !36

114:                                              ; preds = %88, %15
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %115, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %116

116:                                              ; preds = %114, %106, %102, %80, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %117 = load ptr, ptr %4, align 8
  ret ptr %117
}

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 184}
!16 = !{!"_ZTSN8tinyxml211XMLDocumentE", !11, i64 0, !17, i64 104, !17, i64 105, !18, i64 108, !19, i64 112, !12, i64 120, !12, i64 144, !13, i64 168, !6, i64 176, !13, i64 184, !20, i64 192, !23, i64 320, !25, i64 448, !27, i64 576}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN8tinyxml28XMLErrorE", !7, i64 0}
!19 = !{!"_ZTSN8tinyxml210WhitespaceE", !7, i64 0}
!20 = !{!"_ZTSN8tinyxml28MemPoolTILi120EEE", !21, i64 0, !22, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!21 = !{!"_ZTSN8tinyxml27MemPoolE"}
!22 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi120EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!23 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !21, i64 0, !24, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!24 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!25 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !21, i64 0, !26, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!26 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!27 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !21, i64 0, !28, i64 8, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!28 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !13, i64 88, !13, i64 92}
!29 = !{!30, !13, i64 56}
!30 = !{!"_ZTSN8tinyxml212XMLAttributeE", !12, i64 8, !12, i64 32, !13, i64 56, !6, i64 64, !6, i64 72}
!31 = !{!13, !13, i64 0}
!32 = !{!30, !6, i64 64}
!33 = !{!34, !6, i64 112}
!34 = !{!"_ZTSN8tinyxml210XMLElementE", !11, i64 0, !13, i64 104, !6, i64 112}
!35 = !{!34, !13, i64 104}
!36 = distinct !{!36, !37}
!37 = !{!"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"

; 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_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704), i32 noundef, ptr noundef, ptr noundef, i32 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(704)) 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 {
  %.not52 = icmp eq ptr %1, null
  br i1 %.not52, 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
  %.not4074 = icmp eq i8 %7, 0
  br i1 %.not4074, label %._crit_edge, label %.lr.ph76

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

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

15:                                               ; preds = %.lr.ph76
  %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 184
  %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 !28
  %21 = tail call noundef zeroext i1 @_ZNK8tinyxml211XMLDocument15ProcessEntitiesEv(ptr noundef nonnull align 8 dereferenceable(704) %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)
  %.not41 = icmp eq ptr %22, null
  br i1 %.not41, 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)
  %.not42 = icmp eq ptr %25, null
  br i1 %.not42, label %27, label %.thread

.thread:                                          ; preds = %15, %23
  tail call void @_ZN8tinyxml210XMLElement15DeleteAttributeEPNS_12XMLAttributeE(ptr noundef nonnull %16)
  %26 = load ptr, ptr %4, align 8, !tbaa !8
  tail call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704) %26, i32 noundef 8, ptr noundef nonnull %1, ptr noundef %22, i32 noundef %19)
  br label %.loopexit

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

31:                                               ; preds = %.lr.ph76
  %32 = load i8, ptr %13, align 1, !tbaa !5
  switch i8 %32, label %42 [
    i8 62, label %33
    i8 47, label %35
  ]

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

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

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

42:                                               ; preds = %31, %35
  %43 = load ptr, ptr %4, align 8, !tbaa !8
  %44 = getelementptr inbounds i8, ptr %0, i64 48
  %45 = load i32, ptr %44, align 8, !tbaa !13
  tail call void @_ZN8tinyxml211XMLDocument8SetErrorENS_8XMLErrorEPKcS3_i(ptr noundef nonnull align 8 dereferenceable(704) %43, i32 noundef 7, ptr noundef nonnull %1, ptr noundef nonnull %13, i32 noundef %45)
  br label %.loopexit

.loopexit:                                        ; preds = %3, %.thread, %33, %42, %39, %._crit_edge
  %.2 = phi ptr [ %41, %39 ], [ null, %42 ], [ null, %._crit_edge ], [ %34, %33 ], [ 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 184}
!15 = !{!"_ZTSN8tinyxml211XMLDocumentE", !9, i64 0, !16, i64 104, !16, i64 105, !17, i64 108, !18, i64 112, !11, i64 120, !11, i64 144, !12, i64 168, !10, i64 176, !12, i64 184, !19, i64 192, !22, i64 320, !24, i64 448, !26, i64 576}
!16 = !{!"bool", !6, i64 0}
!17 = !{!"_ZTSN8tinyxml28XMLErrorE", !6, i64 0}
!18 = !{!"_ZTSN8tinyxml210WhitespaceE", !6, i64 0}
!19 = !{!"_ZTSN8tinyxml28MemPoolTILi120EEE", !20, i64 0, !21, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!20 = !{!"_ZTSN8tinyxml27MemPoolE"}
!21 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi120EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!22 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !20, i64 0, !23, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!23 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!24 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !20, i64 0, !25, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!25 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!26 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !20, i64 0, !27, i64 8, !10, i64 104, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124}
!27 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !10, i64 0, !6, i64 8, !12, i64 88, !12, i64 92}
!28 = !{!29, !12, i64 56}
!29 = !{!"_ZTSN8tinyxml212XMLAttributeE", !11, i64 8, !11, i64 32, !12, i64 56, !10, i64 64, !10, i64 72}
!30 = !{!10, !10, i64 0}
!31 = !{!32, !12, i64 104}
!32 = !{!"_ZTSN8tinyxml210XMLElementE", !9, i64 0, !12, i64 104, !10, i64 112}


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