; LLVM IR from facebookresearch/habitat-sim :: src/deps/tinyxml2/tinyxml2.ll (ZN8tinyxml210XMLPrinter11PrintStringEPKcb)

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

%"struct.tinyxml2::Entity" = type { ptr, i32, i8 }
%"class.tinyxml2::XMLPrinter" = type { %"class.tinyxml2::XMLVisitor", i8, %"class.tinyxml2::DynArray.7", i8, ptr, i32, i32, i8, i8, [64 x i8], [64 x i8], [6 x i8], %"class.tinyxml2::DynArray.8" }
%"class.tinyxml2::XMLVisitor" = type { ptr }
%"class.tinyxml2::DynArray.7" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::DynArray.8" = type <{ ptr, [20 x i8], i32, i32, [4 x i8] }>

@_ZN8tinyxml2L8entitiesE = external hidden constant [5 x %"struct.tinyxml2::Entity"], align 16

; 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 void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml210XMLPrinter4PutcEc(ptr noundef nonnull align 8 dereferenceable(312), i8 noundef signext) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8tinyxml210XMLPrinter11PrintStringEPKcb(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %1, i1 noundef zeroext %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = zext i1 %2 to i8
  store i8 %16, ptr %6, align 1, !tbaa !9
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.tinyxml2::XMLPrinter", ptr %17, i32 0, i32 7
  %20 = load i8, ptr %19, align 8, !tbaa !11, !range !17, !noundef !18
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %125

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  %23 = load i8, ptr %6, align 1, !tbaa !9, !range !17, !noundef !18
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = getelementptr inbounds %"class.tinyxml2::XMLPrinter", ptr %17, i32 0, i32 10
  br label %29

27:                                               ; preds = %22
  %28 = getelementptr inbounds %"class.tinyxml2::XMLPrinter", ptr %17, i32 0, i32 9
  br label %29

29:                                               ; preds = %27, %25
  %30 = phi ptr [ %26, %25 ], [ %28, %27 ]
  %31 = getelementptr inbounds [64 x i8], ptr %30, i64 0, i64 0
  store ptr %31, ptr %8, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %121, %29
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !19
  %35 = icmp ne i8 %34, 0
  br i1 %35, label %36, label %124

36:                                               ; preds = %32
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i8, ptr %37, align 1, !tbaa !19
  %39 = sext i8 %38 to i32
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %41, label %121

41:                                               ; preds = %36
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load i8, ptr %42, align 1, !tbaa !19
  %44 = sext i8 %43 to i32
  %45 = icmp slt i32 %44, 64
  br i1 %45, label %46, label %121

46:                                               ; preds = %41
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load i8, ptr %48, align 1, !tbaa !19
  %50 = zext i8 %49 to i64
  %51 = getelementptr inbounds i8, ptr %47, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !9, !range !17, !noundef !18
  %53 = trunc i8 %52 to i1
  br i1 %53, label %54, label %120

54:                                               ; preds = %46
  br label %55

55:                                               ; preds = %71, %54
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = icmp ult ptr %56, %57
  br i1 %58, label %59, label %80

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = ptrtoint ptr %60 to i64
  %63 = ptrtoint ptr %61 to i64
  %64 = sub i64 %62, %63
  store i64 %64, ptr %9, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  %65 = load i64, ptr %9, align 8, !tbaa !20
  %66 = icmp ult i64 2147483647, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %59
  br label %71

68:                                               ; preds = %59
  %69 = load i64, ptr %9, align 8, !tbaa !20
  %70 = trunc i64 %69 to i32
  br label %71

71:                                               ; preds = %68, %67
  %72 = phi i32 [ 2147483647, %67 ], [ %70, %68 ]
  store i32 %72, ptr %10, align 4, !tbaa !22
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = load i32, ptr %10, align 4, !tbaa !22
  %75 = sext i32 %74 to i64
  call void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312) %17, ptr noundef %73, i64 noundef %75)
  %76 = load i32, ptr %10, align 4, !tbaa !22
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = sext i32 %76 to i64
  %79 = getelementptr inbounds i8, ptr %77, i64 %78
  store ptr %79, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %55, !llvm.loop !23

80:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #2
  store i8 0, ptr %11, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  store i32 0, ptr %12, align 4, !tbaa !22
  br label %81

81:                                               ; preds = %109, %80
  %82 = load i32, ptr %12, align 4, !tbaa !22
  %83 = icmp slt i32 %82, 5
  br i1 %83, label %85, label %84

84:                                               ; preds = %81
  store i32 6, ptr %13, align 4
  br label %112

85:                                               ; preds = %81
  %86 = load i32, ptr %12, align 4, !tbaa !22
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [5 x %"struct.tinyxml2::Entity"], ptr @_ZN8tinyxml2L8entitiesE, i64 0, i64 %87
  %89 = getelementptr inbounds %"struct.tinyxml2::Entity", ptr %88, i32 0, i32 2
  %90 = load i8, ptr %89, align 4, !tbaa !25
  %91 = sext i8 %90 to i32
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i8, ptr %92, align 1, !tbaa !19
  %94 = sext i8 %93 to i32
  %95 = icmp eq i32 %91, %94
  br i1 %95, label %96, label %108

96:                                               ; preds = %85
  call void @_ZN8tinyxml210XMLPrinter4PutcEc(ptr noundef nonnull align 8 dereferenceable(312) %17, i8 noundef signext 38)
  %97 = load i32, ptr %12, align 4, !tbaa !22
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [5 x %"struct.tinyxml2::Entity"], ptr @_ZN8tinyxml2L8entitiesE, i64 0, i64 %98
  %100 = getelementptr inbounds %"struct.tinyxml2::Entity", ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 16, !tbaa !27
  %102 = load i32, ptr %12, align 4, !tbaa !22
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [5 x %"struct.tinyxml2::Entity"], ptr @_ZN8tinyxml2L8entitiesE, i64 0, i64 %103
  %105 = getelementptr inbounds %"struct.tinyxml2::Entity", ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 8, !tbaa !28
  %107 = sext i32 %106 to i64
  call void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312) %17, ptr noundef %101, i64 noundef %107)
  call void @_ZN8tinyxml210XMLPrinter4PutcEc(ptr noundef nonnull align 8 dereferenceable(312) %17, i8 noundef signext 59)
  store i8 1, ptr %11, align 1, !tbaa !9
  store i32 6, ptr %13, align 4
  br label %112

108:                                              ; preds = %85
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %12, align 4, !tbaa !22
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !22
  br label %81, !llvm.loop !29

112:                                              ; preds = %96, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  br label %113

113:                                              ; preds = %112
  %114 = load i8, ptr %11, align 1, !tbaa !9, !range !17, !noundef !18
  %115 = trunc i8 %114 to i1
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  br label %117

117:                                              ; preds = %116, %113
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i32 1
  store ptr %119, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #2
  br label %120

120:                                              ; preds = %117, %46
  br label %121

121:                                              ; preds = %120, %41, %36
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i32 1
  store ptr %123, ptr %7, align 8, !tbaa !5
  br label %32, !llvm.loop !30

124:                                              ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  br label %125

125:                                              ; preds = %124, %3
  %126 = getelementptr inbounds %"class.tinyxml2::XMLPrinter", ptr %17, i32 0, i32 7
  %127 = load i8, ptr %126, align 8, !tbaa !11, !range !17, !noundef !18
  %128 = trunc i8 %127 to i1
  br i1 %128, label %129, label %133

129:                                              ; preds = %125
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = icmp ult ptr %130, %131
  br i1 %132, label %133, label %150

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = ptrtoint ptr %134 to i64
  %137 = ptrtoint ptr %135 to i64
  %138 = sub i64 %136, %137
  store i64 %138, ptr %14, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  %139 = load i64, ptr %14, align 8, !tbaa !20
  %140 = icmp ult i64 2147483647, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %133
  br label %145

142:                                              ; preds = %133
  %143 = load i64, ptr %14, align 8, !tbaa !20
  %144 = trunc i64 %143 to i32
  br label %145

145:                                              ; preds = %142, %141
  %146 = phi i32 [ 2147483647, %141 ], [ %144, %142 ]
  store i32 %146, ptr %15, align 4, !tbaa !22
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = load i32, ptr %15, align 4, !tbaa !22
  %149 = sext i32 %148 to i64
  call void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312) %17, ptr noundef %147, i64 noundef %149)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  br label %150

150:                                              ; preds = %145, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  ret void
}

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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !10, i64 136}
!12 = !{!"_ZTSN8tinyxml210XMLPrinterE", !13, i64 0, !10, i64 8, !14, i64 16, !10, i64 112, !6, i64 120, !15, i64 128, !15, i64 132, !10, i64 136, !10, i64 137, !7, i64 138, !7, i64 202, !16, i64 272}
!13 = !{!"_ZTSN8tinyxml210XMLVisitorE"}
!14 = !{!"_ZTSN8tinyxml28DynArrayIPKcLi10EEE", !6, i64 0, !7, i64 8, !15, i64 88, !15, i64 92}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN8tinyxml28DynArrayIcLi20EEE", !6, i64 0, !7, i64 8, !15, i64 28, !15, i64 32}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!15, !15, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !7, i64 12}
!26 = !{!"_ZTSN8tinyxml26EntityE", !6, i64 0, !15, i64 8, !7, i64 12}
!27 = !{!26, !6, i64 0}
!28 = !{!26, !15, i64 8}
!29 = distinct !{!29, !24}
!30 = distinct !{!30, !24}


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

%"struct.tinyxml2::Entity" = type { ptr, i32, i8 }

@_ZN8tinyxml2L8entitiesE = external hidden local_unnamed_addr constant [5 x %"struct.tinyxml2::Entity"], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8tinyxml210XMLPrinter4PutcEc(ptr noundef nonnull align 8 dereferenceable(312), i8 noundef signext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8tinyxml210XMLPrinter11PrintStringEPKcb(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 136
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !15, !noundef !16
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %.loopexit44.thread

7:                                                ; preds = %3
  %.v = select i1 %2, i64 202, i64 138
  %8 = getelementptr inbounds i8, ptr %0, i64 %.v
  %9 = load i8, ptr %1, align 1, !tbaa !17
  %.not47 = icmp eq i8 %9, 0
  br i1 %.not47, label %.loopexit44, label %.lr.ph50.preheader

.lr.ph50.preheader:                               ; preds = %7
  %10 = load i8, ptr getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 12), align 4
  %11 = load i8, ptr getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 28), align 4
  %12 = load i8, ptr getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 44), align 4
  %13 = load i8, ptr getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 60), align 4
  %14 = load i8, ptr getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 76), align 4
  br label %.lr.ph50

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %45
  %15 = phi i8 [ %47, %45 ], [ %9, %.lr.ph50.preheader ]
  %.049 = phi ptr [ %.2, %45 ], [ %1, %.lr.ph50.preheader ]
  %.03448 = phi ptr [ %46, %45 ], [ %1, %.lr.ph50.preheader ]
  %or.cond = icmp ult i8 %15, 64
  br i1 %or.cond, label %16, label %45

16:                                               ; preds = %.lr.ph50
  %17 = zext nneg i8 %15 to i64
  %18 = getelementptr inbounds i8, ptr %8, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !18, !range !15, !noundef !16
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %.preheader43, label %45

.preheader43:                                     ; preds = %16
  %21 = icmp ult ptr %.049, %.03448
  br i1 %21, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.preheader43
  %22 = ptrtoint ptr %.03448 to i64
  br label %25

.preheader.loopexit:                              ; preds = %25
  %.pre = load i8, ptr %.03448, align 1, !tbaa !17
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader43
  %23 = phi i8 [ %15, %.preheader43 ], [ %.pre, %.preheader.loopexit ]
  %.1.lcssa = phi ptr [ %.049, %.preheader43 ], [ %29, %.preheader.loopexit ]
  %24 = icmp eq i8 %10, %23
  br i1 %24, label %39, label %31

25:                                               ; preds = %.lr.ph, %25
  %.145 = phi ptr [ %.049, %.lr.ph ], [ %29, %25 ]
  %26 = ptrtoint ptr %.145 to i64
  %27 = sub i64 %22, %26
  %28 = tail call i64 @llvm.umin.i64(i64 %27, i64 2147483647)
  tail call void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %.145, i64 noundef %28)
  %29 = getelementptr inbounds i8, ptr %.145, i64 %28
  %30 = icmp ult ptr %29, %.03448
  br i1 %30, label %25, label %.preheader.loopexit, !llvm.loop !19

31:                                               ; preds = %.preheader
  %32 = icmp eq i8 %11, %23
  br i1 %32, label %39, label %33

33:                                               ; preds = %31
  %34 = icmp eq i8 %12, %23
  br i1 %34, label %39, label %35

35:                                               ; preds = %33
  %36 = icmp eq i8 %13, %23
  br i1 %36, label %39, label %37

37:                                               ; preds = %35
  %38 = icmp eq i8 %14, %23
  br i1 %38, label %39, label %.loopexit

39:                                               ; preds = %37, %35, %33, %31, %.preheader
  %.lcssa53 = phi ptr [ @_ZN8tinyxml2L8entitiesE, %.preheader ], [ getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 16), %31 ], [ getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 32), %33 ], [ getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 48), %35 ], [ getelementptr inbounds (i8, ptr @_ZN8tinyxml2L8entitiesE, i64 64), %37 ]
  tail call void @_ZN8tinyxml210XMLPrinter4PutcEc(ptr noundef nonnull align 8 dereferenceable(312) %0, i8 noundef signext 38)
  %40 = load ptr, ptr %.lcssa53, align 16, !tbaa !21
  %41 = getelementptr inbounds i8, ptr %.lcssa53, i64 8
  %42 = load i32, ptr %41, align 8, !tbaa !23
  %43 = sext i32 %42 to i64
  tail call void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %40, i64 noundef %43)
  tail call void @_ZN8tinyxml210XMLPrinter4PutcEc(ptr noundef nonnull align 8 dereferenceable(312) %0, i8 noundef signext 59)
  br label %.loopexit

.loopexit:                                        ; preds = %37, %39
  %44 = getelementptr inbounds i8, ptr %.1.lcssa, i64 1
  br label %45

45:                                               ; preds = %16, %.loopexit, %.lr.ph50
  %.2 = phi ptr [ %44, %.loopexit ], [ %.049, %16 ], [ %.049, %.lr.ph50 ]
  %46 = getelementptr inbounds i8, ptr %.03448, i64 1
  %47 = load i8, ptr %46, align 1, !tbaa !17
  %.not = icmp eq i8 %47, 0
  br i1 %.not, label %.loopexit44.loopexit, label %.lr.ph50, !llvm.loop !24

.loopexit44.loopexit:                             ; preds = %45
  %.pre57 = load i8, ptr %4, align 8, !tbaa !5, !range !15
  %.pre58 = trunc nuw i8 %.pre57 to i1
  br label %.loopexit44

.loopexit44:                                      ; preds = %.loopexit44.loopexit, %7
  %.pre-phi = phi i1 [ %.pre58, %.loopexit44.loopexit ], [ true, %7 ]
  %.135 = phi ptr [ %46, %.loopexit44.loopexit ], [ %1, %7 ]
  %.3 = phi ptr [ %.2, %.loopexit44.loopexit ], [ %1, %7 ]
  %48 = icmp uge ptr %.3, %.135
  %or.cond41.not = select i1 %.pre-phi, i1 %48, i1 false
  br i1 %or.cond41.not, label %53, label %.loopexit44.thread

.loopexit44.thread:                               ; preds = %3, %.loopexit44
  %.364 = phi ptr [ %.3, %.loopexit44 ], [ %1, %3 ]
  %.13563 = phi ptr [ %.135, %.loopexit44 ], [ %1, %3 ]
  %49 = ptrtoint ptr %.13563 to i64
  %50 = ptrtoint ptr %.364 to i64
  %51 = sub i64 %49, %50
  %52 = tail call i64 @llvm.umin.i64(i64 %51, i64 2147483647)
  tail call void @_ZN8tinyxml210XMLPrinter5WriteEPKcm(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %.364, i64 noundef %52)
  br label %53

53:                                               ; preds = %.loopexit44, %.loopexit44.thread
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #1

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !8, i64 136}
!6 = !{!"_ZTSN8tinyxml210XMLPrinterE", !7, i64 0, !8, i64 8, !11, i64 16, !8, i64 112, !12, i64 120, !13, i64 128, !13, i64 132, !8, i64 136, !8, i64 137, !9, i64 138, !9, i64 202, !14, i64 272}
!7 = !{!"_ZTSN8tinyxml210XMLVisitorE"}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN8tinyxml28DynArrayIPKcLi10EEE", !12, i64 0, !9, i64 8, !13, i64 88, !13, i64 92}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTSN8tinyxml28DynArrayIcLi20EEE", !12, i64 0, !9, i64 8, !13, i64 28, !13, i64 32}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!9, !9, i64 0}
!18 = !{!8, !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !12, i64 0}
!22 = !{!"_ZTSN8tinyxml26EntityE", !12, i64 0, !13, i64 8, !9, i64 12}
!23 = !{!22, !13, i64 8}
!24 = distinct !{!24, !20}


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