; LLVM IR from simbody/simbody :: SimTKcommon/src/tinyxml.ll (ZNK5SimTK12TiXmlElement5PrintEP8_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.SimTK::TiXmlNode" = type { %"class.SimTK::TiXmlBase", ptr, i32, ptr, ptr, %"class.SimTK::String", ptr, ptr }
%"class.SimTK::TiXmlBase" = type { ptr, %"struct.SimTK::TiXmlCursor", ptr }
%"struct.SimTK::TiXmlCursor" = type { i32, i32 }
%"class.SimTK::String" = type { %"class.std::__cxx11::basic_string" }
%"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.SimTK::TiXmlElement" = type { %"class.SimTK::TiXmlNode", %"class.SimTK::TiXmlAttributeSet" }
%"class.SimTK::TiXmlAttributeSet" = type { %"class.SimTK::TiXmlAttribute" }
%"class.SimTK::TiXmlAttribute" = type { %"class.SimTK::TiXmlBase", ptr, %"class.SimTK::String", %"class.SimTK::String", ptr, ptr }

@.str.19 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK5SimTK12TiXmlElement5PrintEP8_IO_FILEi = external hidden unnamed_addr constant [59 x i8], align 1
@_ZL18DefaultIndentChars = external hidden global ptr, align 8
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.44 = 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
declare dso_local noundef ptr @_ZNK5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5SimTK12TiXmlElement5PrintEP8_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
  %10 = 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
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %3
  br label %17

15:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.19, i32 noundef 903, ptr noundef @__PRETTY_FUNCTION__._ZNK5SimTK12TiXmlElement5PrintEP8_IO_FILEi) #6
  unreachable

16:                                               ; No predecessors!
  br label %17

17:                                               ; preds = %16, %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %18 = call noundef ptr @_ZNK5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %23

20:                                               ; preds = %17
  %21 = call noundef ptr @_ZNK5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
  %22 = call noundef ptr @_ZNK5SimTK13TiXmlDocument14GetIndentCharsEv(ptr noundef nonnull align 8 dereferenceable(192) %21)
  br label %25

23:                                               ; preds = %17
  %24 = load ptr, ptr @_ZL18DefaultIndentChars, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %23, %20
  %26 = phi ptr [ %22, %20 ], [ %24, %23 ]
  store ptr %26, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %35, %25
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %31, label %38

31:                                               ; preds = %27
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.38, ptr noundef %33) #5
  br label %35

35:                                               ; preds = %31
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %7, align 4, !tbaa !9
  br label %27, !llvm.loop !11

38:                                               ; preds = %27
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 5
  %41 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %40) #5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.39, ptr noundef %41) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %43 = getelementptr inbounds %"class.SimTK::TiXmlElement", ptr %11, i32 0, i32 1
  %44 = call noundef ptr @_ZNK5SimTK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(112) %43)
  store ptr %44, ptr %9, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %57, %38
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %60

48:                                               ; preds = %45
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.40) #5
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = load ptr, ptr %51, align 8, !tbaa !13
  %55 = getelementptr inbounds ptr, ptr %54, i64 2
  %56 = load ptr, ptr %55, align 8
  call void %56(ptr noundef nonnull align 8 dereferenceable(112) %51, ptr noundef %52, i32 noundef %53)
  br label %57

57:                                               ; preds = %48
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = call noundef ptr @_ZNK5SimTK14TiXmlAttribute4NextEv(ptr noundef nonnull align 8 dereferenceable(112) %58)
  store ptr %59, ptr %9, align 8, !tbaa !5
  br label %45, !llvm.loop !15

60:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %61 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = icmp ne ptr %62, null
  br i1 %63, label %67, label %64

64:                                               ; preds = %60
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.41) #5
  br label %145

67:                                               ; preds = %60
  %68 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = icmp eq ptr %69, %71
  br i1 %72, label %73, label %96

73:                                               ; preds = %67
  %74 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 3
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = getelementptr inbounds ptr, ptr %76, i64 14
  %78 = load ptr, ptr %77, align 8
  %79 = call noundef ptr %78(ptr noundef nonnull align 8 dereferenceable(104) %75)
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %96

81:                                               ; preds = %73
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.42) #5
  %84 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  %89 = load ptr, ptr %85, align 8, !tbaa !13
  %90 = getelementptr inbounds ptr, ptr %89, i64 2
  %91 = load ptr, ptr %90, align 8
  call void %91(ptr noundef nonnull align 8 dereferenceable(24) %85, ptr noundef %86, i32 noundef %88)
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 5
  %94 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %93) #5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef @.str.43, ptr noundef %94) #5
  br label %144

96:                                               ; preds = %73, %67
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.42) #5
  %99 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 3
  %100 = load ptr, ptr %99, align 8, !tbaa !16
  store ptr %100, ptr %10, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %122, %96
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %125

104:                                              ; preds = %101
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  %107 = getelementptr inbounds ptr, ptr %106, i64 14
  %108 = load ptr, ptr %107, align 8
  %109 = call noundef ptr %108(ptr noundef nonnull align 8 dereferenceable(104) %105)
  %110 = icmp ne ptr %109, null
  br i1 %110, label %114, label %111

111:                                              ; preds = %104
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.44) #5
  br label %114

114:                                              ; preds = %111, %104
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  %119 = load ptr, ptr %115, align 8, !tbaa !13
  %120 = getelementptr inbounds ptr, ptr %119, i64 2
  %121 = load ptr, ptr %120, align 8
  call void %121(ptr noundef nonnull align 8 dereferenceable(24) %115, ptr noundef %116, i32 noundef %118)
  br label %122

122:                                              ; preds = %114
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = call noundef ptr @_ZN5SimTK9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(104) %123)
  store ptr %124, ptr %10, align 8, !tbaa !5
  br label %101, !llvm.loop !26

125:                                              ; preds = %101
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.44) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %136, %125
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = load i32, ptr %6, align 4, !tbaa !9
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %139

132:                                              ; preds = %128
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.38, ptr noundef %134) #5
  br label %136

136:                                              ; preds = %132
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %7, align 4, !tbaa !9
  br label %128, !llvm.loop !27

139:                                              ; preds = %128
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.SimTK::TiXmlNode", ptr %11, i32 0, i32 5
  %142 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %141) #5
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.43, ptr noundef %142) #5
  br label %144

144:                                              ; preds = %139, %81
  br label %145

145:                                              ; preds = %144, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK5SimTK13TiXmlDocument14GetIndentCharsEv(ptr noundef nonnull align 8 dereferenceable(192)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlNode11NextSiblingEv(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 = !{!"_ZTSN5SimTK9TiXmlNodeE", !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 = !{!"_ZTSN5SimTK9TiXmlBaseE", !19, i64 8, !6, i64 16}
!19 = !{!"_ZTSN5SimTK11TiXmlCursorE", !10, i64 0, !10, i64 4}
!20 = !{!"_ZTSN5SimTK9TiXmlNode8NodeTypeE", !7, i64 0}
!21 = !{!"_ZTSN5SimTK6StringE", !22, i64 0}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !24, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!17, !6, i64 48}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !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.19 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK5SimTK12TiXmlElement5PrintEP8_IO_FILEi = external hidden unnamed_addr constant [59 x i8], align 1
@_ZL18DefaultIndentChars = external hidden local_unnamed_addr global ptr, align 8
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.44 = 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
declare dso_local noundef ptr @_ZNK5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5SimTK12TiXmlElement5PrintEP8_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 %4, label %5

4:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.19, i32 noundef 903, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK5SimTK12TiXmlElement5PrintEP8_IO_FILEi) #4
  unreachable

5:                                                ; preds = %3
  %6 = tail call noundef ptr @_ZNK5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not38 = icmp eq ptr %6, null
  br i1 %.not38, label %10, label %7

7:                                                ; preds = %5
  %8 = tail call noundef ptr @_ZNK5SimTK9TiXmlNode11GetDocumentEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %9 = tail call noundef ptr @_ZNK5SimTK13TiXmlDocument14GetIndentCharsEv(ptr noundef nonnull align 8 dereferenceable(192) %8)
  br label %12

10:                                               ; preds = %5
  %11 = load ptr, ptr @_ZL18DefaultIndentChars, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %10, %7
  %13 = phi ptr [ %9, %7 ], [ %11, %10 ]
  %14 = icmp sgt i32 %2, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %12, %.lr.ph
  %.03444 = phi i32 [ %16, %.lr.ph ], [ 0, %12 ]
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.38, ptr noundef %13) #5
  %16 = add nuw nsw i32 %.03444, 1
  %exitcond.not = icmp eq i32 %16, %2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %12
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.39, ptr noundef %18) #5
  %20 = getelementptr inbounds i8, ptr %0, i64 104
  %21 = tail call noundef ptr @_ZNK5SimTK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(112) %20)
  %.not3945 = icmp eq ptr %21, null
  br i1 %.not3945, label %._crit_edge49, label %.lr.ph48

.lr.ph48:                                         ; preds = %._crit_edge, %.lr.ph48
  %.03346 = phi ptr [ %26, %.lr.ph48 ], [ %21, %._crit_edge ]
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.40) #5
  %23 = load ptr, ptr %.03346, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = load ptr, ptr %24, align 8
  tail call void %25(ptr noundef nonnull align 8 dereferenceable(112) %.03346, ptr noundef nonnull %1, i32 noundef %2)
  %26 = tail call noundef ptr @_ZNK5SimTK14TiXmlAttribute4NextEv(ptr noundef nonnull align 8 dereferenceable(112) %.03346)
  %.not39 = icmp eq ptr %26, null
  br i1 %.not39, label %._crit_edge49, label %.lr.ph48, !llvm.loop !13

._crit_edge49:                                    ; preds = %.lr.ph48, %._crit_edge
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  %.not40 = icmp eq ptr %28, null
  br i1 %.not40, label %29, label %31

29:                                               ; preds = %._crit_edge49
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.41) #5
  br label %70

31:                                               ; preds = %._crit_edge49
  %32 = getelementptr inbounds i8, ptr %0, i64 48
  %33 = load ptr, ptr %32, align 8, !tbaa !24
  %34 = icmp eq ptr %28, %33
  br i1 %34, label %35, label %49

35:                                               ; preds = %31
  %36 = load ptr, ptr %28, align 8, !tbaa !11
  %37 = getelementptr inbounds i8, ptr %36, i64 112
  %38 = load ptr, ptr %37, align 8
  %39 = tail call noundef ptr %38(ptr noundef nonnull align 8 dereferenceable(104) %28)
  %.not41 = icmp eq ptr %39, null
  br i1 %.not41, label %49, label %40

40:                                               ; preds = %35
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.42) #5
  %42 = load ptr, ptr %27, align 8, !tbaa !14
  %43 = add nsw i32 %2, 1
  %44 = load ptr, ptr %42, align 8, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %46 = load ptr, ptr %45, align 8
  tail call void %46(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull %1, i32 noundef %43)
  %47 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.43, ptr noundef %47) #5
  br label %70

49:                                               ; preds = %35, %31
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.42) #5
  %51 = load ptr, ptr %27, align 8, !tbaa !14
  %.not4250 = icmp eq ptr %51, null
  br i1 %.not4250, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %49
  %52 = add nsw i32 %2, 1
  br label %53

53:                                               ; preds = %.lr.ph53, %60
  %.051 = phi ptr [ %51, %.lr.ph53 ], [ %64, %60 ]
  %54 = load ptr, ptr %.051, align 8, !tbaa !11
  %55 = getelementptr inbounds i8, ptr %54, i64 112
  %56 = load ptr, ptr %55, align 8
  %57 = tail call noundef ptr %56(ptr noundef nonnull align 8 dereferenceable(104) %.051)
  %.not43 = icmp eq ptr %57, null
  br i1 %.not43, label %58, label %60

58:                                               ; preds = %53
  %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.44) #5
  br label %60

60:                                               ; preds = %58, %53
  %61 = load ptr, ptr %.051, align 8, !tbaa !11
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load ptr, ptr %62, align 8
  tail call void %63(ptr noundef nonnull align 8 dereferenceable(24) %.051, ptr noundef nonnull %1, i32 noundef %52)
  %64 = tail call noundef ptr @_ZN5SimTK9TiXmlNode11NextSiblingEv(ptr noundef nonnull align 8 dereferenceable(104) %.051)
  %.not42 = icmp eq ptr %64, null
  br i1 %.not42, label %._crit_edge54, label %53, !llvm.loop !25

._crit_edge54:                                    ; preds = %60, %49
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.44) #5
  br i1 %14, label %.lr.ph57, label %._crit_edge58

.lr.ph57:                                         ; preds = %._crit_edge54, %.lr.ph57
  %.155 = phi i32 [ %67, %.lr.ph57 ], [ 0, %._crit_edge54 ]
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.38, ptr noundef %13) #5
  %67 = add nuw nsw i32 %.155, 1
  %exitcond59.not = icmp eq i32 %67, %2
  br i1 %exitcond59.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !26

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge54
  %68 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  %69 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %1, ptr noundef nonnull @.str.43, ptr noundef %68) #5
  br label %70

70:                                               ; preds = %40, %._crit_edge58, %29
  ret void
}

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

; 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 @_ZNK5SimTK17TiXmlAttributeSet5FirstEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5SimTK9TiXmlNode11NextSiblingEv(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 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!15, !6, i64 40}
!15 = !{!"_ZTSN5SimTK9TiXmlNodeE", !16, i64 0, !6, i64 24, !19, i64 32, !6, i64 40, !6, i64 48, !20, i64 56, !6, i64 88, !6, i64 96}
!16 = !{!"_ZTSN5SimTK9TiXmlBaseE", !17, i64 8, !6, i64 16}
!17 = !{!"_ZTSN5SimTK11TiXmlCursorE", !18, i64 0, !18, i64 4}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN5SimTK9TiXmlNode8NodeTypeE", !7, i64 0}
!20 = !{!"_ZTSN5SimTK6StringE", !21, 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 = !{!15, !6, i64 48}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


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