; LLVM IR from HiroIshida/tinyfk :: urdf_parser/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.std::__cxx11::basic_string", ptr, ptr }
%class.TiXmlBase = type { ptr, %struct.TiXmlCursor, ptr }
%struct.TiXmlCursor = type { i32, i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.TiXmlElement = type { %class.TiXmlNode, %class.TiXmlAttributeSet }
%class.TiXmlAttributeSet = type { %class.TiXmlAttribute }
%class.TiXmlAttribute = type { %class.TiXmlBase, ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK12TiXmlElement5PrintEP8_IO_FILEi = external hidden unnamed_addr constant [52 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = 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: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK12TiXmlElement5PrintEP8_IO_FILEi(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #3 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) #5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %16

14:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.2, i32 noundef 803, ptr noundef @__PRETTY_FUNCTION__._ZNK12TiXmlElement5PrintEP8_IO_FILEi) #6
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %24, %16
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %21, label %27

21:                                               ; preds = %17
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.14) #5
  br label %24

24:                                               ; preds = %21
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %7, align 4, !tbaa !9
  br label %17, !llvm.loop !11

27:                                               ; preds = %17
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 5
  %30 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.15, ptr noundef %30) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %32 = getelementptr inbounds %class.TiXmlElement, ptr %10, i32 0, i32 1
  %33 = call noundef ptr @_ZNK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(112) %32)
  store ptr %33, ptr %8, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %46, %27
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %49

37:                                               ; preds = %34
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.16) #5
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = load ptr, ptr %40, align 8, !tbaa !13
  %44 = getelementptr inbounds ptr, ptr %43, i64 2
  %45 = load ptr, ptr %44, align 8
  call void %45(ptr noundef nonnull align 8 dereferenceable(112) %40, ptr noundef %41, i32 noundef %42)
  br label %46

46:                                               ; preds = %37
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNK14TiXmlAttribute4NextEv(ptr noundef nonnull align 8 dereferenceable(112) %47)
  store ptr %48, ptr %8, align 8, !tbaa !5
  br label %34, !llvm.loop !15

49:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %50 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = icmp ne ptr %51, null
  br i1 %52, label %56, label %53

53:                                               ; preds = %49
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str.17) #5
  br label %133

56:                                               ; preds = %49
  %57 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !24
  %61 = icmp eq ptr %58, %60
  br i1 %61, label %62, label %85

62:                                               ; preds = %56
  %63 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds ptr, ptr %65, i64 14
  %67 = load ptr, ptr %66, align 8
  %68 = call noundef ptr %67(ptr noundef nonnull align 8 dereferenceable(104) %64)
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %85

70:                                               ; preds = %62
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.18) #5
  %73 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  %78 = load ptr, ptr %74, align 8, !tbaa !13
  %79 = getelementptr inbounds ptr, ptr %78, i64 2
  %80 = load ptr, ptr %79, align 8
  call void %80(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef %75, i32 noundef %77)
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 5
  %83 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %82) #5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.19, ptr noundef %83) #5
  br label %132

85:                                               ; preds = %62, %56
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.18) #5
  %88 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  store ptr %89, ptr %9, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %111, %85
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %93, label %114

93:                                               ; preds = %90
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load ptr, ptr %94, align 8, !tbaa !13
  %96 = getelementptr inbounds ptr, ptr %95, i64 14
  %97 = load ptr, ptr %96, align 8
  %98 = call noundef ptr %97(ptr noundef nonnull align 8 dereferenceable(104) %94)
  %99 = icmp ne ptr %98, null
  br i1 %99, label %103, label %100

100:                                              ; preds = %93
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.20) #5
  br label %103

103:                                              ; preds = %100, %93
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %6, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  %108 = load ptr, ptr %104, align 8, !tbaa !13
  %109 = getelementptr inbounds ptr, ptr %108, i64 2
  %110 = load ptr, ptr %109, align 8
  call void %110(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef %105, i32 noundef %107)
  br label %111

111:                                              ; preds = %103
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call noundef ptr @_ZN9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(104) %112)
  store ptr %113, ptr %9, align 8, !tbaa !5
  br label %90, !llvm.loop !25

114:                                              ; preds = %90
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.20) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %124, %114
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = load i32, ptr %6, align 4, !tbaa !9
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %121, label %127

121:                                              ; preds = %117
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.14) #5
  br label %124

124:                                              ; preds = %121
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %7, align 4, !tbaa !9
  br label %117, !llvm.loop !26

127:                                              ; preds = %117
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %class.TiXmlNode, ptr %10, i32 0, i32 5
  %130 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %129) #5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.19, ptr noundef %130) #5
  br label %132

132:                                              ; preds = %127, %70
  br label %133

133:                                              ; preds = %132, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(104)) #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 = { noreturn 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nounwind }
attributes #6 = { noreturn 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 88, !6, i64 96}
!18 = !{!"_ZTS9TiXmlBase", !19, i64 8, !6, i64 16}
!19 = !{!"_ZTS11TiXmlCursor", !10, i64 0, !10, i64 4}
!20 = !{!"_ZTSN9TiXmlNode8NodeTypeE", !7, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!17, !6, i64 48}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !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.2 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK12TiXmlElement5PrintEP8_IO_FILEi = external hidden unnamed_addr constant [52 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK12TiXmlElement5PrintEP8_IO_FILEi(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1, i32 noundef %2) unnamed_addr #2 align 2 {
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %5, label %.preheader

.preheader:                                       ; preds = %3
  %4 = icmp sgt i32 %2, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

5:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.2, i32 noundef 803, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK12TiXmlElement5PrintEP8_IO_FILEi) #4
  unreachable

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

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.15, ptr noundef %9) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 104
  %12 = tail call noundef ptr @_ZNK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(112) %11)
  %.not3642 = icmp eq ptr %12, null
  br i1 %.not3642, label %._crit_edge46, label %.lr.ph45

.lr.ph45:                                         ; preds = %._crit_edge, %.lr.ph45
  %.03143 = phi ptr [ %17, %.lr.ph45 ], [ %12, %._crit_edge ]
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.16) #5
  %14 = load ptr, ptr %.03143, align 8, !tbaa !7
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8
  tail call void %16(ptr noundef nonnull align 8 dereferenceable(112) %.03143, ptr noundef nonnull %1, i32 noundef %2)
  %17 = tail call noundef ptr @_ZNK14TiXmlAttribute4NextEv(ptr noundef nonnull align 8 dereferenceable(112) %.03143)
  %.not36 = icmp eq ptr %17, null
  br i1 %.not36, label %._crit_edge46, label %.lr.ph45, !llvm.loop !10

._crit_edge46:                                    ; preds = %.lr.ph45, %._crit_edge
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %.not37 = icmp eq ptr %19, null
  br i1 %.not37, label %20, label %22

20:                                               ; preds = %._crit_edge46
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.17) #5
  br label %61

22:                                               ; preds = %._crit_edge46
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  %24 = load ptr, ptr %23, align 8, !tbaa !22
  %25 = icmp eq ptr %19, %24
  br i1 %25, label %26, label %40

26:                                               ; preds = %22
  %27 = load ptr, ptr %19, align 8, !tbaa !7
  %28 = getelementptr inbounds i8, ptr %27, i64 112
  %29 = load ptr, ptr %28, align 8
  %30 = tail call noundef ptr %29(ptr noundef nonnull align 8 dereferenceable(104) %19)
  %.not38 = icmp eq ptr %30, null
  br i1 %.not38, label %40, label %31

31:                                               ; preds = %26
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.18) #5
  %33 = load ptr, ptr %18, align 8, !tbaa !11
  %34 = add nsw i32 %2, 1
  %35 = load ptr, ptr %33, align 8, !tbaa !7
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %37 = load ptr, ptr %36, align 8
  tail call void %37(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull %1, i32 noundef %34)
  %38 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.19, ptr noundef %38) #5
  br label %61

40:                                               ; preds = %26, %22
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.18) #5
  %42 = load ptr, ptr %18, align 8, !tbaa !11
  %.not3947 = icmp eq ptr %42, null
  br i1 %.not3947, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %40
  %43 = add nsw i32 %2, 1
  br label %44

44:                                               ; preds = %.lr.ph50, %51
  %.048 = phi ptr [ %42, %.lr.ph50 ], [ %55, %51 ]
  %45 = load ptr, ptr %.048, align 8, !tbaa !7
  %46 = getelementptr inbounds i8, ptr %45, i64 112
  %47 = load ptr, ptr %46, align 8
  %48 = tail call noundef ptr %47(ptr noundef nonnull align 8 dereferenceable(104) %.048)
  %.not40 = icmp eq ptr %48, null
  br i1 %.not40, label %49, label %51

49:                                               ; preds = %44
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.20) #5
  br label %51

51:                                               ; preds = %49, %44
  %52 = load ptr, ptr %.048, align 8, !tbaa !7
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load ptr, ptr %53, align 8
  tail call void %54(ptr noundef nonnull align 8 dereferenceable(24) %.048, ptr noundef nonnull %1, i32 noundef %43)
  %55 = tail call noundef ptr @_ZN9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(104) %.048)
  %.not39 = icmp eq ptr %55, null
  br i1 %.not39, label %._crit_edge51, label %44, !llvm.loop !23

._crit_edge51:                                    ; preds = %51, %40
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.20) #5
  br i1 %4, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %._crit_edge51, %.lr.ph54
  %.152 = phi i32 [ %58, %.lr.ph54 ], [ 0, %._crit_edge51 ]
  %57 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.14) #5
  %58 = add nuw nsw i32 %.152, 1
  %exitcond56.not = icmp eq i32 %58, %2
  br i1 %exitcond56.not, label %._crit_edge55, label %.lr.ph54, !llvm.loop !24

._crit_edge55:                                    ; preds = %.lr.ph54, %._crit_edge51
  %59 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.19, ptr noundef %59) #5
  br label %61

61:                                               ; preds = %31, %._crit_edge55, %20
  ret void
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(104)) 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 = { noreturn 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 #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 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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 88, !17, i64 96}
!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 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !16, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !17, i64 0}
!21 = !{!"long", !16, i64 0}
!22 = !{!12, !17, i64 48}
!23 = distinct !{!23, !6}
!24 = distinct !{!24, !6}


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