; LLVM IR from vczh/herodb :: Kernel/Source/Utility (FileBuffer)

; 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::Ptr" = type { ptr, ptr, ptr, ptr }
%"struct.vl::database::IdObject" = type { i64 }
%"class.vl::database::FileBufferSource" = type { %"class.vl::Object", %"class.vl::database::IBufferSource", %"struct.vl::database::IdObject.10", i64, %"class.vl::SpinLock", %"class.vl::ObjectString", i32, %"struct.vl::database::IdObject", %"class.vl::database::buffer_internal::FileMapping", %"class.vl::database::buffer_internal::FileUseMasks", %"class.vl::database::buffer_internal::FileFreePages" }
%"class.vl::Object" = type { ptr }
%"class.vl::database::IBufferSource" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }
%"struct.vl::database::IdObject.10" = type { i32 }
%"class.vl::SpinLock" = type { %"class.vl::Object", i64 }
%"class.vl::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::database::buffer_internal::FileMapping" = type { %"class.vl::Object", i64, i32, ptr, %"class.vl::collections::Dictionary", i64 }
%"class.vl::collections::Dictionary" = type { %"class.vl::Object", %"class.vl::collections::SortedList", %"class.vl::collections::List", %"class.vl::collections::IEnumerable.6" }
%"class.vl::collections::SortedList" = 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" = type { %"class.vl::collections::ListBase.base.5", %"class.vl::collections::IEnumerable.3" }
%"class.vl::collections::ListBase.base.5" = type <{ %"class.vl::collections::ArrayBase.base.4", i64, i8 }>
%"class.vl::collections::ArrayBase.base.4" = type { %"class.vl::collections::ListStore.2", ptr, i64 }
%"class.vl::collections::ListStore.2" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.3" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.6" = type { %"class.vl::Interface" }
%"class.vl::database::buffer_internal::FileUseMasks" = type { %"class.vl::Object", i32, i64, %"class.vl::collections::List.8", i64, ptr }
%"class.vl::collections::List.8" = type { %"class.vl::collections::ListBase.base", %"class.vl::collections::IEnumerable" }
%"class.vl::database::buffer_internal::FileFreePages" = type { %"class.vl::Object", i64, %"class.vl::collections::List.8", i64, i64, ptr, ptr }
%"class.vl::database::BufferPageDesc" = type <{ ptr, i64, i8, [7 x i8], i64, i8, [7 x i8] }>

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 dso_local noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 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) #2

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

declare i32 @msync(ptr noundef, i64 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl8database15buffer_internal11FileMapping17GetMappedPageDescENS0_8IdObjectImLl1EEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr") align 8, ptr noundef nonnull align 8 dereferenceable(152), i64) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl8database16FileBufferSource10UnlockPageENS0_8IdObjectImLl1EEEPvNS0_15PersistanceTypeE(ptr noundef nonnull align 8 dereferenceable(448) %0, i64 %1, ptr noundef %2, i32 noundef %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca %"struct.vl::database::IdObject", align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.vl::Ptr", align 8
  %11 = alloca %"struct.vl::database::IdObject", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = getelementptr inbounds %"struct.vl::database::IdObject", ptr %6, i32 0, i32 0
  store i64 %1, ptr %15, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %16 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  %17 = getelementptr inbounds %"class.vl::database::FileBufferSource", ptr %16, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %6, i64 8, i1 false), !tbaa.struct !11
  %18 = getelementptr inbounds %"struct.vl::database::IdObject", ptr %11, i32 0, i32 0
  %19 = load i64, ptr %18, align 8
  call void @_ZN2vl8database15buffer_internal11FileMapping17GetMappedPageDescENS0_8IdObjectImLl1EEE(ptr dead_on_unwind writable sret(%"class.vl::Ptr") align 8 %10, ptr noundef nonnull align 8 dereferenceable(152) %17, i64 %19)
  %20 = invoke noundef zeroext i1 @_ZNK2vl3PtrINS_8database14BufferPageDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %21 unwind label %23

21:                                               ; preds = %4
  br i1 %20, label %27, label %22

22:                                               ; preds = %21
  store i1 false, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %64

23:                                               ; preds = %60, %56, %50, %48, %44, %35, %27, %4
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %12, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %13, align 4
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  br label %66

27:                                               ; preds = %21
  %28 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %29 unwind label %23

29:                                               ; preds = %27
  %30 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %28, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = icmp ne ptr %31, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  store i1 false, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %64

35:                                               ; preds = %29
  %36 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %37 unwind label %23

37:                                               ; preds = %35
  %38 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %36, i32 0, i32 2
  %39 = load i8, ptr %38, align 8, !tbaa !17, !range !18, !noundef !19
  %40 = trunc i8 %39 to i1
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i1 false, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %64

42:                                               ; preds = %37
  %43 = load i32, ptr %9, align 4, !tbaa !9
  switch i32 %43, label %60 [
    i32 0, label %60
    i32 1, label %44
    i32 2, label %48
  ]

44:                                               ; preds = %42
  %45 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %46 unwind label %23

46:                                               ; preds = %44
  %47 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %45, i32 0, i32 5
  store i8 1, ptr %47, align 8, !tbaa !20
  br label %60

48:                                               ; preds = %42
  %49 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %50 unwind label %23

50:                                               ; preds = %48
  %51 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %49, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !14
  %53 = getelementptr inbounds %"class.vl::database::FileBufferSource", ptr %16, i32 0, i32 3
  %54 = load i64, ptr %53, align 8, !tbaa !21
  %55 = invoke i32 @msync(ptr noundef %52, i64 noundef %54, i32 noundef 4)
          to label %56 unwind label %23

56:                                               ; preds = %50
  %57 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %58 unwind label %23

58:                                               ; preds = %56
  %59 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %57, i32 0, i32 5
  store i8 0, ptr %59, align 8, !tbaa !20
  br label %60

60:                                               ; preds = %58, %46, %42, %42
  %61 = invoke noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %62 unwind label %23

62:                                               ; preds = %60
  %63 = getelementptr inbounds %"class.vl::database::BufferPageDesc", ptr %61, i32 0, i32 2
  store i8 0, ptr %63, align 8, !tbaa !17
  store i1 true, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %64

64:                                               ; preds = %62, %41, %34, %22
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  %65 = load i1, ptr %5, align 1
  ret i1 %65

66:                                               ; preds = %23
  %67 = load ptr, ptr %12, align 8
  %68 = load i32, ptr %13, align 4
  %69 = insertvalue { ptr, i32 } poison, ptr %67, 0
  %70 = insertvalue { ptr, i32 } %69, i32 %68, 1
  resume { ptr, i32 } %70
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 }

!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 = !{!"_ZTSN2vl8database15PersistanceTypeE", !7, i64 0}
!11 = !{i64 0, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN2vl8database14BufferPageDescE", !6, i64 0, !13, i64 8, !16, i64 16, !13, i64 24, !16, i64 32}
!16 = !{!"bool", !7, i64 0}
!17 = !{!15, !16, i64 16}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!15, !16, i64 32}
!21 = !{!22, !13, i64 24}
!22 = !{!"_ZTSN2vl8database16FileBufferSourceE", !23, i64 0, !24, i64 8, !25, i64 16, !13, i64 24, !27, i64 32, !28, i64 48, !26, i64 96, !29, i64 104, !30, i64 112, !40, i64 264, !42, i64 352}
!23 = !{!"_ZTSN2vl6ObjectE"}
!24 = !{!"_ZTSN2vl8database13IBufferSourceE"}
!25 = !{!"_ZTSN2vl8database8IdObjectIiLl0EEE", !26, i64 0}
!26 = !{!"int", !7, i64 0}
!27 = !{!"_ZTSN2vl8SpinLockE", !23, i64 0, !13, i64 8}
!28 = !{!"_ZTSN2vl12ObjectStringIwEE", !23, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 32, !13, i64 40}
!29 = !{!"_ZTSN2vl8database8IdObjectImLl1EEE", !13, i64 0}
!30 = !{!"_ZTSN2vl8database15buffer_internal11FileMappingE", !23, i64 0, !13, i64 8, !26, i64 16, !6, i64 24, !31, i64 32, !13, i64 144}
!31 = !{!"_ZTSN2vl11collections10DictionaryImNS_3PtrINS_8database14BufferPageDescEEEmPS4_EE", !23, i64 0, !32, i64 8, !36, i64 56}
!32 = !{!"_ZTSN2vl11collections10SortedListImmEE", !33, i64 0}
!33 = !{!"_ZTSN2vl11collections8ListBaseImmEE", !34, i64 0, !13, i64 24, !16, i64 32}
!34 = !{!"_ZTSN2vl11collections9ArrayBaseImEE", !35, i64 0, !6, i64 8, !13, i64 16}
!35 = !{!"_ZTSN2vl11collections9ListStoreImLb1EEE", !23, i64 0}
!36 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !37, i64 0}
!37 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !38, i64 0, !13, i64 24, !16, i64 32}
!38 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database14BufferPageDescEEEEE", !39, i64 0, !6, i64 8, !13, i64 16}
!39 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database14BufferPageDescEEELb0EEE", !23, i64 0}
!40 = !{!"_ZTSN2vl8database15buffer_internal12FileUseMasksE", !23, i64 0, !26, i64 8, !13, i64 16, !41, i64 24, !13, i64 72, !6, i64 80}
!41 = !{!"_ZTSN2vl11collections4ListImmEE", !33, i64 0}
!42 = !{!"_ZTSN2vl8database15buffer_internal13FileFreePagesE", !23, i64 0, !13, i64 8, !41, i64 16, !13, i64 64, !13, i64 72, !6, i64 80, !6, i64 88}


; 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::Ptr" = type { ptr, ptr, ptr, ptr }

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 dso_local noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

declare i32 @msync(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl8database15buffer_internal11FileMapping17GetMappedPageDescENS0_8IdObjectImLl1EEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr") align 8, ptr noundef nonnull align 8 dereferenceable(152), i64) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN2vl8database16FileBufferSource10UnlockPageENS0_8IdObjectImLl1EEEPvNS0_15PersistanceTypeE(ptr noundef nonnull align 8 dereferenceable(448) %0, i64 %1, ptr noundef readnone %2, i32 noundef %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.vl::Ptr", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  %6 = getelementptr inbounds i8, ptr %0, i64 112
  call void @_ZN2vl8database15buffer_internal11FileMapping17GetMappedPageDescENS0_8IdObjectImLl1EEE(ptr dead_on_unwind nonnull writable sret(%"class.vl::Ptr") align 8 %5, ptr noundef nonnull align 8 dereferenceable(152) %6, i64 %1)
  %7 = call noundef zeroext i1 @_ZNK2vl3PtrINS_8database14BufferPageDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  br i1 %7, label %10, label %30

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

10:                                               ; preds = %4
  %11 = call noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %.not = icmp eq ptr %12, %2
  br i1 %.not, label %13, label %30

13:                                               ; preds = %10
  %14 = call noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load i8, ptr %15, align 8, !tbaa !12, !range !13, !noundef !14
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %18, label %30

18:                                               ; preds = %13
  switch i32 %3, label %27 [
    i32 2, label %19
    i32 1, label %.sink.split
  ]

19:                                               ; preds = %18
  %20 = call noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %0, i64 24
  %23 = load i64, ptr %22, align 8, !tbaa !15
  %24 = invoke i32 @msync(ptr noundef %21, i64 noundef %23, i32 noundef 4)
          to label %.sink.split unwind label %8

.sink.split:                                      ; preds = %19, %18
  %.sink = phi i8 [ 1, %18 ], [ 0, %19 ]
  %25 = call noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %26 = getelementptr inbounds i8, ptr %25, i64 32
  store i8 %.sink, ptr %26, align 8, !tbaa !37
  br label %27

27:                                               ; preds = %.sink.split, %18
  %28 = call noundef ptr @_ZNK2vl3PtrINS_8database14BufferPageDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store i8 0, ptr %29, align 8, !tbaa !12
  br label %30

30:                                               ; preds = %13, %10, %4, %27
  %.0 = phi i1 [ true, %27 ], [ false, %4 ], [ false, %10 ], [ false, %13 ]
  call void @_ZN2vl3PtrINS_8database14BufferPageDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret i1 %.0
}

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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 = !{!"_ZTSN2vl8database14BufferPageDescE", !7, i64 0, !10, i64 8, !11, i64 16, !10, i64 24, !11, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!6, !11, i64 16}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !10, i64 24}
!16 = !{!"_ZTSN2vl8database16FileBufferSourceE", !17, i64 0, !18, i64 8, !19, i64 16, !10, i64 24, !21, i64 32, !22, i64 48, !20, i64 96, !23, i64 104, !24, i64 112, !34, i64 264, !36, i64 352}
!17 = !{!"_ZTSN2vl6ObjectE"}
!18 = !{!"_ZTSN2vl8database13IBufferSourceE"}
!19 = !{!"_ZTSN2vl8database8IdObjectIiLl0EEE", !20, i64 0}
!20 = !{!"int", !8, i64 0}
!21 = !{!"_ZTSN2vl8SpinLockE", !17, i64 0, !10, i64 8}
!22 = !{!"_ZTSN2vl12ObjectStringIwEE", !17, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!23 = !{!"_ZTSN2vl8database8IdObjectImLl1EEE", !10, i64 0}
!24 = !{!"_ZTSN2vl8database15buffer_internal11FileMappingE", !17, i64 0, !10, i64 8, !20, i64 16, !7, i64 24, !25, i64 32, !10, i64 144}
!25 = !{!"_ZTSN2vl11collections10DictionaryImNS_3PtrINS_8database14BufferPageDescEEEmPS4_EE", !17, i64 0, !26, i64 8, !30, i64 56}
!26 = !{!"_ZTSN2vl11collections10SortedListImmEE", !27, i64 0}
!27 = !{!"_ZTSN2vl11collections8ListBaseImmEE", !28, i64 0, !10, i64 24, !11, i64 32}
!28 = !{!"_ZTSN2vl11collections9ArrayBaseImEE", !29, i64 0, !7, i64 8, !10, i64 16}
!29 = !{!"_ZTSN2vl11collections9ListStoreImLb1EEE", !17, i64 0}
!30 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !31, i64 0}
!31 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database14BufferPageDescEEEPS4_EE", !32, i64 0, !10, i64 24, !11, i64 32}
!32 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database14BufferPageDescEEEEE", !33, i64 0, !7, i64 8, !10, i64 16}
!33 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database14BufferPageDescEEELb0EEE", !17, i64 0}
!34 = !{!"_ZTSN2vl8database15buffer_internal12FileUseMasksE", !17, i64 0, !20, i64 8, !10, i64 16, !35, i64 24, !10, i64 72, !7, i64 80}
!35 = !{!"_ZTSN2vl11collections4ListImmEE", !27, i64 0}
!36 = !{!"_ZTSN2vl8database15buffer_internal13FileFreePagesE", !17, i64 0, !10, i64 8, !35, i64 16, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 88}
!37 = !{!6, !11, i64 32}


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