; LLVM IR from JayXon/Leanify :: lib/pugixml/pugixml.ll (ZN4pugi12xml_document5_moveERS0_)

; 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 }
%"struct.pugi::xml_node_struct" = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.pugi::impl::(anonymous namespace)::xml_allocator" = type { ptr, i64 }
%"struct.pugi::impl::(anonymous namespace)::xml_document_struct" = type { %"struct.pugi::xml_node_struct", %"struct.pugi::impl::(anonymous namespace)::xml_allocator", ptr, ptr }
%"class.pugi::xml_document" = type { %"class.pugi::xml_node", ptr, [192 x i8] }
%"struct.pugi::impl::(anonymous namespace)::xml_memory_page" = type { ptr, ptr, ptr, i64, i64 }

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [47 x i8], align 1
@__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_ = external hidden unnamed_addr constant [47 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4pugi12xml_document5_moveERS0_(ptr noundef nonnull align 8 dereferenceable(208) %0, ptr noundef nonnull align 8 dereferenceable(208) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %14 = getelementptr inbounds %"class.pugi::xml_node", ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.pugi::xml_node", ptr %16, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  store ptr %18, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %19, i32 0, i32 4
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  store ptr %21, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 64
  %24 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_allocator", ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !16
  %31 = lshr i64 %30, 8
  %32 = sub i64 0, %31
  %33 = getelementptr inbounds i8, ptr %27, i64 %32
  %34 = icmp ne ptr %25, %33
  br i1 %34, label %35, label %50

35:                                               ; preds = %2
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 64
  %38 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_allocator", ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 64
  %42 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_allocator", ptr %41, i32 0, i32 0
  store ptr %39, ptr %42, align 8, !tbaa !14
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 64
  %45 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_allocator", ptr %44, i32 0, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !17
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 64
  %49 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_allocator", ptr %48, i32 0, i32 1
  store i64 %46, ptr %49, align 8, !tbaa !17
  br label %50

50:                                               ; preds = %35, %2
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_document_struct", ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_document_struct", ptr %54, i32 0, i32 2
  store ptr %53, ptr %55, align 8, !tbaa !18
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_document_struct", ptr %56, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_document_struct", ptr %59, i32 0, i32 3
  store ptr %58, ptr %60, align 8, !tbaa !20
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.pugi::xml_document", ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = getelementptr inbounds %"class.pugi::xml_document", ptr %13, i32 0, i32 1
  store ptr %63, ptr %64, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %67, i32 0, i32 0
  %69 = load i64, ptr %68, align 8, !tbaa !16
  %70 = lshr i64 %69, 8
  %71 = sub i64 0, %70
  %72 = getelementptr inbounds i8, ptr %66, i64 %71
  store ptr %72, ptr %8, align 8, !tbaa !5
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %86

75:                                               ; preds = %50
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !23
  %79 = icmp ne ptr %78, null
  br i1 %79, label %86, label %80

80:                                               ; preds = %75
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !25
  %84 = icmp ne ptr %83, null
  %85 = xor i1 %84, true
  br label %86

86:                                               ; preds = %80, %75, %50
  %87 = phi i1 [ false, %75 ], [ false, %50 ], [ %85, %80 ]
  br i1 %87, label %88, label %89

88:                                               ; preds = %86
  br label %91

89:                                               ; preds = %86
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.1, i32 noundef 7316, ptr noundef @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #6
  unreachable

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90, %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %94, i32 0, i32 0
  %96 = load i64, ptr %95, align 8, !tbaa !16
  %97 = lshr i64 %96, 8
  %98 = sub i64 0, %97
  %99 = getelementptr inbounds i8, ptr %93, i64 %98
  store ptr %99, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %108

102:                                              ; preds = %91
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !23
  %106 = icmp ne ptr %105, null
  %107 = xor i1 %106, true
  br label %108

108:                                              ; preds = %102, %91
  %109 = phi i1 [ false, %91 ], [ %107, %102 ]
  br i1 %109, label %110, label %111

110:                                              ; preds = %108
  br label %113

111:                                              ; preds = %108
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.1, i32 noundef 7319, ptr noundef @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #6
  unreachable

112:                                              ; No predecessors!
  br label %113

113:                                              ; preds = %112, %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %114, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !25
  store ptr %116, ptr %10, align 8, !tbaa !5
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %137

119:                                              ; preds = %113
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !23
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = icmp eq ptr %122, %123
  br i1 %124, label %125, label %126

125:                                              ; preds = %119
  br label %128

126:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str.1, i32 noundef 7324, ptr noundef @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #6
  unreachable

127:                                              ; No predecessors!
  br label %128

128:                                              ; preds = %127, %125
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %130, i32 0, i32 1
  store ptr %129, ptr %131, align 8, !tbaa !23
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %133, i32 0, i32 2
  store ptr %132, ptr %134, align 8, !tbaa !25
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %135, i32 0, i32 2
  store ptr null, ptr %136, align 8, !tbaa !25
  br label %137

137:                                              ; preds = %128, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %138, i32 0, i32 2
  %140 = load ptr, ptr %139, align 8, !tbaa !25
  store ptr %140, ptr %11, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %168, %137
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %145, label %144

144:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %172

145:                                              ; preds = %141
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !26
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = icmp eq ptr %149, null
  br i1 %150, label %153, label %151

151:                                              ; preds = %145
  %152 = getelementptr inbounds i8, ptr %149, i64 64
  br label %153

153:                                              ; preds = %151, %145
  %154 = phi ptr [ %152, %151 ], [ null, %145 ]
  %155 = icmp eq ptr %148, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %153
  br label %159

157:                                              ; preds = %153
  call void @__assert_fail(ptr noundef @.str.39, ptr noundef @.str.1, i32 noundef 7335, ptr noundef @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #6
  unreachable

158:                                              ; No predecessors!
  br label %159

159:                                              ; preds = %158, %156
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = icmp eq ptr %160, null
  br i1 %161, label %164, label %162

162:                                              ; preds = %159
  %163 = getelementptr inbounds i8, ptr %160, i64 64
  br label %164

164:                                              ; preds = %162, %159
  %165 = phi ptr [ %163, %162 ], [ null, %159 ]
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %166, i32 0, i32 0
  store ptr %165, ptr %167, align 8, !tbaa !26
  br label %168

168:                                              ; preds = %164
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.pugi::impl::(anonymous namespace)::xml_memory_page", ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !25
  store ptr %171, ptr %11, align 8, !tbaa !5
  br label %141, !llvm.loop !27

172:                                              ; preds = %144
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !11
  %176 = icmp ne ptr %175, null
  %177 = xor i1 %176, true
  br i1 %177, label %178, label %179

178:                                              ; preds = %172
  br label %181

179:                                              ; preds = %172
  call void @__assert_fail(ptr noundef @.str.40, ptr noundef @.str.1, i32 noundef 7347, ptr noundef @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #6
  unreachable

180:                                              ; No predecessors!
  br label %181

181:                                              ; preds = %180, %178
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %183, i32 0, i32 4
  store ptr %182, ptr %184, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %185, ptr %12, align 8, !tbaa !5
  br label %186

186:                                              ; preds = %203, %181
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = icmp ne ptr %187, null
  br i1 %188, label %190, label %189

189:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %207

190:                                              ; preds = %186
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %191, i32 0, i32 3
  %193 = load ptr, ptr %192, align 8, !tbaa !29
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = icmp eq ptr %193, %194
  br i1 %195, label %196, label %197

196:                                              ; preds = %190
  br label %199

197:                                              ; preds = %190
  call void @__assert_fail(ptr noundef @.str.41, ptr noundef @.str.1, i32 noundef 7359, ptr noundef @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #6
  unreachable

198:                                              ; No predecessors!
  br label %199

199:                                              ; preds = %198, %196
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = load ptr, ptr %12, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %201, i32 0, i32 3
  store ptr %200, ptr %202, align 8, !tbaa !29
  br label %203

203:                                              ; preds = %199
  %204 = load ptr, ptr %12, align 8, !tbaa !5
  %205 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %204, i32 0, i32 6
  %206 = load ptr, ptr %205, align 8, !tbaa !30
  store ptr %206, ptr %12, align 8, !tbaa !5
  br label %186, !llvm.loop !31

207:                                              ; preds = %189
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %"struct.pugi::xml_node_struct", ptr %211, i32 0, i32 0
  %213 = load i64, ptr %212, align 8, !tbaa !16
  %214 = lshr i64 %213, 8
  %215 = sub i64 0, %214
  %216 = getelementptr inbounds i8, ptr %210, i64 %215
  invoke void @_ZN4pugi4impl12_GLOBAL__N_119xml_document_structC2EPNS1_15xml_memory_pageE(ptr noundef nonnull align 8 dereferenceable(96) %208, ptr noundef %216)
          to label %217 unwind label %220

217:                                              ; preds = %207
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %"class.pugi::xml_document", ptr %218, i32 0, i32 1
  store ptr null, ptr %219, align 8, !tbaa !21
  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 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

220:                                              ; preds = %207
  %221 = landingpad { ptr, i32 }
          catch ptr null
  %222 = extractvalue { ptr, i32 } %221, 0
  call void @__clang_call_terminate(ptr %222) #6
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4pugi4impl12_GLOBAL__N_119xml_document_structC2EPNS1_15xml_memory_pageE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) unnamed_addr #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noinline noreturn nounwind uwtable "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 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 #4 = { 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 #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, !6, i64 0}
!10 = !{!"_ZTSN4pugi8xml_nodeE", !6, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTSN4pugi15xml_node_structE", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN4pugi4impl12_GLOBAL__N_113xml_allocatorE", !6, i64 0, !13, i64 8}
!16 = !{!12, !13, i64 0}
!17 = !{!15, !13, i64 8}
!18 = !{!19, !6, i64 80}
!19 = !{!"_ZTSN4pugi4impl12_GLOBAL__N_119xml_document_structE", !12, i64 0, !15, i64 64, !6, i64 80, !6, i64 88}
!20 = !{!19, !6, i64 88}
!21 = !{!22, !6, i64 8}
!22 = !{!"_ZTSN4pugi12xml_documentE", !10, i64 0, !6, i64 8, !7, i64 16}
!23 = !{!24, !6, i64 8}
!24 = !{!"_ZTSN4pugi4impl12_GLOBAL__N_115xml_memory_pageE", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 32}
!25 = !{!24, !6, i64 16}
!26 = !{!24, !6, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!12, !6, i64 24}
!30 = !{!12, !6, i64 48}
!31 = distinct !{!31, !28}


; 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.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [47 x i8], align 1
@__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_ = external hidden unnamed_addr constant [47 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4pugi12xml_document5_moveERS0_(ptr nocapture noundef nonnull align 8 dereferenceable(208) %0, ptr nocapture noundef nonnull align 8 dereferenceable(208) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !10
  %7 = getelementptr inbounds i8, ptr %4, i64 64
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = load i64, ptr %4, align 8, !tbaa !15
  %10 = lshr i64 %9, 8
  %11 = sub nsw i64 0, %10
  %12 = getelementptr inbounds i8, ptr %4, i64 %11
  %.not = icmp eq ptr %8, %12
  br i1 %.not, label %18, label %13

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %3, i64 64
  store ptr %8, ptr %14, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %4, i64 72
  %16 = load i64, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %3, i64 72
  store i64 %16, ptr %17, align 8, !tbaa !16
  br label %18

18:                                               ; preds = %13, %2
  %19 = getelementptr inbounds i8, ptr %4, i64 80
  %20 = getelementptr inbounds i8, ptr %3, i64 80
  %21 = load <2 x ptr>, ptr %19, align 8, !tbaa !17
  store <2 x ptr> %21, ptr %20, align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %1, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %23, ptr %24, align 8, !tbaa !18
  %25 = load i64, ptr %3, align 8, !tbaa !15
  %26 = lshr i64 %25, 8
  %27 = sub nsw i64 0, %26
  %28 = getelementptr inbounds i8, ptr %3, i64 %27
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !20
  %.not60 = icmp eq ptr %30, null
  br i1 %.not60, label %31, label %.critedge

31:                                               ; preds = %18
  %32 = getelementptr inbounds i8, ptr %28, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %.not61 = icmp eq ptr %33, null
  br i1 %.not61, label %34, label %.critedge

.critedge:                                        ; preds = %18, %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.1, i32 noundef 7316, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #4
  unreachable

34:                                               ; preds = %31
  %35 = getelementptr inbounds i8, ptr %12, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %.not62 = icmp eq ptr %36, null
  br i1 %.not62, label %37, label %.critedge2

.critedge2:                                       ; preds = %34
  tail call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.1, i32 noundef 7319, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #4
  unreachable

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %12, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %.not63 = icmp eq ptr %39, null
  br i1 %.not63, label %._crit_edge, label %40

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %39, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !20
  %43 = icmp eq ptr %42, %12
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  tail call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.1, i32 noundef 7324, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #4
  unreachable

45:                                               ; preds = %40
  store ptr %28, ptr %41, align 8, !tbaa !20
  store ptr %39, ptr %32, align 8, !tbaa !22
  store ptr null, ptr %38, align 8, !tbaa !22
  %.05767.pre = load ptr, ptr %32, align 8, !tbaa !22
  %.not6468 = icmp eq ptr %.05767.pre, null
  br i1 %.not6468, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %45
  %46 = getelementptr inbounds i8, ptr %3, i64 64
  br label %49

._crit_edge:                                      ; preds = %53, %37, %45
  %47 = getelementptr inbounds i8, ptr %3, i64 32
  %48 = load ptr, ptr %47, align 8, !tbaa !10
  %.not65 = icmp eq ptr %48, null
  br i1 %.not65, label %56, label %55

49:                                               ; preds = %.lr.ph, %53
  %.05769 = phi ptr [ %.05767.pre, %.lr.ph ], [ %.057, %53 ]
  %50 = load ptr, ptr %.05769, align 8, !tbaa !23
  %51 = icmp eq ptr %50, %7
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  tail call void @__assert_fail(ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.1, i32 noundef 7335, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #4
  unreachable

53:                                               ; preds = %49
  store ptr %46, ptr %.05769, align 8, !tbaa !23
  %54 = getelementptr inbounds i8, ptr %.05769, i64 16
  %.057 = load ptr, ptr %54, align 8, !tbaa !22
  %.not64 = icmp eq ptr %.057, null
  br i1 %.not64, label %._crit_edge, label %49, !llvm.loop !24

55:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.1, i32 noundef 7347, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #4
  unreachable

56:                                               ; preds = %._crit_edge
  store ptr %6, ptr %47, align 8, !tbaa !10
  %.not6670 = icmp eq ptr %6, null
  br i1 %.not6670, label %._crit_edge74, label %.lr.ph73

._crit_edge74:                                    ; preds = %61, %56
  invoke void @_ZN4pugi4impl12_GLOBAL__N_119xml_document_structC2EPNS1_15xml_memory_pageE(ptr noundef nonnull align 8 dereferenceable(96) %4, ptr noundef nonnull %12)
          to label %64 unwind label %65

.lr.ph73:                                         ; preds = %56, %61
  %.071 = phi ptr [ %63, %61 ], [ %6, %56 ]
  %57 = getelementptr inbounds i8, ptr %.071, i64 24
  %58 = load ptr, ptr %57, align 8, !tbaa !26
  %59 = icmp eq ptr %58, %4
  br i1 %59, label %61, label %60

60:                                               ; preds = %.lr.ph73
  tail call void @__assert_fail(ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.1, i32 noundef 7359, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4pugi12xml_document5_moveERS0_) #4
  unreachable

61:                                               ; preds = %.lr.ph73
  store ptr %3, ptr %57, align 8, !tbaa !26
  %62 = getelementptr inbounds i8, ptr %.071, i64 48
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %.not66 = icmp eq ptr %63, null
  br i1 %.not66, label %._crit_edge74, label %.lr.ph73, !llvm.loop !28

64:                                               ; preds = %._crit_edge74
  store ptr null, ptr %22, align 8, !tbaa !18
  ret void

65:                                               ; preds = %._crit_edge74
  %66 = landingpad { ptr, i32 }
          catch ptr null
  %67 = extractvalue { ptr, i32 } %66, 0
  tail call void @__clang_call_terminate(ptr %67) #4
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4pugi4impl12_GLOBAL__N_119xml_document_structC2EPNS1_15xml_memory_pageE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { noinline noreturn nounwind uwtable "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 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 #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 = { 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, !7, i64 0}
!6 = !{!"_ZTSN4pugi8xml_nodeE", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 32}
!11 = !{!"_ZTSN4pugi15xml_node_structE", !12, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!12 = !{!"long", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"_ZTSN4pugi4impl12_GLOBAL__N_113xml_allocatorE", !7, i64 0, !12, i64 8}
!15 = !{!11, !12, i64 0}
!16 = !{!14, !12, i64 8}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !7, i64 8}
!19 = !{!"_ZTSN4pugi12xml_documentE", !6, i64 0, !7, i64 8, !8, i64 16}
!20 = !{!21, !7, i64 8}
!21 = !{!"_ZTSN4pugi4impl12_GLOBAL__N_115xml_memory_pageE", !7, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !12, i64 32}
!22 = !{!21, !7, i64 16}
!23 = !{!21, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!11, !7, i64 24}
!27 = !{!11, !7, i64 48}
!28 = distinct !{!28, !25}


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