; LLVM IR from vczh/herodb :: Kernel/Source/Utility/InMemoryBuffer.ll (ZN2vl8database20InMemoryBufferSource6UnloadEv)

; 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.vl::collections::EnumerableForEachIterator" = type { %"class.vl::collections::ForEachIterator", %"class.vl::Ptr.9" }
%"class.vl::collections::ForEachIterator" = type { %"class.vl::Object" }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.9" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr" = type { ptr, ptr, ptr, ptr }
%"class.vl::database::InMemoryBufferSource" = type { %"class.vl::Object", %"class.vl::database::IBufferSource", %"struct.vl::database::IdObject.0", ptr, i64, %"class.vl::SpinLock", %"class.vl::collections::List", %"class.vl::collections::List.1", %"struct.vl::database::IdObject" }
%"class.vl::database::IBufferSource" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }
%"struct.vl::database::IdObject.0" = type { i32 }
%"class.vl::SpinLock" = type { %"class.vl::Object", i64 }
%"class.vl::collections::List" = type { %"class.vl::collections::ListBase.base", %"class.vl::collections::IEnumerable" }
%"class.vl::collections::ListBase.base" = type <{ %"class.vl::collections::ArrayBase.base", i64, i8 }>
%"class.vl::collections::ArrayBase.base" = type { %"class.vl::collections::ListStore", ptr, i64 }
%"class.vl::collections::ListStore" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable" = type { %"class.vl::Interface" }
%"class.vl::collections::List.1" = type { %"class.vl::collections::ListBase.base.7", %"class.vl::collections::IEnumerable.5" }
%"class.vl::collections::ListBase.base.7" = type <{ %"class.vl::collections::ArrayBase.base.6", i64, i8 }>
%"class.vl::collections::ArrayBase.base.6" = type { %"class.vl::collections::ListStore.4", ptr, i64 }
%"class.vl::collections::ListStore.4" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.5" = type { %"class.vl::Interface" }
%"struct.vl::database::IdObject" = type { i64 }
%"class.vl::database::BufferPageDesc" = type <{ ptr, i64, i8, [7 x i8], i64, i8, [7 x i8] }>

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK2vl3PtrINS_8database14BufferPageDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl8database20InMemoryBufferSource6UnloadEv(ptr noundef nonnull align 8 dereferenceable(160) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca %"class.vl::collections::EnumerableForEachIterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.vl::Ptr", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  store i8 1, ptr %3, align 1, !tbaa !9
  %11 = load i8, ptr %3, align 1, !tbaa !9, !range !11, !noundef !12
  %12 = trunc i8 %11 to i1
  br i1 %12, label %13, label %58

13:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #5
  %14 = getelementptr inbounds %"class.vl::database::InMemoryBufferSource", ptr %10, i32 0, i32 6
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %14, i64 %17
  call void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind writable sret(%"class.vl::collections::EnumerableForEachIterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %18)
  store ptr %5, ptr %4, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %56, %13
  %20 = load i8, ptr %3, align 1, !tbaa !9, !range !11, !noundef !12
  %21 = trunc i8 %20 to i1
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  store i32 2, ptr %6, align 4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %57

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  invoke void @_ZN2vl3PtrINS_8database14BufferPageDescEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %24 unwind label %33

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %53, %24
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds ptr, ptr %27, i64 2
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef zeroext i1 %29(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %31 unwind label %37

31:                                               ; preds = %25
  br i1 %30, label %41, label %32

32:                                               ; preds = %31
  store i32 5, ptr %6, align 4
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %55

33:                                               ; preds = %23
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %8, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %9, align 4
  br label %54

37:                                               ; preds = %44, %41, %25
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %8, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %9, align 4
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %54

41:                                               ; preds = %31
  %42 = invoke noundef zeroext i1 @_ZNK2vl3PtrINS_8database14BufferPageDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %43 unwind label %37

43:                                               ; preds = %41
  br i1 %42, label %44, label %53

44:                                               ; preds = %43
  %45 = getelementptr inbounds %"class.vl::database::InMemoryBufferSource", ptr %10, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = atomicrmw sub ptr %46, i64 1 seq_cst, align 8
  %48 = sub i64 %47, 1
  %49 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %50 unwind label %37

50:                                               ; preds = %44
  %51 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %49, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !32
  call void @free(ptr noundef %52) #5
  br label %53

53:                                               ; preds = %50, %43
  br label %25, !llvm.loop !34

54:                                               ; preds = %37, %33
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %59

55:                                               ; preds = %32
  br label %56

56:                                               ; preds = %55
  store i8 0, ptr %3, align 1, !tbaa !9
  br label %19, !llvm.loop !36

57:                                               ; preds = %22
  br label %58

58:                                               ; preds = %57, %1
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  ret void

59:                                               ; preds = %54
  %60 = load ptr, ptr %8, align 8
  %61 = load i32, ptr %9, align 4
  %62 = insertvalue { ptr, i32 } poison, ptr %60, 0
  %63 = insertvalue { ptr, i32 } %62, i32 %61, 1
  resume { ptr, i32 } %63
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind noalias writable sret(%"class.vl::collections::EnumerableForEachIterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !6, i64 24}
!16 = !{!"_ZTSN2vl8database20InMemoryBufferSourceE", !17, i64 0, !18, i64 8, !19, i64 16, !6, i64 24, !21, i64 32, !22, i64 40, !23, i64 56, !27, i64 104, !31, i64 152}
!17 = !{!"_ZTSN2vl6ObjectE"}
!18 = !{!"_ZTSN2vl8database13IBufferSourceE"}
!19 = !{!"_ZTSN2vl8database8IdObjectIiLl0EEE", !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN2vl8SpinLockE", !17, i64 0, !21, i64 8}
!23 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !24, i64 0}
!24 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !25, i64 0, !21, i64 24, !10, i64 32}
!25 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database14BufferPageDescEEEEE", !26, i64 0, !6, i64 8, !21, i64 16}
!26 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database14BufferPageDescEEELb0EEE", !17, i64 0}
!27 = !{!"_ZTSN2vl11collections4ListImmEE", !28, i64 0}
!28 = !{!"_ZTSN2vl11collections8ListBaseImmEE", !29, i64 0, !21, i64 24, !10, i64 32}
!29 = !{!"_ZTSN2vl11collections9ArrayBaseImEE", !30, i64 0, !6, i64 8, !21, i64 16}
!30 = !{!"_ZTSN2vl11collections9ListStoreImLb1EEE", !17, i64 0}
!31 = !{!"_ZTSN2vl8database8IdObjectImLl1EEE", !21, i64 0}
!32 = !{!33, !6, i64 0}
!33 = !{!"_ZTSN2vl8database14BufferPageDescE", !6, i64 0, !21, i64 8, !10, i64 16, !21, i64 24, !10, i64 32}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}


; 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.vl::collections::EnumerableForEachIterator" = type { %"class.vl::collections::ForEachIterator", %"class.vl::Ptr.9" }
%"class.vl::collections::ForEachIterator" = type { %"class.vl::Object" }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.9" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr" = type { ptr, ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl8database20InMemoryBufferSource6UnloadEv(ptr noundef nonnull align 8 dereferenceable(160) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
.critedge:
  %1 = alloca %"class.vl::collections::EnumerableForEachIterator", align 8
  %2 = alloca %"class.vl::Ptr", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #5
  %3 = getelementptr inbounds i8, ptr %0, i64 56
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr %3, i64 %6
  call void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind nonnull writable sret(%"class.vl::collections::EnumerableForEachIterator") align 8 %1, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  br label %9

9:                                                ; preds = %.backedge, %.critedge
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load ptr, ptr %11, align 8
  %13 = invoke noundef zeroext i1 %12(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %14 unwind label %16

14:                                               ; preds = %9
  br i1 %13, label %18, label %15

15:                                               ; preds = %14
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  ret void

16:                                               ; preds = %9
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  resume { ptr, i32 } %17

18:                                               ; preds = %14
  %19 = call noundef zeroext i1 @_ZNK2vl3PtrINS_8database14BufferPageDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  br i1 %19, label %20, label %.backedge

20:                                               ; preds = %18
  %21 = load ptr, ptr %8, align 8, !tbaa !8
  %22 = atomicrmw sub ptr %21, i64 1 seq_cst, align 8
  %23 = call noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %24 = load ptr, ptr %23, align 8, !tbaa !28
  call void @free(ptr noundef %24) #5
  br label %.backedge

.backedge:                                        ; preds = %20, %18
  br label %9, !llvm.loop !30
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind noalias writable sret(%"class.vl::collections::EnumerableForEachIterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database14BufferPageDescEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !15, i64 24}
!9 = !{!"_ZTSN2vl8database20InMemoryBufferSourceE", !10, i64 0, !11, i64 8, !12, i64 16, !15, i64 24, !16, i64 32, !17, i64 40, !18, i64 56, !23, i64 104, !27, i64 152}
!10 = !{!"_ZTSN2vl6ObjectE"}
!11 = !{!"_ZTSN2vl8database13IBufferSourceE"}
!12 = !{!"_ZTSN2vl8database8IdObjectIiLl0EEE", !13, i64 0}
!13 = !{!"int", !14, i64 0}
!14 = !{!"omnipotent char", !7, i64 0}
!15 = !{!"any pointer", !14, i64 0}
!16 = !{!"long", !14, i64 0}
!17 = !{!"_ZTSN2vl8SpinLockE", !10, i64 0, !16, i64 8}
!18 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !19, i64 0}
!19 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !20, i64 0, !16, i64 24, !22, i64 32}
!20 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database14BufferPageDescEEEEE", !21, i64 0, !15, i64 8, !16, i64 16}
!21 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database14BufferPageDescEEELb0EEE", !10, i64 0}
!22 = !{!"bool", !14, i64 0}
!23 = !{!"_ZTSN2vl11collections4ListImmEE", !24, i64 0}
!24 = !{!"_ZTSN2vl11collections8ListBaseImmEE", !25, i64 0, !16, i64 24, !22, i64 32}
!25 = !{!"_ZTSN2vl11collections9ArrayBaseImEE", !26, i64 0, !15, i64 8, !16, i64 16}
!26 = !{!"_ZTSN2vl11collections9ListStoreImLb1EEE", !10, i64 0}
!27 = !{!"_ZTSN2vl8database8IdObjectImLl1EEE", !16, i64 0}
!28 = !{!29, !15, i64 0}
!29 = !{!"_ZTSN2vl8database14BufferPageDescE", !15, i64 0, !16, i64 8, !22, i64 16, !16, i64 24, !22, i64 32}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopUnrollPass,SROAPass,SimplifyCFGPass