; LLVM IR from thuhcsi/Crystal.TTVS :: TinyXML/tinyxml.ll (ZNK12TiXmlElement5PrintEP8_IO_FILEi)

; 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 }
%class.TiXmlElement = type { %class.TiXmlNode, %class.TiXmlAttributeSet }
%class.TiXmlAttributeSet = type { %class.TiXmlAttribute }
%class.TiXmlAttribute = type { %class.TiXmlBase, ptr, %class.TiXmlString, %class.TiXmlString, ptr, ptr }

@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 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 ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK12TiXmlElement5PrintEP8_IO_FILEi(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %10 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %18, %3
  %12 = load i32, ptr %7, align 4, !tbaa !9
  %13 = load i32, ptr %6, align 4, !tbaa !9
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %15, label %21

15:                                               ; preds = %11
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str.8) #4
  br label %18

18:                                               ; preds = %15
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %7, align 4, !tbaa !9
  br label %11, !llvm.loop !11

21:                                               ; preds = %11
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 5
  %24 = call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.9, ptr noundef %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %26 = getelementptr inbounds %class.TiXmlElement, ptr %10, i32 0, i32 1
  %27 = call noundef ptr @_ZNK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(96) %26)
  store ptr %27, ptr %8, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %40, %21
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %43

31:                                               ; preds = %28
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.10) #4
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %34, align 8, !tbaa !13
  %38 = getelementptr inbounds ptr, ptr %37, i64 2
  %39 = load ptr, ptr %38, align 8
  call void %39(ptr noundef nonnull align 8 dereferenceable(96) %34, ptr noundef %35, i32 noundef %36)
  br label %40

40:                                               ; preds = %31
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = call noundef ptr @_ZNK14TiXmlAttribute4NextEv(ptr noundef nonnull align 8 dereferenceable(96) %41)
  store ptr %42, ptr %8, align 8, !tbaa !5
  br label %28, !llvm.loop !15

43:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %44 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !16
  %46 = icmp ne ptr %45, null
  br i1 %46, label %50, label %47

47:                                               ; preds = %43
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.11) #4
  br label %121

50:                                               ; preds = %43
  %51 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  %53 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = icmp eq ptr %52, %54
  br i1 %55, label %56, label %76

56:                                               ; preds = %50
  %57 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = call noundef ptr @_ZN9TiXmlNode6ToTextEv(ptr noundef nonnull align 8 dereferenceable(96) %58)
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %76

61:                                               ; preds = %56
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.12) #4
  %64 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  %69 = load ptr, ptr %65, align 8, !tbaa !13
  %70 = getelementptr inbounds ptr, ptr %69, i64 2
  %71 = load ptr, ptr %70, align 8
  call void %71(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef %66, i32 noundef %68)
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 5
  %74 = call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %73)
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.13, ptr noundef %74) #4
  br label %120

76:                                               ; preds = %56, %50
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.12) #4
  %79 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %80 = load ptr, ptr %79, align 8, !tbaa !16
  store ptr %80, ptr %9, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %99, %76
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %102

84:                                               ; preds = %81
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = call noundef ptr @_ZN9TiXmlNode6ToTextEv(ptr noundef nonnull align 8 dereferenceable(96) %85)
  %87 = icmp ne ptr %86, null
  br i1 %87, label %91, label %88

88:                                               ; preds = %84
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.14) #4
  br label %91

91:                                               ; preds = %88, %84
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  %96 = load ptr, ptr %92, align 8, !tbaa !13
  %97 = getelementptr inbounds ptr, ptr %96, i64 2
  %98 = load ptr, ptr %97, align 8
  call void %98(ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef %93, i32 noundef %95)
  br label %99

99:                                               ; preds = %91
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = call noundef ptr @_ZN9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(96) %100)
  store ptr %101, ptr %9, align 8, !tbaa !5
  br label %81, !llvm.loop !24

102:                                              ; preds = %81
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.14) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %112, %102
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %109, label %115

109:                                              ; preds = %105
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.8) #4
  br label %112

112:                                              ; preds = %109
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %7, align 4, !tbaa !9
  br label %105, !llvm.loop !25

115:                                              ; preds = %105
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 5
  %118 = call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %117)
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.13, ptr noundef %118) #4
  br label %120

120:                                              ; preds = %115, %61
  br label %121

121:                                              ; preds = %120, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

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

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

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = distinct !{!15, !12}
!16 = !{!17, !6, i64 40}
!17 = !{!"_ZTS9TiXmlNode", !18, i64 0, !6, i64 24, !20, i64 32, !6, i64 40, !6, i64 48, !21, i64 56, !6, i64 80, !6, i64 88}
!18 = !{!"_ZTS9TiXmlBase", !19, i64 8, !6, i64 16}
!19 = !{!"_ZTS11TiXmlCursor", !10, i64 0, !10, i64 4}
!20 = !{!"_ZTSN9TiXmlNode8NodeTypeE", !7, i64 0}
!21 = !{!"_ZTS11TiXmlString", !6, i64 0, !22, i64 8, !22, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{!17, !6, i64 48}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}


; 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.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK12TiXmlElement5PrintEP8_IO_FILEi(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #1 align 2 {
  %4 = icmp sgt i32 %2, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3, %.lr.ph
  %.03138 = phi i32 [ %6, %.lr.ph ], [ 0, %3 ]
  %5 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.8) #3
  %6 = add nuw nsw i32 %.03138, 1
  %exitcond.not = icmp eq i32 %6, %2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %3
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = tail call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.9, ptr noundef %8) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 96
  %11 = tail call noundef ptr @_ZNK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(96) %10)
  %.not39 = icmp eq ptr %11, null
  br i1 %.not39, label %._crit_edge43, label %.lr.ph42

.lr.ph42:                                         ; preds = %._crit_edge, %.lr.ph42
  %.03040 = phi ptr [ %16, %.lr.ph42 ], [ %11, %._crit_edge ]
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.10) #3
  %13 = load ptr, ptr %.03040, align 8, !tbaa !7
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load ptr, ptr %14, align 8
  tail call void %15(ptr noundef nonnull align 8 dereferenceable(96) %.03040, ptr noundef %1, i32 noundef %2)
  %16 = tail call noundef ptr @_ZNK14TiXmlAttribute4NextEv(ptr noundef nonnull align 8 dereferenceable(96) %.03040)
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %._crit_edge43, label %.lr.ph42, !llvm.loop !10

._crit_edge43:                                    ; preds = %.lr.ph42, %._crit_edge
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %.not34 = icmp eq ptr %18, null
  br i1 %.not34, label %19, label %21

19:                                               ; preds = %._crit_edge43
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.11) #3
  br label %54

21:                                               ; preds = %._crit_edge43
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %23 = load ptr, ptr %22, align 8, !tbaa !21
  %24 = icmp eq ptr %18, %23
  br i1 %24, label %25, label %36

25:                                               ; preds = %21
  %26 = tail call noundef ptr @_ZN9TiXmlNode6ToTextEv(ptr noundef nonnull align 8 dereferenceable(96) %18)
  %.not35 = icmp eq ptr %26, null
  br i1 %.not35, label %36, label %27

27:                                               ; preds = %25
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.12) #3
  %29 = load ptr, ptr %17, align 8, !tbaa !11
  %30 = add nsw i32 %2, 1
  %31 = load ptr, ptr %29, align 8, !tbaa !7
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load ptr, ptr %32, align 8
  tail call void %33(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef %1, i32 noundef %30)
  %34 = tail call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.13, ptr noundef %34) #3
  br label %54

36:                                               ; preds = %25, %21
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.12) #3
  %38 = load ptr, ptr %17, align 8, !tbaa !11
  %.not3644 = icmp eq ptr %38, null
  br i1 %.not3644, label %._crit_edge48, label %.lr.ph47

.lr.ph47:                                         ; preds = %36
  %39 = add nsw i32 %2, 1
  br label %40

40:                                               ; preds = %.lr.ph47, %44
  %.045 = phi ptr [ %38, %.lr.ph47 ], [ %48, %44 ]
  %41 = tail call noundef ptr @_ZN9TiXmlNode6ToTextEv(ptr noundef nonnull align 8 dereferenceable(96) %.045)
  %.not37 = icmp eq ptr %41, null
  br i1 %.not37, label %42, label %44

42:                                               ; preds = %40
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.14) #3
  br label %44

44:                                               ; preds = %42, %40
  %45 = load ptr, ptr %.045, align 8, !tbaa !7
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = load ptr, ptr %46, align 8
  tail call void %47(ptr noundef nonnull align 8 dereferenceable(24) %.045, ptr noundef %1, i32 noundef %39)
  %48 = tail call noundef ptr @_ZN9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(96) %.045)
  %.not36 = icmp eq ptr %48, null
  br i1 %.not36, label %._crit_edge48, label %40, !llvm.loop !22

._crit_edge48:                                    ; preds = %44, %36
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.14) #3
  br i1 %4, label %.lr.ph51, label %._crit_edge52

.lr.ph51:                                         ; preds = %._crit_edge48, %.lr.ph51
  %.149 = phi i32 [ %51, %.lr.ph51 ], [ 0, %._crit_edge48 ]
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.8) #3
  %51 = add nuw nsw i32 %.149, 1
  %exitcond53.not = icmp eq i32 %51, %2
  br i1 %exitcond53.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !23

._crit_edge52:                                    ; preds = %.lr.ph51, %._crit_edge48
  %52 = tail call noundef ptr @_ZNK11TiXmlString5c_strEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %53 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.13, ptr noundef %52) #3
  br label %54

54:                                               ; preds = %27, %._crit_edge52, %19
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode6ToTextEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #0 align 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 = { nofree 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 #3 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"vtable pointer", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !6}
!11 = !{!12, !17, i64 40}
!12 = !{!"_ZTS9TiXmlNode", !13, i64 0, !17, i64 24, !18, i64 32, !17, i64 40, !17, i64 48, !19, i64 56, !17, i64 80, !17, i64 88}
!13 = !{!"_ZTS9TiXmlBase", !14, i64 8, !17, i64 16}
!14 = !{!"_ZTS11TiXmlCursor", !15, i64 0, !15, i64 4}
!15 = !{!"int", !16, i64 0}
!16 = !{!"omnipotent char", !9, i64 0}
!17 = !{!"any pointer", !16, i64 0}
!18 = !{!"_ZTSN9TiXmlNode8NodeTypeE", !16, i64 0}
!19 = !{!"_ZTS11TiXmlString", !17, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"long", !16, i64 0}
!21 = !{!12, !17, i64 48}
!22 = distinct !{!22, !6}
!23 = distinct !{!23, !6}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass