; LLVM IR from thuhcsi/Crystal.TTVS :: TinyXML/tinyxmlparser.ll (ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding)

; 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.TiXmlNode = type { %class.TiXmlBase, ptr, i32, ptr, ptr, %class.TiXmlString, ptr, ptr }
%class.TiXmlBase = type { ptr, %struct.TiXmlCursor, ptr }
%struct.TiXmlCursor = type { i32, i32 }
%class.TiXmlString = type { ptr, i64, i64 }

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9TiXmlBase7IsAlphaEh13TiXmlEncoding(i8 noundef zeroext, i32 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140), i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %17, i32 noundef %18)
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %31

22:                                               ; preds = %3
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load i8, ptr %23, align 1, !tbaa !11
  %25 = icmp ne i8 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %22
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 %29, 60
  br i1 %30, label %31, label %32

31:                                               ; preds = %26, %22, %3
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %126

32:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %33 = call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(96) %16)
  store ptr %33, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %34, i32 noundef %35)
  store ptr %36, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %32
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = icmp ne i8 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %39, %32
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %125

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr @.str.19, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr @.str.20, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr @.str.21, ptr %13, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef %45, ptr noundef %46, i1 noundef zeroext true, i32 noundef %47)
  br i1 %48, label %49, label %56

49:                                               ; preds = %44
  %50 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 168) #7
  invoke void @_ZN16TiXmlDeclarationC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %50)
          to label %51 unwind label %52

51:                                               ; preds = %49
  store ptr %50, ptr %8, align 8, !tbaa !5
  br label %110

52:                                               ; preds = %49
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %14, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %50, i64 noundef 168) #8
  br label %124

56:                                               ; preds = %44
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef %57, ptr noundef %58, i1 noundef zeroext false, i32 noundef %59)
  br i1 %60, label %61, label %68

61:                                               ; preds = %56
  %62 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #7
  invoke void @_ZN12TiXmlCommentC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %62)
          to label %63 unwind label %64

63:                                               ; preds = %61
  store ptr %62, ptr %8, align 8, !tbaa !5
  br label %109

64:                                               ; preds = %61
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %14, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %62, i64 noundef 96) #8
  br label %124

68:                                               ; preds = %56
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef %69, ptr noundef %70, i1 noundef zeroext false, i32 noundef %71)
  br i1 %72, label %73, label %80

73:                                               ; preds = %68
  %74 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #7
  invoke void @_ZN12TiXmlUnknownC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %74)
          to label %75 unwind label %76

75:                                               ; preds = %73
  store ptr %74, ptr %8, align 8, !tbaa !5
  br label %108

76:                                               ; preds = %73
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %14, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %74, i64 noundef 96) #8
  br label %124

80:                                               ; preds = %68
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 1
  %83 = load i8, ptr %82, align 1, !tbaa !11
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = call noundef i32 @_ZN9TiXmlBase7IsAlphaEh13TiXmlEncoding(i8 noundef zeroext %83, i32 noundef %84)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %93, label %87

87:                                               ; preds = %80
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i64 1
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = sext i8 %90 to i32
  %92 = icmp eq i32 %91, 95
  br i1 %92, label %93, label %100

93:                                               ; preds = %87, %80
  %94 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 192) #7
  invoke void @_ZN12TiXmlElementC1EPKc(ptr noundef nonnull align 8 dereferenceable(192) %94, ptr noundef @.str.11)
          to label %95 unwind label %96

95:                                               ; preds = %93
  store ptr %94, ptr %8, align 8, !tbaa !5
  br label %107

96:                                               ; preds = %93
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %14, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %94, i64 noundef 192) #8
  br label %124

100:                                              ; preds = %87
  %101 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #7
  invoke void @_ZN12TiXmlUnknownC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %101)
          to label %102 unwind label %103

102:                                              ; preds = %100
  store ptr %101, ptr %8, align 8, !tbaa !5
  br label %107

103:                                              ; preds = %100
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %14, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %101, i64 noundef 96) #8
  br label %124

107:                                              ; preds = %102, %95
  br label %108

108:                                              ; preds = %107, %75
  br label %109

109:                                              ; preds = %108, %63
  br label %110

110:                                              ; preds = %109, %51
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %116

113:                                              ; preds = %110
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %class.TiXmlNode, ptr %114, i32 0, i32 1
  store ptr %16, ptr %115, align 8, !tbaa !12
  br label %122

116:                                              ; preds = %110
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %121

119:                                              ; preds = %116
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %120, i32 noundef 3, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %121

121:                                              ; preds = %119, %116
  br label %122

122:                                              ; preds = %121, %113
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %123, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %125

124:                                              ; preds = %103, %96, %76, %64, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %128

125:                                              ; preds = %122, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %126

126:                                              ; preds = %125, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %127 = load ptr, ptr %4, align 8
  ret ptr %127

128:                                              ; preds = %124
  %129 = load ptr, ptr %14, align 8
  %130 = load i32, ptr %15, align 4
  %131 = insertvalue { ptr, i32 } poison, ptr %129, 0
  %132 = insertvalue { ptr, i32 } %131, i32 %130, 1
  resume { ptr, i32 } %132
}

declare noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(96)) #3

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

declare void @_ZN12TiXmlElementC1EPKc(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef) unnamed_addr #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { 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 #5 = { nobuiltin nounwind "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) }
attributes #8 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS13TiXmlEncoding", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"_ZTS9TiXmlNode", !14, i64 0, !6, i64 24, !17, i64 32, !6, i64 40, !6, i64 48, !18, i64 56, !6, i64 80, !6, i64 88}
!14 = !{!"_ZTS9TiXmlBase", !15, i64 8, !6, i64 16}
!15 = !{!"_ZTS11TiXmlCursor", !16, i64 0, !16, i64 4}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN9TiXmlNode8NodeTypeE", !7, i64 0}
!18 = !{!"_ZTS11TiXmlString", !6, i64 0, !19, i64 8, !19, i64 16}
!19 = !{!"long", !7, i64 0}


; 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.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9TiXmlBase7IsAlphaEh13TiXmlEncoding(i8 noundef zeroext, i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %1, i32 noundef %2)
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %48, label %5

5:                                                ; preds = %3
  %6 = load i8, ptr %4, align 1, !tbaa !5
  %cond = icmp eq i8 %6, 60
  br i1 %cond, label %7, label %48

7:                                                ; preds = %5
  %8 = tail call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  %9 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef nonnull %4, i32 noundef %2)
  %.not38 = icmp eq ptr %9, null
  br i1 %.not38, label %48, label %10

10:                                               ; preds = %7
  %11 = load i8, ptr %9, align 1, !tbaa !5
  %.not39 = icmp eq i8 %11, 0
  br i1 %.not39, label %48, label %12

12:                                               ; preds = %10
  %13 = tail call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef nonnull %9, ptr noundef nonnull @.str.19, i1 noundef zeroext true, i32 noundef %2)
  br i1 %13, label %14, label %18

14:                                               ; preds = %12
  %15 = tail call noalias noundef nonnull dereferenceable(168) ptr @_Znwm(i64 noundef 168) #5
  invoke void @_ZN16TiXmlDeclarationC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %15)
          to label %45 unwind label %16

16:                                               ; preds = %14
  %17 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %15, i64 noundef 168) #6
  br label %47

18:                                               ; preds = %12
  %19 = tail call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef nonnull %9, ptr noundef nonnull @.str.20, i1 noundef zeroext false, i32 noundef %2)
  br i1 %19, label %20, label %24

20:                                               ; preds = %18
  %21 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #5
  invoke void @_ZN12TiXmlCommentC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %21)
          to label %45 unwind label %22

22:                                               ; preds = %20
  %23 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %21, i64 noundef 96) #6
  br label %47

24:                                               ; preds = %18
  %25 = tail call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef nonnull %9, ptr noundef nonnull @.str.21, i1 noundef zeroext false, i32 noundef %2)
  br i1 %25, label %26, label %30

26:                                               ; preds = %24
  %27 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #5
  invoke void @_ZN12TiXmlUnknownC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %27)
          to label %45 unwind label %28

28:                                               ; preds = %26
  %29 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 96) #6
  br label %47

30:                                               ; preds = %24
  %31 = getelementptr inbounds i8, ptr %9, i64 1
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = tail call noundef i32 @_ZN9TiXmlBase7IsAlphaEh13TiXmlEncoding(i8 noundef zeroext %32, i32 noundef %2)
  %.not40 = icmp eq i32 %33, 0
  br i1 %.not40, label %34, label %37

34:                                               ; preds = %30
  %35 = load i8, ptr %31, align 1, !tbaa !5
  %36 = icmp eq i8 %35, 95
  br i1 %36, label %37, label %41

37:                                               ; preds = %34, %30
  %38 = tail call noalias noundef nonnull dereferenceable(192) ptr @_Znwm(i64 noundef 192) #5
  invoke void @_ZN12TiXmlElementC1EPKc(ptr noundef nonnull align 8 dereferenceable(192) %38, ptr noundef nonnull @.str.11)
          to label %45 unwind label %39

39:                                               ; preds = %37
  %40 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 192) #6
  br label %47

41:                                               ; preds = %34
  %42 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #5
  invoke void @_ZN12TiXmlUnknownC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %42)
          to label %45 unwind label %43

43:                                               ; preds = %41
  %44 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %42, i64 noundef 96) #6
  br label %47

45:                                               ; preds = %14, %20, %26, %37, %41
  %.031 = phi ptr [ %15, %14 ], [ %21, %20 ], [ %27, %26 ], [ %38, %37 ], [ %42, %41 ]
  %46 = getelementptr inbounds i8, ptr %.031, i64 24
  store ptr %0, ptr %46, align 8, !tbaa !8
  br label %48

47:                                               ; preds = %43, %39, %28, %22, %16
  %.pn = phi { ptr, i32 } [ %17, %16 ], [ %23, %22 ], [ %29, %28 ], [ %40, %39 ], [ %44, %43 ]
  resume { ptr, i32 } %.pn

48:                                               ; preds = %5, %45, %10, %7, %3
  %.1 = phi ptr [ null, %5 ], [ null, %3 ], [ %.031, %45 ], [ null, %10 ], [ null, %7 ]
  ret ptr %.1
}

declare noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16TiXmlDeclarationC2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12TiXmlCommentC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12TiXmlUnknownC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #1 align 2

declare void @_ZN12TiXmlElementC1EPKc(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef) unnamed_addr #2

attributes #0 = { 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 = { "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 = { 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 #4 = { nobuiltin nounwind "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) }
attributes #6 = { builtin 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, !13, i64 24}
!9 = !{!"_ZTS9TiXmlNode", !10, i64 0, !13, i64 24, !14, i64 32, !13, i64 40, !13, i64 48, !15, i64 56, !13, i64 80, !13, i64 88}
!10 = !{!"_ZTS9TiXmlBase", !11, i64 8, !13, i64 16}
!11 = !{!"_ZTS11TiXmlCursor", !12, i64 0, !12, i64 4}
!12 = !{!"int", !6, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!"_ZTSN9TiXmlNode8NodeTypeE", !6, i64 0}
!15 = !{!"_ZTS11TiXmlString", !13, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"long", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass