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

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

%"struct.vl::database::IdObject" = type { i64 }
%"class.vl::SpinLock::Scope" = type { %"class.vl::Object", ptr }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.60" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr" = type { ptr, ptr, ptr, ptr }
%"struct.vl::database::LockTarget" = type { i32, i32, %"struct.vl::database::IdObject.0", %union.anon }
%"struct.vl::database::IdObject.0" = type { i32 }
%union.anon = type { %"struct.vl::database::IdObject.1" }
%"struct.vl::database::IdObject.1" = type { i64 }
%"class.vl::database::LockManager" = type { %"class.vl::Object", ptr, %"class.vl::SpinLock", %"class.vl::collections::Dictionary", %"class.vl::collections::Dictionary.10", %"class.vl::collections::Array", %"class.vl::collections::Dictionary.33" }
%"class.vl::SpinLock" = type { %"class.vl::Object", i64 }
%"class.vl::collections::Dictionary" = type { %"class.vl::Object", %"class.vl::collections::SortedList", %"class.vl::collections::List", %"class.vl::collections::IEnumerable.9" }
%"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::Interface" = type { ptr }
%"class.vl::collections::List" = type { %"class.vl::collections::ListBase.base.8", %"class.vl::collections::IEnumerable.6" }
%"class.vl::collections::ListBase.base.8" = type <{ %"class.vl::collections::ArrayBase.base.7", i64, i8 }>
%"class.vl::collections::ArrayBase.base.7" = type { %"class.vl::collections::ListStore.5", ptr, i64 }
%"class.vl::collections::ListStore.5" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.6" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.9" = type { %"class.vl::Interface" }
%"class.vl::collections::Dictionary.10" = type { %"class.vl::Object", %"class.vl::collections::SortedList.11", %"class.vl::collections::List.19", %"class.vl::collections::IEnumerable.27" }
%"class.vl::collections::SortedList.11" = type { %"class.vl::collections::ListBase.base.17", %"class.vl::collections::IEnumerable.15" }
%"class.vl::collections::ListBase.base.17" = type <{ %"class.vl::collections::ArrayBase.base.16", i64, i8 }>
%"class.vl::collections::ArrayBase.base.16" = type { %"class.vl::collections::ListStore.14", ptr, i64 }
%"class.vl::collections::ListStore.14" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.15" = type { %"class.vl::Interface" }
%"class.vl::collections::List.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::IEnumerable.27" = type { %"class.vl::Interface" }
%"class.vl::collections::Array" = type { %"class.vl::collections::ArrayBase.base.32", %"class.vl::collections::IEnumerable.31" }
%"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::Dictionary.33" = type { %"class.vl::Object", %"class.vl::collections::SortedList.34", %"class.vl::collections::List.42", %"class.vl::collections::IEnumerable.50" }
%"class.vl::collections::SortedList.34" = type { %"class.vl::collections::ListBase.base.40", %"class.vl::collections::IEnumerable.38" }
%"class.vl::collections::ListBase.base.40" = type <{ %"class.vl::collections::ArrayBase.base.39", i64, i8 }>
%"class.vl::collections::ArrayBase.base.39" = type { %"class.vl::collections::ListStore.37", ptr, i64 }
%"class.vl::collections::ListStore.37" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.38" = type { %"class.vl::Interface" }
%"class.vl::collections::List.42" = type { %"class.vl::collections::ListBase.base.48", %"class.vl::collections::IEnumerable.46" }
%"class.vl::collections::ListBase.base.48" = type <{ %"class.vl::collections::ArrayBase.base.47", i64, i8 }>
%"class.vl::collections::ArrayBase.base.47" = type { %"class.vl::collections::ListStore.45", ptr, i64 }
%"class.vl::collections::ListStore.45" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.46" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.50" = type { %"class.vl::Interface" }
%"struct.vl::database::LockManager::PendingInfo" = type { %"class.vl::collections::SortedList.11", i64 }
%"struct.vl::database::LockManager::TransInfo" = type { %"struct.vl::database::IdObject", i64, %"class.vl::collections::SortedList.52", %"struct.vl::database::LockTarget" }
%"class.vl::collections::SortedList.52" = type { %"class.vl::collections::ListBase.base.58", %"class.vl::collections::IEnumerable.56" }
%"class.vl::collections::ListBase.base.58" = type <{ %"class.vl::collections::ArrayBase.base.57", i64, i8 }>
%"class.vl::collections::ArrayBase.base.57" = type { %"class.vl::collections::ListStore.55", ptr, i64 }
%"class.vl::collections::ListStore.55" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.56" = type { %"class.vl::Interface" }
%"struct.vl::database::LockResult" = type { i8, ptr }

@.str = external hidden unnamed_addr constant [101 x i32], align 4
@_ZTIN2vl5ErrorE = external dso_local constant { ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [114 x i32], align 4

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl8database10LockTarget7IsValidEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_E8RemoveAtEl(ptr noundef nonnull align 8 dereferenceable(33), i64 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl8database11LockManager17AcquireLockUnsafeENS0_8IdObjectImLl3EEERKNS0_10LockTargetERNS0_10LockResultEb(ptr noundef nonnull align 8 dereferenceable(400), i64, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZN2vl8database11LockManager15PickTransactionERNS0_10LockResultE(ptr noundef nonnull align 8 dereferenceable(400) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.vl::database::IdObject", align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca %"class.vl::SpinLock::Scope", align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.vl::Ptr.60", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.vl::database::IdObject", align 8
  %16 = alloca %"class.vl::Ptr", align 8
  %17 = alloca i8, align 1
  %18 = alloca %"struct.vl::database::IdObject", align 8
  %19 = alloca %"struct.vl::database::LockTarget", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  store i8 1, ptr %6, align 1, !tbaa !9
  %21 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %236

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %24 = getelementptr inbounds %"class.vl::database::LockManager", ptr %20, i32 0, i32 2
  call void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %24)
  store ptr %8, ptr %7, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %232, %23
  %26 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %27 = trunc i8 %26 to i1
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %9, align 4
  br label %233

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %30 = getelementptr inbounds %"class.vl::database::LockManager", ptr %20, i32 0, i32 6
  %31 = invoke noundef i64 @_ZNK2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E5CountEv(ptr noundef nonnull align 8 dereferenceable(104) %30)
          to label %32 unwind label %38

32:                                               ; preds = %29
  %33 = sub nsw i64 %31, 1
  store i64 %33, ptr %10, align 8, !tbaa !13
  br label %34

34:                                               ; preds = %219, %32
  %35 = load i64, ptr %10, align 8, !tbaa !13
  %36 = icmp sge i64 %35, 0
  br i1 %36, label %42, label %37

37:                                               ; preds = %34
  store i32 5, ptr %9, align 4
  br label %228

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %11, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %12, align 4
  br label %230

42:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %43 = getelementptr inbounds %"class.vl::database::LockManager", ptr %20, i32 0, i32 6
  %44 = invoke noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104) %43)
          to label %45 unwind label %63

45:                                               ; preds = %42
  %46 = load i64, ptr %10, align 8, !tbaa !13
  %47 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_8database11LockManager11PendingInfoEEEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46)
          to label %48 unwind label %63

48:                                               ; preds = %45
  invoke void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %47)
          to label %49 unwind label %63

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %50 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %51 unwind label %67

51:                                               ; preds = %49
  %52 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %50, i32 0, i32 1
  %53 = load i64, ptr %52, align 8, !tbaa !15
  store i64 %53, ptr %14, align 8, !tbaa !13
  %54 = load i64, ptr %14, align 8, !tbaa !13
  %55 = icmp eq i64 %54, -1
  br i1 %55, label %56, label %71

56:                                               ; preds = %51
  %57 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %58 unwind label %67

58:                                               ; preds = %56
  %59 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %57, i32 0, i32 0
  %60 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %59)
          to label %61 unwind label %67

61:                                               ; preds = %58
  %62 = sub nsw i64 %60, 1
  store i64 %62, ptr %14, align 8, !tbaa !13
  br label %71

63:                                               ; preds = %48, %45, %42
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %11, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %12, align 4
  br label %227

67:                                               ; preds = %208, %82, %79, %74, %72, %58, %56, %49
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %11, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %12, align 4
  br label %226

71:                                               ; preds = %61, %51
  br label %72

72:                                               ; preds = %210, %71
  %73 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %74 unwind label %67

74:                                               ; preds = %72
  %75 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %73, i32 0, i32 1
  %76 = load i64, ptr %75, align 8, !tbaa !15
  %77 = add nsw i64 %76, 1
  %78 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %79 unwind label %67

79:                                               ; preds = %74
  %80 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %78, i32 0, i32 0
  %81 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %80)
          to label %82 unwind label %67

82:                                               ; preds = %79
  %83 = srem i64 %77, %81
  %84 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %85 unwind label %67

85:                                               ; preds = %82
  %86 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %84, i32 0, i32 1
  store i64 %83, ptr %86, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %87 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %88 unwind label %109

88:                                               ; preds = %85
  %89 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %87, i32 0, i32 0
  %90 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %91 unwind label %109

91:                                               ; preds = %88
  %92 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %90, i32 0, i32 1
  %93 = load i64, ptr %92, align 8, !tbaa !15
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %93)
          to label %95 unwind label %109

95:                                               ; preds = %91
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %94, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %96 = getelementptr inbounds %"class.vl::database::LockManager", ptr %20, i32 0, i32 4
  %97 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK2vl11collections10DictionaryINS_8database8IdObjectImLl3EEENS_3PtrINS2_11LockManager9TransInfoEEES4_PS7_EixERKS4_(ptr noundef nonnull align 8 dereferenceable(104) %96, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %98 unwind label %113

98:                                               ; preds = %95
  invoke void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %97)
          to label %99 unwind label %113

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  %101 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %102 unwind label %117

102:                                              ; preds = %100
  %103 = getelementptr inbounds %"struct.vl::database::LockManager::TransInfo", ptr %101, i32 0, i32 3
  %104 = invoke noundef zeroext i1 @_ZN2vl8database10LockTarget7IsValidEv(ptr noundef nonnull align 8 dereferenceable(24) %103)
          to label %105 unwind label %117

105:                                              ; preds = %102
  br i1 %104, label %125, label %106

106:                                              ; preds = %105
  %107 = call ptr @__cxa_allocate_exception(i64 8) #6
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @.str)
          to label %108 unwind label %121

108:                                              ; preds = %106
  invoke void @__cxa_throw(ptr %107, ptr @_ZTIN2vl5ErrorE, ptr null) #7
          to label %250 unwind label %117

109:                                              ; preds = %91, %88, %85
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  br label %225

113:                                              ; preds = %98, %95
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  br label %224

117:                                              ; preds = %108, %102, %100
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  br label %223

121:                                              ; preds = %106
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %11, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %12, align 4
  call void @__cxa_free_exception(ptr %107) #6
  br label %223

125:                                              ; preds = %105
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  %128 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %129 unwind label %146

129:                                              ; preds = %127
  %130 = getelementptr inbounds %"struct.vl::database::LockManager::TransInfo", ptr %128, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %130, i64 8, i1 false), !tbaa.struct !22
  %131 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %132 unwind label %146

132:                                              ; preds = %129
  %133 = getelementptr inbounds %"struct.vl::database::LockManager::TransInfo", ptr %131, i32 0, i32 3
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.vl::database::IdObject", ptr %18, i32 0, i32 0
  %136 = load i64, ptr %135, align 8
  %137 = invoke noundef zeroext i1 @_ZN2vl8database11LockManager17AcquireLockUnsafeENS0_8IdObjectImLl3EEERKNS0_10LockTargetERNS0_10LockResultEb(ptr noundef nonnull align 8 dereferenceable(400) %20, i64 %136, ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(16) %134, i1 noundef zeroext false)
          to label %138 unwind label %146

138:                                              ; preds = %132
  %139 = zext i1 %137 to i8
  store i8 %139, ptr %17, align 1, !tbaa !9
  br label %140

140:                                              ; preds = %138
  %141 = load i8, ptr %17, align 1, !tbaa !9, !range !11, !noundef !12
  %142 = trunc i8 %141 to i1
  br i1 %142, label %154, label %143

143:                                              ; preds = %140
  %144 = call ptr @__cxa_allocate_exception(i64 8) #6
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef @.str.1)
          to label %145 unwind label %150

145:                                              ; preds = %143
  invoke void @__cxa_throw(ptr %144, ptr @_ZTIN2vl5ErrorE, ptr null) #7
          to label %250 unwind label %146

146:                                              ; preds = %200, %193, %190, %186, %181, %176, %174, %170, %167, %164, %145, %132, %129, %127
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %11, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %12, align 4
  br label %222

150:                                              ; preds = %143
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %11, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %12, align 4
  call void @__cxa_free_exception(ptr %144) #6
  br label %222

154:                                              ; preds = %140
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.vl::database::LockResult", ptr %157, i32 0, i32 0
  %159 = load i8, ptr %158, align 8, !tbaa !23, !range !11, !noundef !12
  %160 = trunc i8 %159 to i1
  br i1 %160, label %204, label %161

161:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  invoke void @_ZN2vl8database10LockTargetC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %162 unwind label %196

162:                                              ; preds = %161
  %163 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %164 unwind label %196

164:                                              ; preds = %162
  %165 = getelementptr inbounds %"struct.vl::database::LockManager::TransInfo", ptr %163, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 8 %19, i64 24, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  %166 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %167 unwind label %146

167:                                              ; preds = %164
  %168 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %166, i32 0, i32 0
  %169 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %170 unwind label %146

170:                                              ; preds = %167
  %171 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %169, i32 0, i32 1
  %172 = load i64, ptr %171, align 8, !tbaa !15
  %173 = invoke noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_E8RemoveAtEl(ptr noundef nonnull align 8 dereferenceable(33) %168, i64 noundef %172)
          to label %174 unwind label %146

174:                                              ; preds = %170
  %175 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %176 unwind label %146

176:                                              ; preds = %174
  %177 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %175, i32 0, i32 1
  %178 = load i64, ptr %177, align 8, !tbaa !15
  %179 = add nsw i64 %178, -1
  store i64 %179, ptr %177, align 8, !tbaa !15
  %180 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %181 unwind label %146

181:                                              ; preds = %176
  %182 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %180, i32 0, i32 0
  %183 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %182)
          to label %184 unwind label %146

184:                                              ; preds = %181
  %185 = icmp eq i64 %183, 0
  br i1 %185, label %186, label %200

186:                                              ; preds = %184
  %187 = getelementptr inbounds %"class.vl::database::LockManager", ptr %20, i32 0, i32 6
  %188 = getelementptr inbounds %"class.vl::database::LockManager", ptr %20, i32 0, i32 6
  %189 = invoke noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E4KeysEv(ptr noundef nonnull align 8 dereferenceable(104) %188)
          to label %190 unwind label %146

190:                                              ; preds = %186
  %191 = load i64, ptr %10, align 8, !tbaa !13
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseImEixEl(ptr noundef nonnull align 8 dereferenceable(24) %189, i64 noundef %191)
          to label %193 unwind label %146

193:                                              ; preds = %190
  %194 = invoke noundef zeroext i1 @_ZN2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E6RemoveERKm(ptr noundef nonnull align 8 dereferenceable(104) %187, ptr noundef nonnull align 8 dereferenceable(8) %192)
          to label %195 unwind label %146

195:                                              ; preds = %193
  br label %200

196:                                              ; preds = %162, %161
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %11, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %222

200:                                              ; preds = %195, %184
  %201 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %202 unwind label %146

202:                                              ; preds = %200
  %203 = getelementptr inbounds %"struct.vl::database::LockManager::TransInfo", ptr %201, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %203, i64 8, i1 false), !tbaa.struct !22
  store i32 1, ptr %9, align 4
  br label %205

204:                                              ; preds = %156
  store i32 0, ptr %9, align 4
  br label %205

205:                                              ; preds = %204, %202
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %206 = load i32, ptr %9, align 4
  switch i32 %206, label %216 [
    i32 0, label %207
  ]

207:                                              ; preds = %205
  br label %208

208:                                              ; preds = %207
  %209 = invoke noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %210 unwind label %67

210:                                              ; preds = %208
  %211 = getelementptr inbounds %"struct.vl::database::LockManager::PendingInfo", ptr %209, i32 0, i32 1
  %212 = load i64, ptr %211, align 8, !tbaa !15
  %213 = load i64, ptr %14, align 8, !tbaa !13
  %214 = icmp ne i64 %212, %213
  br i1 %214, label %72, label %215, !llvm.loop !33

215:                                              ; preds = %210
  store i32 0, ptr %9, align 4
  br label %216

216:                                              ; preds = %215, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  %217 = load i32, ptr %9, align 4
  switch i32 %217, label %228 [
    i32 0, label %218
  ]

218:                                              ; preds = %216
  br label %219

219:                                              ; preds = %218
  %220 = load i64, ptr %10, align 8, !tbaa !13
  %221 = add nsw i64 %220, -1
  store i64 %221, ptr %10, align 8, !tbaa !13
  br label %34, !llvm.loop !35

222:                                              ; preds = %196, %150, %146
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %223

223:                                              ; preds = %222, %121, %117
  call void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %224

224:                                              ; preds = %223, %113
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %225

225:                                              ; preds = %224, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %226

226:                                              ; preds = %225, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %227

227:                                              ; preds = %226, %63
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %230

228:                                              ; preds = %216, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %229 = load i32, ptr %9, align 4
  switch i32 %229, label %233 [
    i32 5, label %231
  ]

230:                                              ; preds = %227, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %245

231:                                              ; preds = %228
  br label %232

232:                                              ; preds = %231
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %25, !llvm.loop !36

233:                                              ; preds = %228, %28
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %234 = load i32, ptr %9, align 4
  switch i32 %234, label %237 [
    i32 2, label %235
  ]

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235, %2
  store i32 0, ptr %9, align 4
  br label %237

237:                                              ; preds = %236, %233
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  %238 = load i32, ptr %9, align 4
  switch i32 %238, label %250 [
    i32 0, label %239
    i32 1, label %242
  ]

239:                                              ; preds = %237
  %240 = call i64 @_ZN2vl8database8IdObjectImLl3EE7InvalidEv()
  %241 = getelementptr inbounds %"struct.vl::database::IdObject", ptr %3, i32 0, i32 0
  store i64 %240, ptr %241, align 8
  br label %242

242:                                              ; preds = %239, %237
  %243 = getelementptr inbounds %"struct.vl::database::IdObject", ptr %3, i32 0, i32 0
  %244 = load i64, ptr %243, align 8
  ret i64 %244

245:                                              ; preds = %230
  %246 = load ptr, ptr %11, align 8
  %247 = load i32, ptr %12, align 4
  %248 = insertvalue { ptr, i32 } poison, ptr %246, 0
  %249 = insertvalue { ptr, i32 } %248, i32 %247, 1
  resume { ptr, i32 } %249

250:                                              ; preds = %237, %145, %108
  unreachable
}

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E6RemoveERKm(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN2vl8database8IdObjectImLl3EE7InvalidEv() #2 align 2

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

!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 = !{!"long", !7, i64 0}
!15 = !{!16, !14, i64 48}
!16 = !{!"_ZTSN2vl8database11LockManager11PendingInfoE", !17, i64 0, !14, i64 48}
!17 = !{!"_ZTSN2vl11collections10SortedListINS_8database8IdObjectImLl3EEES4_EE", !18, i64 0}
!18 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_EE", !19, i64 0, !14, i64 24, !10, i64 32}
!19 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEEE", !20, i64 0, !6, i64 8, !14, i64 16}
!20 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectImLl3EEELb1EEE", !21, i64 0}
!21 = !{!"_ZTSN2vl6ObjectE"}
!22 = !{i64 0, i64 8, !13}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSN2vl8database10LockResultE", !10, i64 0, !6, i64 8}
!25 = !{i64 0, i64 4, !26, i64 4, i64 4, !28, i64 8, i64 4, !30, i64 16, i64 8, !32}
!26 = !{!27, !27, i64 0}
!27 = !{!"_ZTSN2vl8database14LockTargetTypeE", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"_ZTSN2vl8database16LockTargetAccessE", !7, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"int", !7, i64 0}
!32 = !{!7, !7, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}


; 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::SpinLock::Scope" = type { %"class.vl::Object", ptr }
%"class.vl::Object" = type { ptr }
%"class.vl::Ptr.60" = type { ptr, ptr, ptr, ptr }
%"struct.vl::database::IdObject" = type { i64 }
%"class.vl::Ptr" = type { ptr, ptr, ptr, ptr }
%"struct.vl::database::LockTarget" = type { i32, i32, %"struct.vl::database::IdObject.0", %union.anon }
%"struct.vl::database::IdObject.0" = type { i32 }
%union.anon = type { %"struct.vl::database::IdObject.1" }
%"struct.vl::database::IdObject.1" = type { i64 }

@.str = external hidden unnamed_addr constant [101 x i32], align 4
@_ZTIN2vl5ErrorE = external dso_local constant { ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [114 x i32], align 4

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_E8RemoveAtEl(ptr noundef nonnull align 8 dereferenceable(33), i64 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl8database11LockManager17AcquireLockUnsafeENS0_8IdObjectImLl3EEERKNS0_10LockTargetERNS0_10LockResultEb(ptr noundef nonnull align 8 dereferenceable(400), i64, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZN2vl8database11LockManager15PickTransactionERNS0_10LockResultE(ptr noundef nonnull align 8 dereferenceable(400) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.vl::SpinLock::Scope", align 8
  %4 = alloca %"class.vl::Ptr.60", align 8
  %5 = alloca %"struct.vl::database::IdObject", align 8
  %6 = alloca %"class.vl::Ptr", align 8
  %7 = alloca %"struct.vl::database::LockTarget", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  call void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 288
  %10 = getelementptr inbounds i8, ptr %0, i64 144
  %11 = call noundef i64 @_ZNK2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E5CountEv(ptr noundef nonnull align 8 dereferenceable(104) %9)
  %12 = icmp slt i64 %11, 1
  br i1 %12, label %.loopexit116, label %.lr.ph

.lr.ph:                                           ; preds = %2, %96
  %.02974.in = phi i64 [ %.02974, %96 ], [ %11, %2 ]
  %.02974 = add nsw i64 %.02974.in, -1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  %13 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104) %9)
  %14 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK2vl11collections9ArrayBaseINS_3PtrINS_8database11LockManager11PendingInfoEEEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %.02974)
          to label %15 unwind label %24

15:                                               ; preds = %.lr.ph
  call void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %14)
  %16 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %17 = getelementptr inbounds i8, ptr %16, i64 48
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %19 = icmp eq i64 %18, -1
  br i1 %19, label %20, label %25

20:                                               ; preds = %15
  %21 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %22 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %23 = add nsw i64 %22, -1
  br label %25

24:                                               ; preds = %.lr.ph
  %lpad.loopexit110 = landingpad { ptr, i32 }
          cleanup
  br label %100

25:                                               ; preds = %20, %15
  %.022 = phi i64 [ %23, %20 ], [ %18, %15 ]
  br label %26

26:                                               ; preds = %92, %25
  %27 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %28 = getelementptr inbounds i8, ptr %27, i64 48
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = add nsw i64 %29, 1
  %31 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %32 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
  %33 = srem i64 %30, %32
  %34 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %35 = getelementptr inbounds i8, ptr %34, i64 48
  store i64 %33, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %36 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %37 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %38 = getelementptr inbounds i8, ptr %37, i64 48
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %39)
          to label %41 unwind label %51

41:                                               ; preds = %26
  %42 = load i64, ptr %40, align 8, !tbaa !17
  store i64 %42, ptr %5, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK2vl11collections10DictionaryINS_8database8IdObjectImLl3EEENS_3PtrINS2_11LockManager9TransInfoEEES4_PS7_EixERKS4_(ptr noundef nonnull align 8 dereferenceable(104) %10, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %44 unwind label %52

44:                                               ; preds = %41
  call void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %43)
  %45 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %46 = getelementptr inbounds i8, ptr %45, i64 64
  %47 = invoke noundef zeroext i1 @_ZN2vl8database10LockTarget7IsValidEv(ptr noundef nonnull align 8 dereferenceable(24) %46)
          to label %48 unwind label %.loopexit

48:                                               ; preds = %44
  br i1 %47, label %55, label %.loopexit104

.loopexit104:                                     ; preds = %48
  %49 = call ptr @__cxa_allocate_exception(i64 8) #6
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @.str)
          to label %50 unwind label %53

50:                                               ; preds = %.loopexit104
  invoke void @__cxa_throw(ptr nonnull %49, ptr nonnull @_ZTIN2vl5ErrorE, ptr null) #7
          to label %105 unwind label %.loopexit.split-lp

51:                                               ; preds = %26
  %lpad.loopexit94 = landingpad { ptr, i32 }
          cleanup
  br label %99

52:                                               ; preds = %41
  %lpad.loopexit98 = landingpad { ptr, i32 }
          cleanup
  br label %98

.loopexit:                                        ; preds = %44
  %lpad.loopexit101 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp49

.loopexit.split-lp:                               ; preds = %50
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp49

53:                                               ; preds = %.loopexit104
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %49) #6
  br label %.loopexit.split-lp49

55:                                               ; preds = %48
  %56 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %.sroa.0.0.copyload = load i64, ptr %56, align 8, !tbaa !17
  %57 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %58 = getelementptr inbounds i8, ptr %57, i64 64
  %59 = invoke noundef zeroext i1 @_ZN2vl8database11LockManager17AcquireLockUnsafeENS0_8IdObjectImLl3EEERKNS0_10LockTargetERNS0_10LockResultEb(ptr noundef nonnull align 8 dereferenceable(400) %0, i64 %.sroa.0.0.copyload, ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(16) %1, i1 noundef zeroext false)
          to label %60 unwind label %.loopexit48

60:                                               ; preds = %55
  br i1 %59, label %65, label %.loopexit107

.loopexit107:                                     ; preds = %60
  %61 = call ptr @__cxa_allocate_exception(i64 8) #6
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.1)
          to label %62 unwind label %63

62:                                               ; preds = %.loopexit107
  invoke void @__cxa_throw(ptr nonnull %61, ptr nonnull @_ZTIN2vl5ErrorE, ptr null) #7
          to label %105 unwind label %.loopexit.split-lp49.loopexit.split-lp

.loopexit48:                                      ; preds = %55
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp49

.loopexit.split-lp49.loopexit:                    ; preds = %88, %85, %69
  %lpad.loopexit54 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp49

.loopexit.split-lp49.loopexit.split-lp:           ; preds = %62
  %lpad.loopexit.split-lp55 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp49

63:                                               ; preds = %.loopexit107
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %61) #6
  br label %.loopexit.split-lp49

65:                                               ; preds = %60
  %66 = load i8, ptr %1, align 8, !tbaa !18, !range !20, !noundef !21
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %92, label %68

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZN2vl8database10LockTargetC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %69 unwind label %90

69:                                               ; preds = %68
  %70 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %71 = getelementptr inbounds i8, ptr %70, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(24) %7, i64 24, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %72 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %73 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %74 = getelementptr inbounds i8, ptr %73, i64 48
  %75 = load i64, ptr %74, align 8, !tbaa !5
  %76 = invoke noundef zeroext i1 @_ZN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_E8RemoveAtEl(ptr noundef nonnull align 8 dereferenceable(33) %72, i64 noundef %75)
          to label %77 unwind label %.loopexit.split-lp49.loopexit

77:                                               ; preds = %69
  %78 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %79 = getelementptr inbounds i8, ptr %78, i64 48
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = add nsw i64 %80, -1
  store i64 %81, ptr %79, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %83 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %82)
  %84 = icmp eq i64 %83, 0
  br i1 %84, label %85, label %101

85:                                               ; preds = %77
  %86 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E4KeysEv(ptr noundef nonnull align 8 dereferenceable(104) %9)
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK2vl11collections9ArrayBaseImEixEl(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %.02974)
          to label %88 unwind label %.loopexit.split-lp49.loopexit

88:                                               ; preds = %85
  %89 = invoke noundef zeroext i1 @_ZN2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E6RemoveERKm(ptr noundef nonnull align 8 dereferenceable(104) %9, ptr noundef nonnull align 8 dereferenceable(8) %87)
          to label %101 unwind label %.loopexit.split-lp49.loopexit

90:                                               ; preds = %68
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %.loopexit.split-lp49

92:                                               ; preds = %65
  call void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %93 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager11PendingInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %4)
  %94 = getelementptr inbounds i8, ptr %93, i64 48
  %95 = load i64, ptr %94, align 8, !tbaa !5
  %.not = icmp eq i64 %95, %.022
  br i1 %.not, label %96, label %26, !llvm.loop !30

96:                                               ; preds = %92
  call void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %97 = icmp slt i64 %.02974.in, 2
  br i1 %97, label %.loopexit116, label %.lr.ph, !llvm.loop !32

.loopexit.split-lp49:                             ; preds = %.loopexit48, %.loopexit.split-lp49.loopexit.split-lp, %.loopexit.split-lp49.loopexit, %.loopexit, %.loopexit.split-lp, %63, %90, %53
  %.pn.pn = phi { ptr, i32 } [ %54, %53 ], [ %91, %90 ], [ %64, %63 ], [ %lpad.loopexit101, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit, %.loopexit48 ], [ %lpad.loopexit54, %.loopexit.split-lp49.loopexit ], [ %lpad.loopexit.split-lp55, %.loopexit.split-lp49.loopexit.split-lp ]
  call void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %98

98:                                               ; preds = %.loopexit.split-lp49, %52
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.loopexit.split-lp49 ], [ %lpad.loopexit98, %52 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %99

99:                                               ; preds = %98, %51
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %98 ], [ %lpad.loopexit94, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %100

100:                                              ; preds = %99, %24
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %99 ], [ %lpad.loopexit110, %24 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn

101:                                              ; preds = %88, %77
  %102 = call noundef ptr @_ZNK2vl3PtrINS_8database11LockManager9TransInfoEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %.sroa.021.0.copyload = load i64, ptr %102, align 8, !tbaa !17
  call void @_ZN2vl3PtrINS_8database11LockManager9TransInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN2vl3PtrINS_8database11LockManager11PendingInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  br label %104

.loopexit116:                                     ; preds = %96, %2
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %103 = call i64 @_ZN2vl8database8IdObjectImLl3EE7InvalidEv()
  br label %104

104:                                              ; preds = %101, %.loopexit116
  %.sroa.021.8 = phi i64 [ %.sroa.021.0.copyload, %101 ], [ %103, %.loopexit116 ]
  ret i64 %.sroa.021.8

105:                                              ; preds = %62, %50
  unreachable
}

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN2vl11collections10DictionaryImNS_3PtrINS_8database11LockManager11PendingInfoEEEmPS5_E6RemoveERKm(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZN2vl8database8IdObjectImLl3EE7InvalidEv() local_unnamed_addr #2 align 2

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

!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, !15, i64 48}
!6 = !{!"_ZTSN2vl8database11LockManager11PendingInfoE", !7, i64 0, !15, i64 48}
!7 = !{!"_ZTSN2vl11collections10SortedListINS_8database8IdObjectImLl3EEES4_EE", !8, i64 0}
!8 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectImLl3EEES4_EE", !9, i64 0, !15, i64 24, !16, i64 32}
!9 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectImLl3EEEEE", !10, i64 0, !12, i64 8, !15, i64 16}
!10 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectImLl3EEELb1EEE", !11, i64 0}
!11 = !{!"_ZTSN2vl6ObjectE"}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"long", !13, i64 0}
!16 = !{!"bool", !13, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!19, !16, i64 0}
!19 = !{!"_ZTSN2vl8database10LockResultE", !16, i64 0, !12, i64 8}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !25, i64 8, i64 4, !27, i64 16, i64 8, !29}
!23 = !{!24, !24, i64 0}
!24 = !{!"_ZTSN2vl8database14LockTargetTypeE", !13, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"_ZTSN2vl8database16LockTargetAccessE", !13, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !13, i64 0}
!29 = !{!13, !13, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass