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

; 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"

@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.22 = 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 uwtable
declare dso_local noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef, i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef) #1 align 2

declare noundef ptr @_ZN9TiXmlNode12LinkEndChildEPS_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12TiXmlElement9ReadValueEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = 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 i32 %3, ptr %9, align 4, !tbaa !9
  %17 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %18 = call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(96) %17)
  store ptr %18, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %19, ptr %11, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %20, i32 noundef %21)
  store ptr %22, ptr %7, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %120, %4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %30

26:                                               ; preds = %23
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = icmp ne i8 %28, 0
  br label %30

30:                                               ; preds = %26, %23
  %31 = phi i1 [ false, %23 ], [ %29, %26 ]
  br i1 %31, label %32, label %124

32:                                               ; preds = %30
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !11
  %35 = sext i8 %34 to i32
  %36 = icmp ne i32 %35, 60
  br i1 %36, label %37, label %91

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %38 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #7
  invoke void @_ZN9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(96) %38, ptr noundef @.str.11)
          to label %39 unwind label %48

39:                                               ; preds = %37
  store ptr %38, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %53, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %52

45:                                               ; preds = %42
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %46, i32 noundef 3, ptr noundef null, ptr noundef null, i32 noundef %47)
  br label %52

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %13, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %38, i64 noundef 96) #8
  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
  br label %138

52:                                               ; preds = %45, %42
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %88

53:                                               ; preds = %39
  %54 = call noundef zeroext i1 @_ZN9TiXmlBase21IsWhiteSpaceCondensedEv()
  br i1 %54, label %55, label %64

55:                                               ; preds = %53
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = load ptr, ptr %56, align 8, !tbaa !12
  %61 = getelementptr inbounds ptr, ptr %60, i64 3
  %62 = load ptr, ptr %61, align 8
  %63 = call noundef ptr %62(ptr noundef nonnull align 8 dereferenceable(96) %56, ptr noundef %57, ptr noundef %58, i32 noundef %59)
  store ptr %63, ptr %7, align 8, !tbaa !5
  br label %73

64:                                               ; preds = %53
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = load ptr, ptr %65, align 8, !tbaa !12
  %70 = getelementptr inbounds ptr, ptr %69, i64 3
  %71 = load ptr, ptr %70, align 8
  %72 = call noundef ptr %71(ptr noundef nonnull align 8 dereferenceable(96) %65, ptr noundef %66, ptr noundef %67, i32 noundef %68)
  store ptr %72, ptr %7, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %64, %55
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = call noundef zeroext i1 @_ZNK9TiXmlText5BlankEv(ptr noundef nonnull align 8 dereferenceable(96) %74)
  br i1 %75, label %79, label %76

76:                                               ; preds = %73
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = call noundef ptr @_ZN9TiXmlNode12LinkEndChildEPS_(ptr noundef nonnull align 8 dereferenceable(96) %17, ptr noundef %77)
  br label %87

79:                                               ; preds = %73
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = icmp eq ptr %80, null
  br i1 %81, label %86, label %82

82:                                               ; preds = %79
  %83 = load ptr, ptr %80, align 8, !tbaa !12
  %84 = getelementptr inbounds ptr, ptr %83, i64 1
  %85 = load ptr, ptr %84, align 8
  call void %85(ptr noundef nonnull align 8 dereferenceable(96) %80) #6
  br label %86

86:                                               ; preds = %82, %79
  br label %87

87:                                               ; preds = %86, %76
  store i32 0, ptr %15, align 4
  br label %88

88:                                               ; preds = %87, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %89 = load i32, ptr %15, align 4
  switch i32 %89, label %136 [
    i32 0, label %90
  ]

90:                                               ; preds = %88
  br label %120

91:                                               ; preds = %32
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef %92, ptr noundef @.str.22, i1 noundef zeroext false, i32 noundef %93)
  br i1 %94, label %95, label %97

95:                                               ; preds = %91
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %96, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %136

97:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load i32, ptr %9, align 4, !tbaa !9
  %100 = call noundef ptr @_ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(96) %17, ptr noundef %98, i32 noundef %99)
  store ptr %100, ptr %16, align 8, !tbaa !5
  %101 = load ptr, ptr %16, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %114

103:                                              ; preds = %97
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = load ptr, ptr %104, align 8, !tbaa !12
  %109 = getelementptr inbounds ptr, ptr %108, i64 3
  %110 = load ptr, ptr %109, align 8
  %111 = call noundef ptr %110(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef %105, ptr noundef %106, i32 noundef %107)
  store ptr %111, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %16, align 8, !tbaa !5
  %113 = call noundef ptr @_ZN9TiXmlNode12LinkEndChildEPS_(ptr noundef nonnull align 8 dereferenceable(96) %17, ptr noundef %112)
  br label %115

114:                                              ; preds = %97
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %116

115:                                              ; preds = %103
  store i32 0, ptr %15, align 4
  br label %116

116:                                              ; preds = %115, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %117 = load i32, ptr %15, align 4
  switch i32 %117, label %136 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119, %90
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %121, i32 noundef %122)
  store ptr %123, ptr %7, align 8, !tbaa !5
  br label %23, !llvm.loop !14

124:                                              ; preds = %30
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %134, label %127

127:                                              ; preds = %124
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = icmp ne ptr %128, null
  br i1 %129, label %130, label %133

130:                                              ; preds = %127
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %131, i32 noundef 6, ptr noundef null, ptr noundef null, i32 noundef %132)
  br label %133

133:                                              ; preds = %130, %127
  br label %134

134:                                              ; preds = %133, %124
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %135, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %136

136:                                              ; preds = %134, %116, %95, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %137 = load ptr, ptr %5, align 8
  ret ptr %137

138:                                              ; preds = %48
  %139 = load ptr, ptr %13, align 8
  %140 = load i32, ptr %14, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9TiXmlBase21IsWhiteSpaceCondensedEv() #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9TiXmlText5BlankEv(ptr noundef nonnull align 8 dereferenceable(96)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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) }
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, !13, i64 0}
!13 = !{!"vtable pointer", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [3 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

declare noundef ptr @_ZN9TiXmlNode12LinkEndChildEPS_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN12TiXmlElement9ReadValueEPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = tail call noundef ptr @_ZN9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  %6 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %1, i32 noundef %3)
  %.not62 = icmp eq ptr %6, null
  br i1 %.not62, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %4, %39
  %.04863 = phi ptr [ %40, %39 ], [ %6, %4 ]
  %7 = load i8, ptr %.04863, align 1, !tbaa !5
  switch i8 %7, label %8 [
    i8 0, label %.critedge.thread
    i8 60, label %29
  ]

8:                                                ; preds = %.lr.ph
  %9 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #5
  invoke void @_ZN9TiXmlTextC2EPKc(ptr noundef nonnull align 8 dereferenceable(96) %9, ptr noundef nonnull @.str.11)
          to label %12 unwind label %10

10:                                               ; preds = %8
  %11 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %9, i64 noundef 96) #6
  resume { ptr, i32 } %11

12:                                               ; preds = %8
  %13 = tail call noundef zeroext i1 @_ZN9TiXmlBase21IsWhiteSpaceCondensedEv()
  %14 = load ptr, ptr %9, align 8, !tbaa !8
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8
  br i1 %13, label %17, label %19

17:                                               ; preds = %12
  %18 = tail call noundef ptr %16(ptr noundef nonnull align 8 dereferenceable(96) %9, ptr noundef nonnull %.04863, ptr noundef %2, i32 noundef %3)
  br label %21

19:                                               ; preds = %12
  %20 = tail call noundef ptr %16(ptr noundef nonnull align 8 dereferenceable(96) %9, ptr noundef %1, ptr noundef %2, i32 noundef %3)
  br label %21

21:                                               ; preds = %19, %17
  %.149 = phi ptr [ %18, %17 ], [ %20, %19 ]
  %22 = tail call noundef zeroext i1 @_ZNK9TiXmlText5BlankEv(ptr noundef nonnull align 8 dereferenceable(96) %9)
  br i1 %22, label %25, label %23

23:                                               ; preds = %21
  %24 = tail call noundef ptr @_ZN9TiXmlNode12LinkEndChildEPS_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull %9)
  br label %39

25:                                               ; preds = %21
  %26 = load ptr, ptr %9, align 8, !tbaa !8
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load ptr, ptr %27, align 8
  tail call void %28(ptr noundef nonnull align 8 dereferenceable(96) %9) #7
  br label %39

29:                                               ; preds = %.lr.ph
  %30 = tail call noundef zeroext i1 @_ZN9TiXmlBase11StringEqualEPKcS1_b13TiXmlEncoding(ptr noundef nonnull %.04863, ptr noundef nonnull @.str.22, i1 noundef zeroext false, i32 noundef %3)
  br i1 %30, label %.critedge.thread, label %31

31:                                               ; preds = %29
  %32 = tail call noundef ptr @_ZN9TiXmlNode8IdentifyEPKc13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull %.04863, i32 noundef %3)
  %.not59.not = icmp eq ptr %32, null
  br i1 %.not59.not, label %.critedge.thread, label %33

33:                                               ; preds = %31
  %34 = load ptr, ptr %32, align 8, !tbaa !8
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  %36 = load ptr, ptr %35, align 8
  %37 = tail call noundef ptr %36(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull %.04863, ptr noundef %2, i32 noundef %3)
  %38 = tail call noundef ptr @_ZN9TiXmlNode12LinkEndChildEPS_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull %32)
  br label %39

39:                                               ; preds = %33, %25, %23
  %.452 = phi ptr [ %37, %33 ], [ %.149, %23 ], [ %.149, %25 ]
  %40 = tail call noundef ptr @_ZN9TiXmlBase14SkipWhiteSpaceEPKc13TiXmlEncoding(ptr noundef %.452, i32 noundef %3)
  %.not = icmp eq ptr %40, null
  br i1 %.not, label %.critedge, label %.lr.ph, !llvm.loop !10

.critedge:                                        ; preds = %39, %4
  %.not64 = icmp eq ptr %5, null
  br i1 %.not64, label %.critedge.thread, label %41

41:                                               ; preds = %.critedge
  tail call void @_ZN13TiXmlDocument8SetErrorEiPKcP16TiXmlParsingData13TiXmlEncoding(ptr noundef nonnull align 8 dereferenceable(140) %5, i32 noundef 6, ptr noundef null, ptr noundef null, i32 noundef %3)
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %31, %.lr.ph, %29, %.critedge, %41
  %.4 = phi ptr [ null, %41 ], [ null, %.critedge ], [ null, %31 ], [ %.04863, %.lr.ph ], [ %.04863, %29 ]
  ret ptr %.4
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9TiXmlBase21IsWhiteSpaceCondensedEv() local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK9TiXmlText5BlankEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 #3 = { 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 #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) }
attributes #6 = { builtin nounwind }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"vtable pointer", !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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