; LLVM IR from JayXon/Leanify :: formats/xml.ll (ZN3Xml7LeanifyEm)

; 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.pugi::xml_node" = type { ptr }
%"class.pugi::xml_attribute" = type { ptr }
%"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.std::allocator.0" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Base64 = type { %class.Format }
%class.Format = type { ptr, ptr, i64 }
%"class.pugi::xml_text" = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { i8 }
%"struct.(anonymous namespace)::xml_vector_writer" = type { %"class.pugi::xml_writer", %"class.std::vector.17" }
%"class.pugi::xml_writer" = type { ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Xml = type <{ %class.Format, i8, [7 x i8], %"class.pugi::xml_document", i32, [4 x i8] }>
%"class.pugi::xml_document" = type { %"class.pugi::xml_node", ptr, [192 x i8] }

@.str.90 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [14 x i8], align 1
@depth = external global i32, align 4
@max_depth = external global i32, align 4
@.str.111 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [14 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN3Xml7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(244) %0, i64 noundef %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.pugi::xml_node", align 8
  %6 = alloca %"class.pugi::xml_node", align 8
  %7 = alloca %"class.pugi::xml_node", align 8
  %8 = alloca %"class.pugi::xml_node", align 8
  %9 = alloca %"class.pugi::xml_node", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.pugi::xml_node", align 8
  %12 = alloca %"class.pugi::xml_attribute", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.0", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.std::vector", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca i64, align 8
  %22 = alloca %class.Base64, align 8
  %23 = alloca %"class.pugi::xml_text", align 8
  %24 = alloca %"class.pugi::xml_node", align 8
  %25 = alloca %"class.pugi::xml_node", align 8
  %26 = alloca %"class.pugi::xml_node", align 8
  %27 = alloca %"class.pugi::xml_node", align 8
  %28 = alloca %"class.pugi::xml_node", align 8
  %29 = alloca %"class.std::function", align 8
  %30 = alloca %class.anon, align 1
  %31 = alloca %"struct.(anonymous namespace)::xml_vector_writer", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %32 = load ptr, ptr %3, align 8
  %33 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %33, i64 8, i1 false), !tbaa.struct !11
  %34 = getelementptr inbounds %"class.pugi::xml_node", ptr %5, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8
  call void @_ZN12_GLOBAL__N_118RemovePCDataSingleEN4pugi8xml_nodeE(ptr %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %36 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %37 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.109)
  %38 = getelementptr inbounds %"class.pugi::xml_node", ptr %6, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  %39 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %40 = icmp ne ptr %39, null
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br i1 %40, label %41, label %154

41:                                               ; preds = %2
  call void @_Z12VerbosePrintIA14_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(14) @.str.110)
  %42 = load i32, ptr @depth, align 4, !tbaa !12
  %43 = load i32, ptr @max_depth, align 4, !tbaa !12
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %45, label %153

45:                                               ; preds = %41
  %46 = load i32, ptr @depth, align 4, !tbaa !12
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr @depth, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %48 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %49 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @.str.109)
  %50 = getelementptr inbounds %"class.pugi::xml_node", ptr %7, i32 0, i32 0
  store ptr %49, ptr %50, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %51 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef @.str.111)
  %52 = getelementptr inbounds %"class.pugi::xml_node", ptr %8, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @_ZN4pugi8xml_nodeC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
  br label %53

53:                                               ; preds = %146, %45
  %54 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %55 = icmp ne ptr %54, null
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %150

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %58 = call ptr @_ZNK4pugi8xml_node12next_siblingEPKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.111)
  %59 = getelementptr inbounds %"class.pugi::xml_node", ptr %11, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %11, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %60 = call ptr @_ZNK4pugi8xml_node9attributeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.112)
  %61 = getelementptr inbounds %"class.pugi::xml_attribute", ptr %12, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = call noundef ptr @_ZNK4pugi13xml_attributecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %63 = icmp eq ptr %62, null
  br i1 %63, label %73, label %64

64:                                               ; preds = %57
  %65 = call noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %66 = icmp eq ptr %65, null
  br i1 %66, label %73, label %67

67:                                               ; preds = %64
  %68 = call noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %69 = getelementptr inbounds i8, ptr %68, i64 0
  %70 = load i8, ptr %69, align 1, !tbaa !14
  %71 = sext i8 %70 to i32
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %67, %64, %57
  %74 = call noundef zeroext i1 @_ZN4pugi8xml_node12remove_childERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  store i32 4, ptr %10, align 4
  br label %143

75:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  %76 = call noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %76, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %77 unwind label %89

77:                                               ; preds = %75
  invoke void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %78 unwind label %93

78:                                               ; preds = %77
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %79 = call noundef ptr @_ZNK4pugi8xml_node11child_valueEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  store ptr %79, ptr %17, align 8, !tbaa !5
  %80 = load ptr, ptr %17, align 8, !tbaa !5
  %81 = icmp eq ptr %80, null
  br i1 %81, label %88, label %82

82:                                               ; preds = %78
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 0
  %85 = load i8, ptr %84, align 1, !tbaa !14
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %98

88:                                               ; preds = %82, %78
  call void @_Z12VerbosePrintIA15_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(15) @.str.113)
  store i32 4, ptr %10, align 4
  br label %142

89:                                               ; preds = %75
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %15, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %16, align 4
  br label %97

93:                                               ; preds = %77
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %15, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %97

97:                                               ; preds = %93, %89
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %149

98:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %99 = load ptr, ptr %17, align 8, !tbaa !5
  %100 = call i64 @strlen(ptr noundef %99) #8
  store i64 %100, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  %103 = load i64, ptr %18, align 8, !tbaa !9
  %104 = getelementptr inbounds i8, ptr %102, i64 %103
  %105 = getelementptr inbounds i8, ptr %104, i64 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  invoke void @_ZNSt6vectorIcSaIcEEC2IPKcvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef %101, ptr noundef %105, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %106 unwind label %124

106:                                              ; preds = %98
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #7
  %107 = call noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %108 = load i64, ptr %18, align 8, !tbaa !9
  invoke void @_ZN6Base64CI26FormatEPvm(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef %107, i64 noundef %108)
          to label %109 unwind label %128

109:                                              ; preds = %106
  %110 = invoke noundef i64 @_ZN6Base647LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef 0)
          to label %111 unwind label %132

111:                                              ; preds = %109
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  store i64 %110, ptr %21, align 8, !tbaa !9
  %112 = load i64, ptr %21, align 8, !tbaa !9
  %113 = load i64, ptr %18, align 8, !tbaa !9
  %114 = icmp ult i64 %112, %113
  br i1 %114, label %115, label %141

115:                                              ; preds = %111
  %116 = load i64, ptr %21, align 8, !tbaa !9
  %117 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %116) #7
  store i8 0, ptr %117, align 1, !tbaa !14
  %118 = call noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %119 = invoke ptr @_ZNK4pugi8xml_node4textEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %120 unwind label %137

120:                                              ; preds = %115
  %121 = getelementptr inbounds %"class.pugi::xml_text", ptr %23, i32 0, i32 0
  store ptr %119, ptr %121, align 8
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4pugi8xml_textaSEPKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %118)
          to label %123 unwind label %137

123:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %141

124:                                              ; preds = %98
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %15, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %16, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  br label %148

128:                                              ; preds = %106
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %15, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %16, align 4
  br label %136

132:                                              ; preds = %109
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %15, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %16, align 4
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  br label %136

136:                                              ; preds = %132, %128
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  br label %147

137:                                              ; preds = %120, %115
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %15, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %147

141:                                              ; preds = %123, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  store i32 0, ptr %10, align 4
  br label %142

142:                                              ; preds = %141, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %143

143:                                              ; preds = %142, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %144 = load i32, ptr %10, align 4
  switch i32 %144, label %239 [
    i32 0, label %145
    i32 4, label %146
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %143
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 8, i1 false), !tbaa.struct !11
  br label %53, !llvm.loop !15

147:                                              ; preds = %137, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  br label %148

148:                                              ; preds = %147, %124
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %149

149:                                              ; preds = %148, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %234

150:                                              ; preds = %56
  %151 = load i32, ptr @depth, align 4, !tbaa !12
  %152 = add nsw i32 %151, -1
  store i32 %152, ptr @depth, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %153

153:                                              ; preds = %150, %41
  br label %193

154:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %155 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %156 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef @.str.90)
  %157 = getelementptr inbounds %"class.pugi::xml_node", ptr %24, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  %158 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %159 = icmp ne ptr %158, null
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br i1 %159, label %160, label %192

160:                                              ; preds = %154
  call void @_Z12VerbosePrintIA14_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(14) @.str.114)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %161 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %162 = call ptr @_ZNK4pugi8xml_node11first_childEv(ptr noundef nonnull align 8 dereferenceable(8) %161)
  %163 = getelementptr inbounds %"class.pugi::xml_node", ptr %25, i32 0, i32 0
  store ptr %162, ptr %163, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @_ZN4pugi8xml_nodeC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %26)
  br label %164

164:                                              ; preds = %180, %160
  %165 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %166 = icmp ne ptr %165, null
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %181

168:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %169 = call ptr @_ZNK4pugi8xml_node12next_siblingEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %170 = getelementptr inbounds %"class.pugi::xml_node", ptr %27, i32 0, i32 0
  store ptr %169, ptr %170, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %27, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  %171 = call noundef i32 @_ZNK4pugi8xml_node4typeEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %172 = icmp eq i32 %171, 7
  br i1 %172, label %176, label %173

173:                                              ; preds = %168
  %174 = call noundef i32 @_ZNK4pugi8xml_node4typeEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %175 = icmp eq i32 %174, 8
  br i1 %175, label %176, label %179

176:                                              ; preds = %173, %168
  %177 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %178 = call noundef zeroext i1 @_ZN4pugi8xml_node12remove_childERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef nonnull align 8 dereferenceable(8) %25)
  br label %179

179:                                              ; preds = %176, %173
  br label %180

180:                                              ; preds = %179
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %26, i64 8, i1 false), !tbaa.struct !11
  br label %164, !llvm.loop !17

181:                                              ; preds = %167
  %182 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %183 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @.str.90)
  %184 = getelementptr inbounds %"class.pugi::xml_node", ptr %28, i32 0, i32 0
  store ptr %183, ptr %184, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #7
  call void @"_ZNSt8functionIFvN4pugi8xml_nodeEEEC2IZN3Xml7LeanifyEmE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  %185 = getelementptr inbounds %"class.pugi::xml_node", ptr %28, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8
  invoke void @_ZN12_GLOBAL__N_116TraverseElementsEN4pugi8xml_nodeESt8functionIFvS1_EE(ptr %186, ptr noundef %29)
          to label %187 unwind label %188

187:                                              ; preds = %181
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  br label %192

188:                                              ; preds = %181
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %15, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %16, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  br label %234

192:                                              ; preds = %187, %154
  br label %193

193:                                              ; preds = %192, %153
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #7
  call void @_ZN12_GLOBAL__N_117xml_vector_writerC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  %194 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 3
  %195 = getelementptr inbounds %class.Xml, ptr %32, i32 0, i32 4
  %196 = load i32, ptr %195, align 8, !tbaa !18
  invoke void @_ZNK4pugi12xml_document4saveERNS_10xml_writerEPKcjNS_12xml_encodingE(ptr noundef nonnull align 8 dereferenceable(208) %194, ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef null, i32 noundef 12, i32 noundef %196)
          to label %197 unwind label %218

197:                                              ; preds = %193
  %198 = load i64, ptr %4, align 8, !tbaa !9
  %199 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !25
  %201 = sub i64 0, %198
  %202 = getelementptr inbounds i8, ptr %200, i64 %201
  store ptr %202, ptr %199, align 8, !tbaa !25
  %203 = getelementptr inbounds %"struct.(anonymous namespace)::xml_vector_writer", ptr %31, i32 0, i32 1
  %204 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #7
  %205 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 2
  %206 = load i64, ptr %205, align 8, !tbaa !26
  %207 = icmp ult i64 %204, %206
  br i1 %207, label %208, label %222

208:                                              ; preds = %197
  %209 = getelementptr inbounds %"struct.(anonymous namespace)::xml_vector_writer", ptr %31, i32 0, i32 1
  %210 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %209) #7
  %211 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 2
  store i64 %210, ptr %211, align 8, !tbaa !26
  %212 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 1
  %213 = load ptr, ptr %212, align 8, !tbaa !25
  %214 = getelementptr inbounds %"struct.(anonymous namespace)::xml_vector_writer", ptr %31, i32 0, i32 1
  %215 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %214) #7
  %216 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 2
  %217 = load i64, ptr %216, align 8, !tbaa !26
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %213, ptr align 1 %215, i64 %217, i1 false)
  br label %231

218:                                              ; preds = %193
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %15, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %16, align 4
  call void @_ZN12_GLOBAL__N_117xml_vector_writerD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  br label %234

222:                                              ; preds = %197
  %223 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 1
  %224 = load ptr, ptr %223, align 8, !tbaa !25
  %225 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 1
  %226 = load ptr, ptr %225, align 8, !tbaa !25
  %227 = load i64, ptr %4, align 8, !tbaa !9
  %228 = getelementptr inbounds i8, ptr %226, i64 %227
  %229 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 2
  %230 = load i64, ptr %229, align 8, !tbaa !26
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %224, ptr align 1 %228, i64 %230, i1 false)
  br label %231

231:                                              ; preds = %222, %208
  %232 = getelementptr inbounds %class.Format, ptr %32, i32 0, i32 2
  %233 = load i64, ptr %232, align 8, !tbaa !26
  store i32 1, ptr %10, align 4
  call void @_ZN12_GLOBAL__N_117xml_vector_writerD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  ret i64 %233

234:                                              ; preds = %218, %188, %149
  %235 = load ptr, ptr %15, align 8
  %236 = load i32, ptr %16, align 4
  %237 = insertvalue { ptr, i32 } poison, ptr %235, 0
  %238 = insertvalue { ptr, i32 } %237, i32 %236, 1
  resume { ptr, i32 } %238

239:                                              ; preds = %143
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_118RemovePCDataSingleEN4pugi8xml_nodeE(ptr) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12VerbosePrintIA14_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(14)) #2

declare void @_ZN4pugi8xml_nodeC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare ptr @_ZNK4pugi8xml_node12next_siblingEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare ptr @_ZNK4pugi8xml_node9attributeEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare noundef ptr @_ZNK4pugi13xml_attributecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare noundef zeroext i1 @_ZN4pugi8xml_node12remove_childERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

declare void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #4

declare noundef ptr @_ZNK4pugi8xml_node11child_valueEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12VerbosePrintIA15_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(15)) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Base64CI26FormatEPvm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef) unnamed_addr #6 align 2

declare noundef i64 @_ZN6Base647LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

declare ptr @_ZNK4pugi8xml_node4textEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4pugi8xml_textaSEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare ptr @_ZNK4pugi8xml_node11first_childEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare ptr @_ZNK4pugi8xml_node12next_siblingEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

declare noundef i32 @_ZNK4pugi8xml_node4typeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_116TraverseElementsEN4pugi8xml_nodeESt8functionIFvS1_EE(ptr, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvN4pugi8xml_nodeEEEC2IZN3Xml7LeanifyEmE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_117xml_vector_writerC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

declare void @_ZNK4pugi12xml_document4saveERNS_10xml_writerEPKcjNS_12xml_encodingE(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef, i32 noundef) #4

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_117xml_vector_writerD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 8, !5}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !24, i64 240}
!19 = !{!"_ZTS3Xml", !20, i64 0, !21, i64 24, !22, i64 32, !24, i64 240}
!20 = !{!"_ZTS6Format", !6, i64 8, !10, i64 16}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN4pugi12xml_documentE", !23, i64 0, !6, i64 8, !7, i64 16}
!23 = !{!"_ZTSN4pugi8xml_nodeE", !6, i64 0}
!24 = !{!"_ZTSN4pugi12xml_encodingE", !7, i64 0}
!25 = !{!20, !6, i64 8}
!26 = !{!20, !10, i64 16}


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

%"class.pugi::xml_node" = type { ptr }
%"class.pugi::xml_attribute" = type { ptr }
%"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.std::allocator.0" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Base64 = type { %class.Format }
%class.Format = type { ptr, ptr, i64 }
%"class.pugi::xml_text" = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { i8 }
%"struct.(anonymous namespace)::xml_vector_writer" = type { %"class.pugi::xml_writer", %"class.std::vector.17" }
%"class.pugi::xml_writer" = type { ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.90 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [14 x i8], align 1
@depth = external local_unnamed_addr global i32, align 4
@max_depth = external local_unnamed_addr global i32, align 4
@.str.111 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [14 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN3Xml7LeanifyEm(ptr noundef nonnull align 8 dereferenceable(244) %0, i64 noundef %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.pugi::xml_node", align 8
  %4 = alloca %"class.pugi::xml_node", align 8
  %5 = alloca %"class.pugi::xml_node", align 8
  %6 = alloca %"class.pugi::xml_node", align 8
  %7 = alloca %"class.pugi::xml_attribute", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca %class.Base64, align 8
  %13 = alloca %"class.pugi::xml_text", align 8
  %14 = alloca %"class.pugi::xml_node", align 8
  %15 = alloca %"class.pugi::xml_node", align 8
  %16 = alloca %"class.pugi::xml_node", align 8
  %17 = alloca %"class.std::function", align 8
  %18 = alloca %class.anon, align 1
  %19 = alloca %"struct.(anonymous namespace)::xml_vector_writer", align 8
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.013.0.copyload = load ptr, ptr %20, align 8, !tbaa !5
  tail call void @_ZN12_GLOBAL__N_118RemovePCDataSingleEN4pugi8xml_nodeE(ptr %.sroa.013.0.copyload)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %21 = tail call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.109)
  store ptr %21, ptr %3, align 8
  %22 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %.not = icmp eq ptr %22, null
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br i1 %.not, label %91, label %23

23:                                               ; preds = %2
  call void @_Z12VerbosePrintIA14_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(14) @.str.110)
  %24 = load i32, ptr @depth, align 4, !tbaa !9
  %25 = load i32, ptr @max_depth, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %27, label %112

27:                                               ; preds = %23
  %28 = add nsw i32 %24, 1
  store i32 %28, ptr @depth, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %29 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.109)
  store ptr %29, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %30 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.111)
  store ptr %30, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN4pugi8xml_nodeC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %31 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %.not2835 = icmp eq ptr %31, null
  br i1 %.not2835, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %85, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %32 = load i32, ptr @depth, align 4, !tbaa !9
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr @depth, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %112

.lr.ph:                                           ; preds = %27, %85
  %34 = call ptr @_ZNK4pugi8xml_node12next_siblingEPKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.111)
  store ptr %34, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %35 = call ptr @_ZNK4pugi8xml_node9attributeEPKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.112)
  store ptr %35, ptr %7, align 8
  %36 = call noundef ptr @_ZNK4pugi13xml_attributecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %37 = icmp eq ptr %36, null
  br i1 %37, label %45, label %38

38:                                               ; preds = %.lr.ph
  %39 = call noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %40 = icmp eq ptr %39, null
  br i1 %40, label %45, label %41

41:                                               ; preds = %38
  %42 = call noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %43 = load i8, ptr %42, align 1, !tbaa !11
  %44 = icmp eq i8 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %41, %38, %.lr.ph
  %46 = call noundef zeroext i1 @_ZN4pugi8xml_node12remove_childERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br label %85

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %48 = call noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %48, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %49 unwind label %57

49:                                               ; preds = %47
  invoke void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %50 unwind label %59

50:                                               ; preds = %49
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %51 = call noundef ptr @_ZNK4pugi8xml_node11child_valueEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %52 = icmp eq ptr %51, null
  br i1 %52, label %56, label %53

53:                                               ; preds = %50
  %54 = load i8, ptr %51, align 1, !tbaa !11
  %55 = icmp eq i8 %54, 0
  br i1 %55, label %56, label %62

56:                                               ; preds = %53, %50
  call void @_Z12VerbosePrintIA15_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(15) @.str.113)
  br label %85

57:                                               ; preds = %47
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %61

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %90

62:                                               ; preds = %53
  %63 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %51) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  %64 = getelementptr inbounds i8, ptr %51, i64 %63
  %65 = getelementptr inbounds i8, ptr %64, i64 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt6vectorIcSaIcEEC2IPKcvEET_S5_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull %51, ptr noundef nonnull %65, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %66 unwind label %78

66:                                               ; preds = %62
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  %67 = call noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @_ZN6Base64CI26FormatEPvm(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef %67, i64 noundef %63)
  %68 = invoke noundef i64 @_ZN6Base647LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0)
          to label %69 unwind label %80

69:                                               ; preds = %66
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  %70 = icmp ult i64 %68, %63
  br i1 %70, label %71, label %84

71:                                               ; preds = %69
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %68) #7
  store i8 0, ptr %72, align 1, !tbaa !11
  %73 = call noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %74 = invoke ptr @_ZNK4pugi8xml_node4textEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %75 unwind label %82

75:                                               ; preds = %71
  store ptr %74, ptr %13, align 8
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4pugi8xml_textaSEPKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %73)
          to label %77 unwind label %82

77:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %84

78:                                               ; preds = %62
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  br label %89

80:                                               ; preds = %66
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  br label %88

82:                                               ; preds = %75, %71
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %88

84:                                               ; preds = %77, %69
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  br label %85

85:                                               ; preds = %56, %84, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %86 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %86, ptr %5, align 8, !tbaa !5
  %87 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %.not28 = icmp eq ptr %87, null
  br i1 %.not28, label %._crit_edge, label %.lr.ph, !llvm.loop !12

88:                                               ; preds = %82, %80
  %.pn30 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %89

89:                                               ; preds = %88, %78
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %88 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  br label %90

90:                                               ; preds = %89, %61
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %89 ], [ %.pn, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %137

91:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %92 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.90)
  store ptr %92, ptr %14, align 8
  %93 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %.not26 = icmp eq ptr %93, null
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br i1 %.not26, label %112, label %94

94:                                               ; preds = %91
  call void @_Z12VerbosePrintIA14_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(14) @.str.114)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %95 = call ptr @_ZNK4pugi8xml_node11first_childEv(ptr noundef nonnull align 8 dereferenceable(8) %20)
  store ptr %95, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  call void @_ZN4pugi8xml_nodeC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16)
  %96 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %.not2736 = icmp eq ptr %96, null
  br i1 %.not2736, label %._crit_edge39, label %.lr.ph38

._crit_edge39:                                    ; preds = %106, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %97 = call ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @.str.90)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #7
  call void @"_ZNSt8functionIFvN4pugi8xml_nodeEEEC2IZN3Xml7LeanifyEmE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZN12_GLOBAL__N_116TraverseElementsEN4pugi8xml_nodeESt8functionIFvS1_EE(ptr %97, ptr noundef nonnull %17)
          to label %109 unwind label %110

.lr.ph38:                                         ; preds = %94, %106
  %98 = call ptr @_ZNK4pugi8xml_node12next_siblingEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  store ptr %98, ptr %16, align 8, !tbaa !5
  %99 = call noundef i32 @_ZNK4pugi8xml_node4typeEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %100 = icmp eq i32 %99, 7
  br i1 %100, label %104, label %101

101:                                              ; preds = %.lr.ph38
  %102 = call noundef i32 @_ZNK4pugi8xml_node4typeEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %103 = icmp eq i32 %102, 8
  br i1 %103, label %104, label %106

104:                                              ; preds = %101, %.lr.ph38
  %105 = call noundef zeroext i1 @_ZN4pugi8xml_node12remove_childERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %15)
  br label %106

106:                                              ; preds = %101, %104
  %107 = load i64, ptr %16, align 8, !tbaa !5
  store i64 %107, ptr %15, align 8, !tbaa !5
  %108 = call noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %.not27 = icmp eq ptr %108, null
  br i1 %.not27, label %._crit_edge39, label %.lr.ph38, !llvm.loop !14

109:                                              ; preds = %._crit_edge39
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  br label %112

110:                                              ; preds = %._crit_edge39
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  br label %137

112:                                              ; preds = %91, %109, %23, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #7
  call void @_ZN12_GLOBAL__N_117xml_vector_writerC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  %113 = getelementptr inbounds i8, ptr %0, i64 240
  %114 = load i32, ptr %113, align 8, !tbaa !15
  invoke void @_ZNK4pugi12xml_document4saveERNS_10xml_writerEPKcjNS_12xml_encodingE(ptr noundef nonnull align 8 dereferenceable(208) %20, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef null, i32 noundef 12, i32 noundef %114)
          to label %115 unwind label %130

115:                                              ; preds = %112
  %116 = getelementptr inbounds i8, ptr %0, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !23
  %118 = sub i64 0, %1
  %119 = getelementptr inbounds i8, ptr %117, i64 %118
  store ptr %119, ptr %116, align 8, !tbaa !23
  %120 = getelementptr inbounds i8, ptr %19, i64 8
  %121 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #7
  %122 = getelementptr inbounds i8, ptr %0, i64 16
  %123 = load i64, ptr %122, align 8, !tbaa !24
  %124 = icmp ult i64 %121, %123
  br i1 %124, label %125, label %132

125:                                              ; preds = %115
  %126 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #7
  store i64 %126, ptr %122, align 8, !tbaa !24
  %127 = load ptr, ptr %116, align 8, !tbaa !23
  %128 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %120) #7
  %129 = load i64, ptr %122, align 8, !tbaa !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %127, ptr align 1 %128, i64 %129, i1 false)
  br label %135

130:                                              ; preds = %112
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN12_GLOBAL__N_117xml_vector_writerD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  br label %137

132:                                              ; preds = %115
  %133 = load ptr, ptr %116, align 8, !tbaa !23
  %134 = getelementptr inbounds i8, ptr %133, i64 %1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %133, ptr align 1 %134, i64 %123, i1 false)
  br label %135

135:                                              ; preds = %132, %125
  %136 = load i64, ptr %122, align 8, !tbaa !24
  call void @_ZN12_GLOBAL__N_117xml_vector_writerD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  ret i64 %136

137:                                              ; preds = %130, %110, %90
  %.pn30.pn.pn.pn = phi { ptr, i32 } [ %.pn30.pn.pn, %90 ], [ %131, %130 ], [ %111, %110 ]
  resume { ptr, i32 } %.pn30.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_118RemovePCDataSingleEN4pugi8xml_nodeE(ptr) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare ptr @_ZNK4pugi8xml_node5childEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

declare noundef ptr @_ZNK4pugi8xml_nodecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12VerbosePrintIA14_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(14)) local_unnamed_addr #2

declare void @_ZN4pugi8xml_nodeC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare ptr @_ZNK4pugi8xml_node12next_siblingEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

declare ptr @_ZNK4pugi8xml_node9attributeEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

declare noundef ptr @_ZNK4pugi13xml_attributecvPFvPPPS0_EEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare noundef ptr @_ZNK4pugi13xml_attribute5valueEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN4pugi8xml_node12remove_childERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare void @_Z13PrintFileNameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare noundef ptr @_ZNK4pugi8xml_node11child_valueEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12VerbosePrintIA15_cEvRKT_(ptr noundef nonnull align 1 dereferenceable(15)) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Base64CI26FormatEPvm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef) unnamed_addr #6 align 2

declare noundef i64 @_ZN6Base647LeanifyEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

declare ptr @_ZNK4pugi8xml_node4textEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4pugi8xml_textaSEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare ptr @_ZNK4pugi8xml_node11first_childEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare ptr @_ZNK4pugi8xml_node12next_siblingEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

declare noundef i32 @_ZNK4pugi8xml_node4typeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_116TraverseElementsEN4pugi8xml_nodeESt8functionIFvS1_EE(ptr, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvN4pugi8xml_nodeEEEC2IZN3Xml7LeanifyEmE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_117xml_vector_writerC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

declare void @_ZNK4pugi12xml_document4saveERNS_10xml_writerEPKcjNS_12xml_encodingE(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_117xml_vector_writerD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6FormatD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !22, i64 240}
!16 = !{!"_ZTS3Xml", !17, i64 0, !19, i64 24, !20, i64 32, !22, i64 240}
!17 = !{!"_ZTS6Format", !6, i64 8, !18, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSN4pugi12xml_documentE", !21, i64 0, !6, i64 8, !7, i64 16}
!21 = !{!"_ZTSN4pugi8xml_nodeE", !6, i64 0}
!22 = !{!"_ZTSN4pugi12xml_encodingE", !7, i64 0}
!23 = !{!17, !6, i64 8}
!24 = !{!17, !18, i64 16}


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