; LLVM IR from vczh/herodb :: Kernel/Source/Utility/Buffer.ll (ZN2vl8database13BufferManager20SwapCacheIfNecessaryEv)

; 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::SpinLock::Scope" = type { %"class.vl::Object", ptr }
%"class.vl::Object" = type { ptr }
%"class.vl::collections::List.7" = type { %"class.vl::collections::ListBase.base.13", %"class.vl::collections::IEnumerable.11" }
%"class.vl::collections::ListBase.base.13" = type <{ %"class.vl::collections::ArrayBase.base.12", i64, i8 }>
%"class.vl::collections::ArrayBase.base.12" = type { %"class.vl::collections::ListStore.10", ptr, i64 }
%"class.vl::collections::ListStore.10" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.11" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }
%"class.vl::collections::EnumerableForEachIterator" = type { %"class.vl::collections::ForEachIterator", %"class.vl::Ptr" }
%"class.vl::collections::ForEachIterator" = type { %"class.vl::Object" }
%"class.vl::Ptr" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.15" = type { ptr, ptr, ptr, ptr }
%class.anon = type { i8 }
%"class.vl::Tuple" = type { %"class.vl::Object", %"struct.vl::database::IdObject", %"struct.vl::database::IdObject.16", i64 }
%"struct.vl::database::IdObject" = type { i32 }
%"struct.vl::database::IdObject.16" = type { i64 }
%"class.vl::database::BufferManager" = type { i64, i64, i64, i64, %"class.vl::SpinLock", i64, %"class.vl::collections::Dictionary" }
%"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.6" }
%"class.vl::collections::SortedList" = type { %"class.vl::collections::ListBase.base", %"class.vl::collections::IEnumerable" }
%"class.vl::collections::ListBase.base" = type <{ %"class.vl::collections::ArrayBase.base", i64, i8 }>
%"class.vl::collections::ArrayBase.base" = type { %"class.vl::collections::ListStore", ptr, i64 }
%"class.vl::collections::ListStore" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable" = type { %"class.vl::Interface" }
%"class.vl::collections::List" = type { %"class.vl::collections::ListBase.base.5", %"class.vl::collections::IEnumerable.3" }
%"class.vl::collections::ListBase.base.5" = type <{ %"class.vl::collections::ArrayBase.base.4", i64, i8 }>
%"class.vl::collections::ArrayBase.base.4" = type { %"class.vl::collections::ListStore.2", ptr, i64 }
%"class.vl::collections::ListStore.2" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.3" = type { %"class.vl::Interface" }
%"class.vl::collections::IEnumerable.6" = type { %"class.vl::Interface" }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl8database13BufferManager20SwapCacheIfNecessaryEv(ptr noundef nonnull align 8 dereferenceable(168) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca %"class.vl::SpinLock::Scope", align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.vl::collections::List.7", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.vl::collections::EnumerableForEachIterator", align 8
  %15 = alloca %"class.vl::Ptr.15", align 8
  %16 = alloca %class.anon, align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.vl::Tuple", align 8
  %20 = alloca %"class.vl::Ptr.15", align 8
  %21 = alloca i8, align 1
  %22 = alloca ptr, align 8
  %23 = alloca %"class.vl::SpinLock::Scope", align 8
  %24 = alloca %"struct.vl::database::IdObject.16", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %25 = load ptr, ptr %2, align 8
  %26 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 3
  %27 = load volatile i64, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !24
  %30 = icmp ugt i64 %27, %29
  br i1 %30, label %31, label %234

31:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  store i8 1, ptr %3, align 1, !tbaa !25
  %32 = load i8, ptr %3, align 1, !tbaa !25, !range !26, !noundef !27
  %33 = trunc i8 %32 to i1
  br i1 %33, label %34, label %233

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %35 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 4
  call void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %35)
  store ptr %5, ptr %4, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %229, %34
  %37 = load i8, ptr %3, align 1, !tbaa !25, !range !26, !noundef !27
  %38 = trunc i8 %37 to i1
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 2, ptr %6, align 4
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %232

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %41 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 1
  %42 = load i64, ptr %41, align 8, !tbaa !24
  %43 = udiv i64 %42, 4
  %44 = mul i64 %43, 3
  store i64 %44, ptr %7, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %45 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 3
  %46 = load volatile i64, ptr %45, align 8, !tbaa !9
  %47 = load i64, ptr %7, align 8, !tbaa !28
  %48 = sub i64 %46, %47
  store i64 %48, ptr %8, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #7
  invoke void @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_EC1Ev(ptr noundef nonnull align 8 dereferenceable(33) %9)
          to label %49 unwind label %65

49:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  store i8 1, ptr %12, align 1, !tbaa !25
  %50 = load i8, ptr %12, align 1, !tbaa !25, !range !26, !noundef !27
  %51 = trunc i8 %50 to i1
  br i1 %51, label %52, label %104

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #7
  %53 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 6
  %54 = invoke noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryINS_8database8IdObjectIiLl0EEENS_3PtrINS2_13IBufferSourceEEES4_PS6_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104) %53)
          to label %55 unwind label %69

55:                                               ; preds = %52
  %56 = load ptr, ptr %54, align 8, !tbaa !29
  %57 = getelementptr i8, ptr %56, i64 -24
  %58 = load i64, ptr %57, align 8
  %59 = getelementptr inbounds i8, ptr %54, i64 %58
  invoke void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_8database13IBufferSourceEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind writable sret(%"class.vl::collections::EnumerableForEachIterator") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %59)
          to label %60 unwind label %69

60:                                               ; preds = %55
  store ptr %14, ptr %13, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %101, %60
  %62 = load i8, ptr %12, align 1, !tbaa !25, !range !26, !noundef !27
  %63 = trunc i8 %62 to i1
  br i1 %63, label %73, label %64

64:                                               ; preds = %61
  store i32 5, ptr %6, align 4
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database13IBufferSourceEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %103

65:                                               ; preds = %40
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %10, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %11, align 4
  br label %231

69:                                               ; preds = %55, %52
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %10, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %11, align 4
  br label %102

73:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  invoke void @_ZN2vl3PtrINS_8database13IBufferSourceEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %74 unwind label %83

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %98, %74
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load ptr, ptr %76, align 8, !tbaa !29
  %78 = getelementptr inbounds ptr, ptr %77, i64 2
  %79 = load ptr, ptr %78, align 8
  %80 = invoke noundef zeroext i1 %79(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %81 unwind label %87

81:                                               ; preds = %75
  br i1 %80, label %91, label %82

82:                                               ; preds = %81
  store i32 8, ptr %6, align 4
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %100

83:                                               ; preds = %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  br label %99

87:                                               ; preds = %93, %91, %75
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %10, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %11, align 4
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %99

91:                                               ; preds = %81
  %92 = invoke noundef ptr @_ZNK2vl3PtrINS_8database13IBufferSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %93 unwind label %87

93:                                               ; preds = %91
  %94 = load i64, ptr %8, align 8, !tbaa !28
  %95 = load ptr, ptr %92, align 8, !tbaa !29
  %96 = getelementptr inbounds ptr, ptr %95, i64 12
  %97 = load ptr, ptr %96, align 8
  invoke void %97(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull align 8 dereferenceable(33) %9, i64 noundef %94)
          to label %98 unwind label %87

98:                                               ; preds = %93
  br label %75, !llvm.loop !31

99:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database13IBufferSourceEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #7
  br label %102

100:                                              ; preds = %82
  br label %101

101:                                              ; preds = %100
  store i8 0, ptr %12, align 1, !tbaa !25
  br label %61, !llvm.loop !33

102:                                              ; preds = %99, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %230

103:                                              ; preds = %64
  br label %104

104:                                              ; preds = %103, %49
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  %105 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %106 unwind label %130

106:                                              ; preds = %104
  %107 = icmp sgt i64 %105, 0
  br i1 %107, label %108, label %228

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %9, i64 noundef 0)
          to label %110 unwind label %130

110:                                              ; preds = %108
  %111 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %112 unwind label %130

112:                                              ; preds = %110
  invoke void @"_ZN2vl11collections10SortLambdaINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEZNS3_13BufferManager20SwapCacheIfNecessaryEvE3$_0EEvPT_lT0_"(ptr noundef %109, i64 noundef %111)
          to label %113 unwind label %130

113:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %114 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %115 unwind label %134

115:                                              ; preds = %113
  %116 = load i64, ptr %8, align 8, !tbaa !28
  %117 = icmp ult i64 %114, %116
  br i1 %117, label %118, label %121

118:                                              ; preds = %115
  %119 = invoke noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %120 unwind label %134

120:                                              ; preds = %118
  br label %123

121:                                              ; preds = %115
  %122 = load i64, ptr %8, align 8, !tbaa !28
  br label %123

123:                                              ; preds = %121, %120
  %124 = phi i64 [ %119, %120 ], [ %122, %121 ]
  store i64 %124, ptr %17, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !28
  br label %125

125:                                              ; preds = %205, %123
  %126 = load i64, ptr %18, align 8, !tbaa !28
  %127 = load i64, ptr %17, align 8, !tbaa !28
  %128 = icmp slt i64 %126, %127
  br i1 %128, label %138, label %129

129:                                              ; preds = %125
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %210

130:                                              ; preds = %112, %110, %108, %104
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %10, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %11, align 4
  br label %230

134:                                              ; preds = %219, %118, %113
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %10, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %11, align 4
  br label %227

138:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  %139 = load i64, ptr %18, align 8, !tbaa !28
  %140 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %9, i64 noundef %139)
          to label %141 unwind label %162

141:                                              ; preds = %138
  call void @_ZN2vl5TupleINS_8database8IdObjectIiLl0EEENS2_ImLl1EEEmNS_13TupleNullItemES5_S5_S5_S5_S5_S5_S5_EC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %140) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  %142 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 6
  %143 = getelementptr inbounds %"class.vl::Tuple", ptr %19, i32 0, i32 1
  %144 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK2vl11collections10DictionaryINS_8database8IdObjectIiLl0EEENS_3PtrINS2_13IBufferSourceEEES4_PS6_EixERKS4_(ptr noundef nonnull align 8 dereferenceable(104) %142, ptr noundef nonnull align 4 dereferenceable(4) %143)
          to label %145 unwind label %166

145:                                              ; preds = %141
  invoke void @_ZN2vl3PtrINS_8database13IBufferSourceEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %144)
          to label %146 unwind label %166

146:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  store i8 1, ptr %21, align 1, !tbaa !25
  %147 = load i8, ptr %21, align 1, !tbaa !25, !range !26, !noundef !27
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %204

149:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  %150 = invoke noundef ptr @_ZNK2vl3PtrINS_8database13IBufferSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %151 unwind label %170

151:                                              ; preds = %149
  %152 = load ptr, ptr %150, align 8, !tbaa !29
  %153 = getelementptr inbounds ptr, ptr %152, i64 4
  %154 = load ptr, ptr %153, align 8
  %155 = invoke noundef nonnull align 8 dereferenceable(16) ptr %154(ptr noundef nonnull align 8 dereferenceable(8) %150)
          to label %156 unwind label %170

156:                                              ; preds = %151
  invoke void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %155)
          to label %157 unwind label %170

157:                                              ; preds = %156
  store ptr %23, ptr %22, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %200, %157
  %159 = load i8, ptr %21, align 1, !tbaa !25, !range !26, !noundef !27
  %160 = trunc i8 %159 to i1
  br i1 %160, label %174, label %161

161:                                              ; preds = %158
  store i32 13, ptr %6, align 4
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %203

162:                                              ; preds = %138
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %10, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %11, align 4
  br label %209

166:                                              ; preds = %145, %141
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %10, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %11, align 4
  br label %208

170:                                              ; preds = %156, %151, %149
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %10, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %11, align 4
  br label %202

174:                                              ; preds = %158
  br label %175

175:                                              ; preds = %174
  %176 = invoke noundef ptr @_ZNK2vl3PtrINS_8database13IBufferSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %177 unwind label %189

177:                                              ; preds = %175
  %178 = getelementptr inbounds %"class.vl::Tuple", ptr %19, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %178, i64 8, i1 false), !tbaa.struct !34
  %179 = getelementptr inbounds %"struct.vl::database::IdObject.16", ptr %24, i32 0, i32 0
  %180 = load i64, ptr %179, align 8
  %181 = load ptr, ptr %176, align 8, !tbaa !29
  %182 = getelementptr inbounds ptr, ptr %181, i64 6
  %183 = load ptr, ptr %182, align 8
  %184 = invoke noundef zeroext i1 %183(ptr noundef nonnull align 8 dereferenceable(8) %176, i64 %180)
          to label %185 unwind label %189

185:                                              ; preds = %177
  br i1 %184, label %197, label %186

186:                                              ; preds = %185
  %187 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %187, ptr noundef @.str)
          to label %188 unwind label %193

188:                                              ; preds = %186
  invoke void @__cxa_throw(ptr %187, ptr @_ZTIN2vl5ErrorE, ptr null) #8
          to label %240 unwind label %189

189:                                              ; preds = %188, %177, %175
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %10, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %11, align 4
  br label %201

193:                                              ; preds = %186
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %10, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %11, align 4
  call void @__cxa_free_exception(ptr %187) #7
  br label %201

197:                                              ; preds = %185
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  store i8 0, ptr %21, align 1, !tbaa !25
  br label %158, !llvm.loop !35

201:                                              ; preds = %193, %189
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  br label %202

202:                                              ; preds = %201, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %208

203:                                              ; preds = %161
  br label %204

204:                                              ; preds = %203, %146
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @_ZN2vl6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %205

205:                                              ; preds = %204
  %206 = load i64, ptr %18, align 8, !tbaa !28
  %207 = add nsw i64 %206, 1
  store i64 %207, ptr %18, align 8, !tbaa !28
  br label %125, !llvm.loop !36

208:                                              ; preds = %202, %166
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @_ZN2vl6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %209

209:                                              ; preds = %208, %162
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %227

210:                                              ; preds = %129
  br label %211

211:                                              ; preds = %210
  %212 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 3
  %213 = load volatile i64, ptr %212, align 8, !tbaa !9
  %214 = getelementptr inbounds %"class.vl::database::BufferManager", ptr %25, i32 0, i32 1
  %215 = load i64, ptr %214, align 8, !tbaa !24
  %216 = icmp ule i64 %213, %215
  br i1 %216, label %224, label %217

217:                                              ; preds = %211
  %218 = call ptr @__cxa_allocate_exception(i64 8) #7
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef @.str.1)
          to label %219 unwind label %220

219:                                              ; preds = %217
  invoke void @__cxa_throw(ptr %218, ptr @_ZTIN2vl5ErrorE, ptr null) #8
          to label %240 unwind label %134

220:                                              ; preds = %217
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %10, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %11, align 4
  call void @__cxa_free_exception(ptr %218) #7
  br label %227

224:                                              ; preds = %211
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %228

227:                                              ; preds = %220, %209, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %230

228:                                              ; preds = %226, %106
  call void @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_ED1Ev(ptr noundef nonnull align 8 dereferenceable(33) %9) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %229

229:                                              ; preds = %228
  store i8 0, ptr %3, align 1, !tbaa !25
  br label %36, !llvm.loop !37

230:                                              ; preds = %227, %130, %102
  call void @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_ED1Ev(ptr noundef nonnull align 8 dereferenceable(33) %9) #7
  br label %231

231:                                              ; preds = %230, %65
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  br label %235

232:                                              ; preds = %39
  br label %233

233:                                              ; preds = %232, %31
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  br label %234

234:                                              ; preds = %233, %1
  ret void

235:                                              ; preds = %231
  %236 = load ptr, ptr %10, align 8
  %237 = load i32, ptr %11, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239

240:                                              ; preds = %219, %188
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN2vl11collections10SortLambdaINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEZNS3_13BufferManager20SwapCacheIfNecessaryEvE3$_0EEvPT_lT0_"(ptr noundef, i64 noundef) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl3PtrINS_8database13IBufferSourceEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 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) #5

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind }
attributes #8 = { 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, !11, i64 24}
!10 = !{!"_ZTSN2vl8database13BufferManagerE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !11, i64 48, !14, i64 56}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN2vl8SpinLockE", !13, i64 0, !11, i64 8}
!13 = !{!"_ZTSN2vl6ObjectE"}
!14 = !{!"_ZTSN2vl11collections10DictionaryINS_8database8IdObjectIiLl0EEENS_3PtrINS2_13IBufferSourceEEES4_PS6_EE", !13, i64 0, !15, i64 8, !20, i64 56}
!15 = !{!"_ZTSN2vl11collections10SortedListINS_8database8IdObjectIiLl0EEES4_EE", !16, i64 0}
!16 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectIiLl0EEES4_EE", !17, i64 0, !11, i64 24, !19, i64 32}
!17 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectIiLl0EEEEE", !18, i64 0, !6, i64 8, !11, i64 16}
!18 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectIiLl0EEELb1EEE", !13, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database13IBufferSourceEEEPS4_EE", !21, i64 0}
!21 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database13IBufferSourceEEEPS4_EE", !22, i64 0, !11, i64 24, !19, i64 32}
!22 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database13IBufferSourceEEEEE", !23, i64 0, !6, i64 8, !11, i64 16}
!23 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database13IBufferSourceEEELb0EEE", !13, i64 0}
!24 = !{!10, !11, i64 8}
!25 = !{!19, !19, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!11, !11, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{i64 0, i64 8, !28}
!35 = distinct !{!35, !32}
!36 = distinct !{!36, !32}
!37 = distinct !{!37, !32}


; 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::collections::List.7" = type { %"class.vl::collections::ListBase.base.13", %"class.vl::collections::IEnumerable.11" }
%"class.vl::collections::ListBase.base.13" = type <{ %"class.vl::collections::ArrayBase.base.12", i64, i8 }>
%"class.vl::collections::ArrayBase.base.12" = type { %"class.vl::collections::ListStore.10", ptr, i64 }
%"class.vl::collections::ListStore.10" = type { %"class.vl::Object" }
%"class.vl::collections::IEnumerable.11" = type { %"class.vl::Interface" }
%"class.vl::Interface" = type { ptr }
%"class.vl::collections::EnumerableForEachIterator" = type { %"class.vl::collections::ForEachIterator", %"class.vl::Ptr" }
%"class.vl::collections::ForEachIterator" = type { %"class.vl::Object" }
%"class.vl::Ptr" = type { ptr, ptr, ptr, ptr }
%"class.vl::Ptr.15" = type { ptr, ptr, ptr, ptr }
%"class.vl::Tuple" = type { %"class.vl::Object", %"struct.vl::database::IdObject", %"struct.vl::database::IdObject.16", i64 }
%"struct.vl::database::IdObject" = type { i32 }
%"struct.vl::database::IdObject.16" = type { i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl8database13BufferManager20SwapCacheIfNecessaryEv(ptr noundef nonnull align 8 dereferenceable(168) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.vl::SpinLock::Scope", align 8
  %3 = alloca %"class.vl::collections::List.7", align 8
  %4 = alloca %"class.vl::collections::EnumerableForEachIterator", align 8
  %5 = alloca %"class.vl::Ptr.15", align 8
  %6 = alloca %"class.vl::Tuple", align 8
  %7 = alloca %"class.vl::Ptr.15", align 8
  %8 = alloca %"class.vl::SpinLock::Scope", align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load volatile i64, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !23
  %13 = icmp ugt i64 %10, %12
  br i1 %13, label %.critedge, label %109

.critedge:                                        ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %15 = load i64, ptr %11, align 8, !tbaa !23
  %16 = lshr i64 %15, 2
  %.neg = mul i64 %16, -3
  %17 = load volatile i64, ptr %9, align 8, !tbaa !5
  %18 = add i64 %.neg, %17
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  invoke void @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_EC1Ev(ptr noundef nonnull align 8 dereferenceable(33) %3)
          to label %19 unwind label %26

19:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNK2vl11collections10DictionaryINS_8database8IdObjectIiLl0EEENS_3PtrINS2_13IBufferSourceEEES4_PS6_E6ValuesEv(ptr noundef nonnull align 8 dereferenceable(104) %20)
  %22 = load ptr, ptr %21, align 8, !tbaa !24
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  invoke void @_ZN2vl11collections21CreateForEachIteratorINS_3PtrINS_8database13IBufferSourceEEEEENS0_25EnumerableForEachIteratorIT_EERKNS0_11IEnumerableIS7_EE(ptr dead_on_unwind nonnull writable sret(%"class.vl::collections::EnumerableForEachIterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %30 unwind label %28

26:                                               ; preds = %.critedge
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %108

28:                                               ; preds = %19
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %107

30:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
  br label %31

31:                                               ; preds = %41, %30
  %32 = load ptr, ptr %4, align 8, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8
  %35 = invoke noundef zeroext i1 %34(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %36 unwind label %39

36:                                               ; preds = %31
  br i1 %35, label %41, label %.critedge40

.critedge40:                                      ; preds = %36
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database13IBufferSourceEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  %37 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %38 = icmp sgt i64 %37, 0
  br i1 %38, label %46, label %106

39:                                               ; preds = %41, %31
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN2vl11collections25EnumerableForEachIteratorINS_3PtrINS_8database13IBufferSourceEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  br label %107

41:                                               ; preds = %36
  %42 = call noundef ptr @_ZNK2vl3PtrINS_8database13IBufferSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %43 = load ptr, ptr %42, align 8, !tbaa !24
  %44 = getelementptr inbounds i8, ptr %43, i64 96
  %45 = load ptr, ptr %44, align 8
  invoke void %45(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(33) %3, i64 noundef %18)
          to label %31 unwind label %39, !llvm.loop !26

46:                                               ; preds = %.critedge40
  %47 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %3, i64 noundef 0)
          to label %48 unwind label %62

48:                                               ; preds = %46
  %49 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  invoke void @"_ZN2vl11collections10SortLambdaINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEZNS3_13BufferManager20SwapCacheIfNecessaryEvE3$_0EEvPT_lT0_"(ptr noundef nonnull %47, i64 noundef %49)
          to label %50 unwind label %62

50:                                               ; preds = %48
  %51 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %52 = icmp ult i64 %51, %18
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = call noundef i64 @_ZNK2vl11collections9ArrayBaseINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEE5CountEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  br label %55

55:                                               ; preds = %50, %53
  %56 = phi i64 [ %54, %53 ], [ %18, %50 ]
  %57 = icmp sgt i64 %56, 0
  br i1 %57, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %55
  %58 = getelementptr inbounds i8, ptr %6, i64 8
  %59 = getelementptr inbounds i8, ptr %6, i64 16
  br label %66

._crit_edge:                                      ; preds = %.critedge42, %55
  %60 = load volatile i64, ptr %9, align 8, !tbaa !5
  %61 = load i64, ptr %11, align 8, !tbaa !23
  %.not = icmp ugt i64 %60, %61
  br i1 %.not, label %101, label %106

62:                                               ; preds = %48, %46
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %107

64:                                               ; preds = %103
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %107

66:                                               ; preds = %.lr.ph, %.critedge42
  %.01843 = phi i64 [ 0, %.lr.ph ], [ %96, %.critedge42 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %67 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_EixEl(ptr noundef nonnull align 8 dereferenceable(33) %3, i64 noundef %.01843)
          to label %68 unwind label %78

68:                                               ; preds = %66
  call void @_ZN2vl5TupleINS_8database8IdObjectIiLl0EEENS2_ImLl1EEEmNS_13TupleNullItemES5_S5_S5_S5_S5_S5_S5_EC2ERKS6_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %67) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %69 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK2vl11collections10DictionaryINS_8database8IdObjectIiLl0EEENS_3PtrINS2_13IBufferSourceEEES4_PS6_EixERKS4_(ptr noundef nonnull align 8 dereferenceable(104) %20, ptr noundef nonnull align 4 dereferenceable(4) %58)
          to label %70 unwind label %80

70:                                               ; preds = %68
  invoke void @_ZN2vl3PtrINS_8database13IBufferSourceEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %69)
          to label %71 unwind label %80

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %72 = call noundef ptr @_ZNK2vl3PtrINS_8database13IBufferSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %73 = load ptr, ptr %72, align 8, !tbaa !24
  %74 = getelementptr inbounds i8, ptr %73, i64 32
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef nonnull align 8 dereferenceable(16) ptr %75(ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %77 unwind label %82

77:                                               ; preds = %71
  invoke void @_ZN2vl8SpinLock5ScopeC1ERS0_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %76)
          to label %84 unwind label %82

78:                                               ; preds = %66
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %100

80:                                               ; preds = %70, %68
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %99

82:                                               ; preds = %77, %71
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %98

84:                                               ; preds = %77
  %85 = call noundef ptr @_ZNK2vl3PtrINS_8database13IBufferSourceEEptEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %.sroa.0.0.copyload = load i64, ptr %59, align 8, !tbaa !28
  %86 = load ptr, ptr %85, align 8, !tbaa !24
  %87 = getelementptr inbounds i8, ptr %86, i64 48
  %88 = load ptr, ptr %87, align 8
  %89 = invoke noundef zeroext i1 %88(ptr noundef nonnull align 8 dereferenceable(8) %85, i64 %.sroa.0.0.copyload)
          to label %90 unwind label %.loopexit

90:                                               ; preds = %84
  br i1 %89, label %.critedge42, label %91

91:                                               ; preds = %90
  %92 = call ptr @__cxa_allocate_exception(i64 8) #6
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @.str)
          to label %93 unwind label %94

93:                                               ; preds = %91
  invoke void @__cxa_throw(ptr nonnull %92, ptr nonnull @_ZTIN2vl5ErrorE, ptr null) #7
          to label %110 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %84
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %97

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

94:                                               ; preds = %91
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %92) #6
  br label %97

.critedge42:                                      ; preds = %90
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZN2vl6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %96 = add nuw nsw i64 %.01843, 1
  %exitcond.not = icmp eq i64 %96, %56
  br i1 %exitcond.not, label %._crit_edge, label %66, !llvm.loop !29

97:                                               ; preds = %.loopexit, %.loopexit.split-lp, %94
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %98

98:                                               ; preds = %97, %82
  %.pn.pn = phi { ptr, i32 } [ %.pn, %97 ], [ %83, %82 ]
  call void @_ZN2vl3PtrINS_8database13IBufferSourceEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %99

99:                                               ; preds = %98, %80
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %98 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZN2vl6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %100

100:                                              ; preds = %99, %78
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %99 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %107

101:                                              ; preds = %._crit_edge
  %102 = call ptr @__cxa_allocate_exception(i64 8) #6
  invoke void @_ZN2vl5ErrorC1EPKw(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull @.str.1)
          to label %103 unwind label %104

103:                                              ; preds = %101
  invoke void @__cxa_throw(ptr nonnull %102, ptr nonnull @_ZTIN2vl5ErrorE, ptr null) #7
          to label %110 unwind label %64

104:                                              ; preds = %101
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %102) #6
  br label %107

106:                                              ; preds = %._crit_edge, %.critedge40
  call void @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_ED1Ev(ptr noundef nonnull align 8 dereferenceable(33) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br label %109

107:                                              ; preds = %64, %100, %104, %28, %39, %62
  %.pn35.pn = phi { ptr, i32 } [ %63, %62 ], [ %40, %39 ], [ %29, %28 ], [ %.pn.pn.pn.pn, %100 ], [ %65, %64 ], [ %105, %104 ]
  call void @_ZN2vl11collections4ListINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EES8_ED1Ev(ptr noundef nonnull align 8 dereferenceable(33) %3) #6
  br label %108

108:                                              ; preds = %107, %26
  %.pn35.pn.pn = phi { ptr, i32 } [ %.pn35.pn, %107 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @_ZN2vl8SpinLock5ScopeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn35.pn.pn

109:                                              ; preds = %106, %1
  ret void

110:                                              ; preds = %103, %93
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN2vl11collections10SortLambdaINS_5TupleINS_8database8IdObjectIiLl0EEENS4_ImLl1EEEmNS_13TupleNullItemES7_S7_S7_S7_S7_S7_S7_EEZNS3_13BufferManager20SwapCacheIfNecessaryEvE3$_0EEvPT_lT0_"(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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, !7, i64 24}
!6 = !{!"_ZTSN2vl8database13BufferManagerE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 48, !12, i64 56}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN2vl8SpinLockE", !11, i64 0, !7, i64 8}
!11 = !{!"_ZTSN2vl6ObjectE"}
!12 = !{!"_ZTSN2vl11collections10DictionaryINS_8database8IdObjectIiLl0EEENS_3PtrINS2_13IBufferSourceEEES4_PS6_EE", !11, i64 0, !13, i64 8, !19, i64 56}
!13 = !{!"_ZTSN2vl11collections10SortedListINS_8database8IdObjectIiLl0EEES4_EE", !14, i64 0}
!14 = !{!"_ZTSN2vl11collections8ListBaseINS_8database8IdObjectIiLl0EEES4_EE", !15, i64 0, !7, i64 24, !18, i64 32}
!15 = !{!"_ZTSN2vl11collections9ArrayBaseINS_8database8IdObjectIiLl0EEEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSN2vl11collections9ListStoreINS_8database8IdObjectIiLl0EEELb1EEE", !11, i64 0}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"_ZTSN2vl11collections4ListINS_3PtrINS_8database13IBufferSourceEEEPS4_EE", !20, i64 0}
!20 = !{!"_ZTSN2vl11collections8ListBaseINS_3PtrINS_8database13IBufferSourceEEEPS4_EE", !21, i64 0, !7, i64 24, !18, i64 32}
!21 = !{!"_ZTSN2vl11collections9ArrayBaseINS_3PtrINS_8database13IBufferSourceEEEEE", !22, i64 0, !17, i64 8, !7, i64 16}
!22 = !{!"_ZTSN2vl11collections9ListStoreINS_3PtrINS_8database13IBufferSourceEEELb0EEE", !11, i64 0}
!23 = !{!6, !7, i64 8}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !9, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !27}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass