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

; 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 }
%"class.vl::Ptr.37" = type { ptr, ptr, ptr, ptr }
%"struct.vl::database::IdObject.17" = type { i64 }
%"class.vl::SpinLock::Scope" = type { %"class.vl::Object", ptr }
%"class.vl::Object" = type { ptr }
%"struct.vl::database::IdObject" = type { i32 }
%"class.vl::database::LogManager" = type { %"class.vl::Object", ptr, %"struct.vl::database::IdObject", i8, %"class.vl::database::log_internal::LogAddressItem", %"class.vl::database::log_internal::LogBlocks", %"class.vl::database::log_internal::LogTransactions", %"class.vl::SpinLock" }
%"class.vl::database::log_internal::LogAddressItem" = type { %"class.vl::Object", ptr, %"struct.vl::database::IdObject", i64, i64, %"class.vl::collections::List" }
%"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::Interface" = type { ptr }
%"class.vl::database::log_internal::LogBlocks" = type { %"class.vl::Object", ptr, %"struct.vl::database::IdObject", i64, %"struct.vl::database::IdObject.16" }
%"struct.vl::database::IdObject.16" = type { i64 }
%"class.vl::database::log_internal::LogTransactions" = type { %"class.vl::Object", i64, %"class.vl::collections::Dictionary.18", ptr }
%"class.vl::collections::Dictionary.18" = type { %"class.vl::Object", %"class.vl::collections::SortedList.19", %"class.vl::collections::List.27", %"class.vl::collections::IEnumerable.35" }
%"class.vl::collections::SortedList.19" = type { %"class.vl::collections::ListBase.base.25", %"class.vl::collections::IEnumerable.23" }
%"class.vl::collections::ListBase.base.25" = type <{ %"class.vl::collections::ArrayBase.base.24", i64, i8 }>
%"class.vl::collections::ArrayBase.base.24" = type { %"class.vl::collections::ListStore.22", ptr, i64 }
%"class.vl::collections::ListStore.22" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.23" = type { %"class.vl::Interface" }
%"class.vl::collections::List.27" = type { %"class.vl::collections::ListBase.base.33", %"class.vl::collections::IEnumerable.31" }
%"class.vl::collections::ListBase.base.33" = type <{ %"class.vl::collections::ArrayBase.base.32", i64, i8 }>
%"class.vl::collections::ArrayBase.base.32" = type { %"class.vl::collections::ListStore.30", ptr, i64 }
%"class.vl::collections::ListStore.30" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.31" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.35" = type { %"class.vl::Interface" }
%"class.vl::SpinLock" = type { %"class.vl::Object", i64 }
%"class.vl::database::log_internal::LogTransDesc" = type { %"struct.vl::database::IdObject.16", %"struct.vl::database::IdObject.16", %"class.vl::Ptr.37" }

; 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) #0

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) #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
declare dso_local void @_ZN2vl8database12log_internal15LogTransactions12GetTransDescENS0_8IdObjectImLl3EEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr") align 8, ptr noundef nonnull align 8 dereferenceable(136), i64) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl8database12log_internal9LogWriterC1ERNS_8SpinLockEPNS0_13BufferManagerENS0_8IdObjectIiLl0EEEPNS1_14LogAddressItemEPNS1_15LogTransactionsEPNS1_9LogBlocksENS7_ImLl3EEE(ptr noundef nonnull align 8 dereferenceable(129), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32, ptr noundef, ptr noundef, ptr noundef, i64) unnamed_addr #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

declare void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

; Function Attrs: nounwind
declare void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #7

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl8database10LogManager11OpenLogItemENS0_8IdObjectImLl3EEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.37") align 8 %0, ptr noundef nonnull align 8 dereferenceable(304) %1, i64 %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.vl::database::IdObject.17", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"class.vl::SpinLock::Scope", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.vl::Ptr", align 8
  %14 = alloca %"struct.vl::database::IdObject.17", align 8
  %15 = alloca %"struct.vl::database::IdObject", align 4
  %16 = alloca %"struct.vl::database::IdObject.17", align 8
  store ptr %0, ptr %4, align 8
  %17 = getelementptr inbounds %"struct.vl::database::IdObject.17", ptr %5, i32 0, i32 0
  store i64 %2, ptr %17, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8
  store i1 false, ptr %7, align 1
  call void @_ZN2vl3PtrINS_8database10ILogWriterEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  store i8 1, ptr %8, align 1, !tbaa !9
  %19 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %20 = trunc i8 %19 to i1
  br i1 %20, label %21, label %91

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %22 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 7
  invoke void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %23 unwind label %28

23:                                               ; preds = %21
  store ptr %10, ptr %9, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %86, %23
  %25 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %26 = trunc i8 %25 to i1
  br i1 %26, label %32, label %27

27:                                               ; preds = %24
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %90

28:                                               ; preds = %21
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %11, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %12, align 4
  br label %89

32:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  %33 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %5, i64 8, i1 false), !tbaa.struct !13
  %34 = getelementptr inbounds %"struct.vl::database::IdObject.17", ptr %14, i32 0, i32 0
  %35 = load i64, ptr %34, align 8
  invoke void @_ZN2vl8database12log_internal15LogTransactions12GetTransDescENS0_8IdObjectImLl3EEE(ptr dead_on_unwind writable sret(%"class.vl::Ptr") align 8 %13, ptr noundef nonnull align 8 dereferenceable(136) %33, i64 %35)
          to label %36 unwind label %72

36:                                               ; preds = %32
  %37 = invoke noundef zeroext i1 @_ZNK2vl3PtrINS_8database12log_internal12LogTransDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %38 unwind label %76

38:                                               ; preds = %36
  br i1 %37, label %39, label %85

39:                                               ; preds = %38
  %40 = invoke noundef ptr @_ZNK2vl3PtrINS_8database12log_internal12LogTransDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %41 unwind label %76

41:                                               ; preds = %39
  %42 = getelementptr inbounds %"class.vl::database::log_internal::LogTransDesc", ptr %40, i32 0, i32 2
  %43 = invoke noundef zeroext i1 @_ZNK2vl3PtrINS_8database10ILogWriterEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %42)
          to label %44 unwind label %76

44:                                               ; preds = %41
  br i1 %43, label %84, label %45

45:                                               ; preds = %44
  %46 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #9
          to label %47 unwind label %76

47:                                               ; preds = %45
  %48 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 7
  %49 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %51 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %51, i64 4, i1 false), !tbaa.struct !39
  %52 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 4
  %53 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 6
  %54 = getelementptr inbounds %"class.vl::database::LogManager", ptr %18, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %5, i64 8, i1 false), !tbaa.struct !13
  %55 = getelementptr inbounds %"struct.vl::database::IdObject", ptr %15, i32 0, i32 0
  %56 = load i32, ptr %55, align 4
  %57 = getelementptr inbounds %"struct.vl::database::IdObject.17", ptr %16, i32 0, i32 0
  %58 = load i64, ptr %57, align 8
  invoke void @_ZN2vl8database12log_internal9LogWriterC1ERNS_8SpinLockEPNS0_13BufferManagerENS0_8IdObjectIiLl0EEEPNS1_14LogAddressItemEPNS1_15LogTransactionsEPNS1_9LogBlocksENS7_ImLl3EEE(ptr noundef nonnull align 8 dereferenceable(129) %46, ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef %50, i32 %56, ptr noundef %52, ptr noundef %53, ptr noundef %54, i64 %58)
          to label %59 unwind label %80

59:                                               ; preds = %47
  %60 = icmp eq ptr %46, null
  br i1 %60, label %63, label %61

61:                                               ; preds = %59
  %62 = getelementptr inbounds i8, ptr %46, i64 8
  br label %63

63:                                               ; preds = %61, %59
  %64 = phi ptr [ %62, %61 ], [ null, %59 ]
  %65 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl3PtrINS_8database10ILogWriterEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %64)
          to label %66 unwind label %76

66:                                               ; preds = %63
  %67 = invoke noundef ptr @_ZNK2vl3PtrINS_8database12log_internal12LogTransDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %68 unwind label %76

68:                                               ; preds = %66
  %69 = getelementptr inbounds %"class.vl::database::log_internal::LogTransDesc", ptr %67, i32 0, i32 2
  %70 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl3PtrINS_8database10ILogWriterEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %69, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %71 unwind label %76

71:                                               ; preds = %68
  br label %84

72:                                               ; preds = %32
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  br label %88

76:                                               ; preds = %68, %66, %63, %45, %41, %39, %36
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %11, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %12, align 4
  br label %87

80:                                               ; preds = %47
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %11, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %46, i64 noundef 136) #10
  br label %87

84:                                               ; preds = %71, %44
  br label %85

85:                                               ; preds = %84, %38
  call void @_ZN2vl3PtrINS_8database12log_internal12LogTransDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  br label %86

86:                                               ; preds = %85
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %24, !llvm.loop !41

87:                                               ; preds = %80, %76
  call void @_ZN2vl3PtrINS_8database12log_internal12LogTransDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %88

88:                                               ; preds = %87, %72
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %89

89:                                               ; preds = %88, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @_ZN2vl3PtrINS_8database10ILogWriterEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #8
  br label %95

90:                                               ; preds = %27
  br label %91

91:                                               ; preds = %90, %3
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  store i1 true, ptr %7, align 1
  %92 = load i1, ptr %7, align 1
  br i1 %92, label %94, label %93

93:                                               ; preds = %91
  call void @_ZN2vl3PtrINS_8database10ILogWriterEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #8
  br label %94

94:                                               ; preds = %93, %91
  ret void

95:                                               ; preds = %89
  %96 = load ptr, ptr %11, align 8
  %97 = load i32, ptr %12, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

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

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

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nobuiltin 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 #5 = { "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 = { 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 #7 = { nobuiltin allocsize(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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{i64 0, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSN2vl8database10LogManagerE", !18, i64 0, !6, i64 8, !19, i64 16, !10, i64 20, !21, i64 24, !26, i64 112, !28, i64 152, !38, i64 288}
!18 = !{!"_ZTSN2vl6ObjectE"}
!19 = !{!"_ZTSN2vl8database8IdObjectIiLl0EEE", !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN2vl8database12log_internal14LogAddressItemE", !18, i64 0, !6, i64 8, !19, i64 16, !15, i64 24, !15, i64 32, !22, i64 40}
!22 = !{!"_ZTSN2vl11collections4ListINS_8database8IdObjectImLl1EEES4_EE", !23, i64 0}
!23 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectImLl1EEES4_EE", !24, i64 0, !15, i64 24, !10, i64 32}
!24 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectImLl1EEEEE", !25, i64 0, !6, i64 8, !15, i64 16}
!25 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectImLl1EEELb1EEE", !18, i64 0}
!26 = !{!"_ZTSN2vl8database12log_internal9LogBlocksE", !18, i64 0, !6, i64 8, !19, i64 16, !15, i64 24, !27, i64 32}
!27 = !{!"_ZTSN2vl8database8IdObjectImLl2EEE", !15, i64 0}
!28 = !{!"_ZTSN2vl8database12log_internal15LogTransactionsE", !18, i64 0, !15, i64 8, !29, i64 16, !6, i64 128}
!29 = !{!"_ZTSN2vl11collections10DictionaryINS_8database8IdObjectImLl3EEENS_3PtrINS2_12log_internal12LogTransDescEEES4_PS7_EE", !18, i64 0, !30, i64 8, !34, i64 56}
!30 = !{!"_ZTSN2vl11collections10SortedListINS_8database8IdObjectImLl3EEES4_EE", !31, i64 0}
!31 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_EE", !32, i64 0, !15, i64 24, !10, i64 32}
!32 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEEE", !33, i64 0, !6, i64 8, !15, i64 16}
!33 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectImLl3EEELb1EEE", !18, i64 0}
!34 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database12log_internal12LogTransDescEEEPS5_EE", !35, i64 0}
!35 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database12log_internal12LogTransDescEEEPS5_EE", !36, i64 0, !15, i64 24, !10, i64 32}
!36 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database12log_internal12LogTransDescEEEEE", !37, i64 0, !6, i64 8, !15, i64 16}
!37 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database12log_internal12LogTransDescEEELb0EEE", !18, i64 0}
!38 = !{!"_ZTSN2vl8SpinLockE", !18, i64 0, !15, i64 8}
!39 = !{i64 0, i64 4, !40}
!40 = !{!20, !20, i64 0}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}


; 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 }
%"class.vl::Ptr.37" = type { ptr, ptr, ptr, ptr }
%"class.vl::SpinLock::Scope" = type { %"class.vl::Object", ptr }
%"class.vl::Object" = type { 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 uwtable
declare dso_local void @_ZN2vl8database12log_internal15LogTransactions12GetTransDescENS0_8IdObjectImLl3EEE(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr") align 8, ptr noundef nonnull align 8 dereferenceable(136), i64) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl8database12log_internal9LogWriterC1ERNS_8SpinLockEPNS0_13BufferManagerENS0_8IdObjectIiLl0EEEPNS1_14LogAddressItemEPNS1_15LogTransactionsEPNS1_9LogBlocksENS7_ImLl3EEE(ptr noundef nonnull align 8 dereferenceable(129), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32, ptr noundef, ptr noundef, ptr noundef, i64) unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

declare void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl8database10LogManager11OpenLogItemENS0_8IdObjectImLl3EEE(ptr dead_on_unwind noalias nonnull writable sret(%"class.vl::Ptr.37") align 8 %0, ptr noundef nonnull align 8 dereferenceable(304) %1, i64 %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.vl::SpinLock::Scope", align 8
  %5 = alloca %"class.vl::Ptr", align 8
  tail call void @_ZN2vl3PtrINS_8database10ILogWriterEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %6 = getelementptr inbounds i8, ptr %1, i64 288
  invoke void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %9 unwind label %7

7:                                                ; preds = %3
  %8 = landingpad { ptr, i32 }
          cleanup
  br label %40

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %10 = getelementptr inbounds i8, ptr %1, i64 152
  invoke void @_ZN2vl8database12log_internal15LogTransactions12GetTransDescENS0_8IdObjectImLl3EEE(ptr dead_on_unwind nonnull writable sret(%"class.vl::Ptr") align 8 %5, ptr noundef nonnull align 8 dereferenceable(136) %10, i64 %2)
          to label %11 unwind label %32

11:                                               ; preds = %9
  %12 = call noundef zeroext i1 @_ZNK2vl3PtrINS_8database12log_internal12LogTransDescEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  br i1 %12, label %13, label %.critedge

13:                                               ; preds = %11
  %14 = call noundef ptr @_ZNK2vl3PtrINS_8database12log_internal12LogTransDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = call noundef zeroext i1 @_ZNK2vl3PtrINS_8database10ILogWriterEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %15)
  br i1 %16, label %.critedge, label %17

17:                                               ; preds = %13
  %18 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #8
          to label %19 unwind label %34

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %1, i64 16
  %.sroa.01.0.copyload = load i32, ptr %22, align 8, !tbaa !33
  %23 = getelementptr inbounds i8, ptr %1, i64 24
  %24 = getelementptr inbounds i8, ptr %1, i64 112
  invoke void @_ZN2vl8database12log_internal9LogWriterC1ERNS_8SpinLockEPNS0_13BufferManagerENS0_8IdObjectIiLl0EEEPNS1_14LogAddressItemEPNS1_15LogTransactionsEPNS1_9LogBlocksENS7_ImLl3EEE(ptr noundef nonnull align 8 dereferenceable(129) %18, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef %21, i32 %.sroa.01.0.copyload, ptr noundef nonnull %23, ptr noundef nonnull %10, ptr noundef nonnull %24, i64 %2)
          to label %25 unwind label %36

25:                                               ; preds = %19
  %26 = getelementptr inbounds i8, ptr %18, i64 8
  %27 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl3PtrINS_8database10ILogWriterEEaSEPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %26)
          to label %28 unwind label %34

28:                                               ; preds = %25
  %29 = call noundef ptr @_ZNK2vl3PtrINS_8database12log_internal12LogTransDescEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl3PtrINS_8database10ILogWriterEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %.critedge unwind label %34

32:                                               ; preds = %9
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %39

34:                                               ; preds = %28, %25, %17
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

36:                                               ; preds = %19
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 136) #9
  br label %38

.critedge:                                        ; preds = %13, %28, %11
  call void @_ZN2vl3PtrINS_8database12log_internal12LogTransDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret void

38:                                               ; preds = %36, %34
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %37, %36 ]
  call void @_ZN2vl3PtrINS_8database12log_internal12LogTransDescEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %39

39:                                               ; preds = %38, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %38 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %40

40:                                               ; preds = %39, %7
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %39 ], [ %8, %7 ]
  call void @_ZN2vl3PtrINS_8database10ILogWriterEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { nobuiltin 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 = { "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 "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 = { nobuiltin allocsize(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 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !8, i64 8}
!6 = !{!"_ZTSN2vl8database10LogManagerE", !7, i64 0, !8, i64 8, !11, i64 16, !13, i64 20, !14, i64 24, !20, i64 112, !22, i64 152, !32, i64 288}
!7 = !{!"_ZTSN2vl6ObjectE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN2vl8database8IdObjectIiLl0EEE", !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"bool", !9, i64 0}
!14 = !{!"_ZTSN2vl8database12log_internal14LogAddressItemE", !7, i64 0, !8, i64 8, !11, i64 16, !15, i64 24, !15, i64 32, !16, i64 40}
!15 = !{!"long", !9, i64 0}
!16 = !{!"_ZTSN2vl11collections4ListINS_8database8IdObjectImLl1EEES4_EE", !17, i64 0}
!17 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectImLl1EEES4_EE", !18, i64 0, !15, i64 24, !13, i64 32}
!18 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectImLl1EEEEE", !19, i64 0, !8, i64 8, !15, i64 16}
!19 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectImLl1EEELb1EEE", !7, i64 0}
!20 = !{!"_ZTSN2vl8database12log_internal9LogBlocksE", !7, i64 0, !8, i64 8, !11, i64 16, !15, i64 24, !21, i64 32}
!21 = !{!"_ZTSN2vl8database8IdObjectImLl2EEE", !15, i64 0}
!22 = !{!"_ZTSN2vl8database12log_internal15LogTransactionsE", !7, i64 0, !15, i64 8, !23, i64 16, !8, i64 128}
!23 = !{!"_ZTSN2vl11collections10DictionaryINS_8database8IdObjectImLl3EEENS_3PtrINS2_12log_internal12LogTransDescEEES4_PS7_EE", !7, i64 0, !24, i64 8, !28, i64 56}
!24 = !{!"_ZTSN2vl11collections10SortedListINS_8database8IdObjectImLl3EEES4_EE", !25, i64 0}
!25 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_EE", !26, i64 0, !15, i64 24, !13, i64 32}
!26 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEEE", !27, i64 0, !8, i64 8, !15, i64 16}
!27 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectImLl3EEELb1EEE", !7, i64 0}
!28 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database12log_internal12LogTransDescEEEPS5_EE", !29, i64 0}
!29 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database12log_internal12LogTransDescEEEPS5_EE", !30, i64 0, !15, i64 24, !13, i64 32}
!30 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database12log_internal12LogTransDescEEEEE", !31, i64 0, !8, i64 8, !15, i64 16}
!31 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database12log_internal12LogTransDescEEELb0EEE", !7, i64 0}
!32 = !{!"_ZTSN2vl8SpinLockE", !7, i64 0, !15, i64 8}
!33 = !{!12, !12, i64 0}


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