; LLVM IR from KoishiDB/Koishi-DB :: src/db_impl.ll (ZN8koishidb6DBimpl5WriteEPNS_10WriteBatchE)

; 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.koishidb::DBimpl::Writer" = type { ptr, i8, %"class.std::condition_variable" }
%"class.std::condition_variable" = type { %"class.std::__condvar" }
%"class.std::__condvar" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.std::unique_lock.6" = type <{ ptr, i8, [7 x i8] }>
%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>
%"struct.std::adopt_lock_t" = type { i8 }
%"class.koishidb::DBimpl" = type { %"class.koishidb::DB", %"class.std::deque", %"class.std::shared_mutex", %"class.std::mutex", ptr, ptr, %"class.std::condition_variable", i8, i64, %"struct.std::atomic", %"class.std::vector", i64, ptr }
%"class.koishidb::DB" = type { ptr }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<koishidb::DBimpl::Writer *, std::allocator<koishidb::DBimpl::Writer *>>::_Deque_impl" }
%"struct.std::_Deque_base<koishidb::DBimpl::Writer *, std::allocator<koishidb::DBimpl::Writer *>>::_Deque_impl" = type { %"struct.std::_Deque_base<koishidb::DBimpl::Writer *, std::allocator<koishidb::DBimpl::Writer *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<koishidb::DBimpl::Writer *, std::allocator<koishidb::DBimpl::Writer *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::shared_mutex" = type { %"class.std::__shared_mutex_pthread" }
%"class.std::__shared_mutex_pthread" = type { %union.pthread_rwlock_t }
%union.pthread_rwlock_t = type { %struct.__pthread_rwlock_arch_t }
%struct.__pthread_rwlock_arch_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, [7 x i8], i64, i32 }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<koishidb::FileMeta *, std::allocator<koishidb::FileMeta *>>::_Vector_impl" }
%"struct.std::_Vector_base<koishidb::FileMeta *, std::allocator<koishidb::FileMeta *>>::_Vector_impl" = type { %"struct.std::_Vector_base<koishidb::FileMeta *, std::allocator<koishidb::FileMeta *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<koishidb::FileMeta *, std::allocator<koishidb::FileMeta *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(9)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9)) 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 uwtable
define dso_local void @_ZN8koishidb6DBimpl5WriteEPNS_10WriteBatchE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.koishidb::DBimpl::Writer", align 8
  %6 = alloca %"class.std::unique_lock.6", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::unique_lock", align 8
  %11 = alloca %"struct.std::adopt_lock_t", align 1
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #6
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN8koishidb6DBimpl6WriterC2EPNS_10WriteBatchE(ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %18 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 2
  invoke void @_ZNSt11unique_lockISt12shared_mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %6, ptr noundef nonnull align 8 dereferenceable(56) %18)
          to label %19 unwind label %35

19:                                               ; preds = %2
  %20 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr %5, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(80) %20, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %21 unwind label %39

21:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %22 = getelementptr inbounds %"struct.koishidb::DBimpl::Writer", ptr %5, i32 0, i32 1
  %23 = load i8, ptr %22, align 8, !tbaa !9, !range !14, !noundef !15
  %24 = trunc i8 %23 to i1
  br i1 %24, label %47, label %25

25:                                               ; preds = %21
  %26 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 1
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %26) #6
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = icmp ne ptr %5, %28
  br i1 %29, label %30, label %47

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %31 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 3
  call void @_ZNSt11unique_lockISt5mutexEC2ERS0_St12adopt_lock_t(ptr noundef nonnull align 8 dereferenceable(9) %10, ptr noundef nonnull align 8 dereferenceable(40) %31) #6
  %32 = getelementptr inbounds %"struct.koishidb::DBimpl::Writer", ptr %5, i32 0, i32 2
  invoke void @_ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(9) %10)
          to label %33 unwind label %43

33:                                               ; preds = %30
  %34 = call noundef ptr @_ZNSt11unique_lockISt5mutexE7releaseEv(ptr noundef nonnull align 8 dereferenceable(9) %10) #6
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %47

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %7, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %8, align 4
  br label %116

39:                                               ; preds = %19
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %115

43:                                               ; preds = %30
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %7, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %8, align 4
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %115

47:                                               ; preds = %33, %25, %21
  %48 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 3
  invoke void @_ZNSt5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %48)
          to label %49 unwind label %54

49:                                               ; preds = %47
  %50 = getelementptr inbounds %"struct.koishidb::DBimpl::Writer", ptr %5, i32 0, i32 1
  %51 = load i8, ptr %50, align 8, !tbaa !9, !range !14, !noundef !15
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %58

53:                                               ; preds = %49
  store i32 1, ptr %12, align 4
  br label %112

54:                                               ; preds = %58, %47
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  br label %115

58:                                               ; preds = %49
  invoke void @_ZN8koishidb6DBimpl16MakeRoomForWriteEv(ptr noundef nonnull align 8 dereferenceable(312) %16)
          to label %59 unwind label %54

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %60 = invoke noundef ptr @_ZN8koishidb6DBimpl20BuildWriteBatchGroupEPPNS0_6WriterE(ptr noundef nonnull align 8 dereferenceable(312) %16, ptr noundef %13)
          to label %61 unwind label %90

61:                                               ; preds = %59
  store ptr %60, ptr %14, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 8
  %64 = load i64, ptr %63, align 8, !tbaa !16
  invoke void @_ZN8koishidb18WriteBatchInternal11SetSequenceEPNS_10WriteBatchEm(ptr noundef %62, i64 noundef %64)
          to label %65 unwind label %90

65:                                               ; preds = %61
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = invoke noundef i32 @_ZN8koishidb18WriteBatchInternal5CountEPKNS_10WriteBatchE(ptr noundef %66)
          to label %68 unwind label %90

68:                                               ; preds = %65
  %69 = sext i32 %67 to i64
  %70 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 8
  %71 = load i64, ptr %70, align 8, !tbaa !16
  %72 = add i64 %71, %69
  store i64 %72, ptr %70, align 8, !tbaa !16
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !35
  invoke void @_ZN8koishidb10WriteBatch9InsertAllEPNS_8MemtableE(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef %75)
          to label %76 unwind label %90

76:                                               ; preds = %68
  br label %77

77:                                               ; preds = %102, %76
  br label %78

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %79 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 1
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %79) #6
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  store ptr %81, ptr %15, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 1
  call void @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %82) #6
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = icmp ne ptr %83, %5
  br i1 %84, label %85, label %94

85:                                               ; preds = %78
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.koishidb::DBimpl::Writer", ptr %86, i32 0, i32 1
  store i8 1, ptr %87, align 8, !tbaa !9
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.koishidb::DBimpl::Writer", ptr %88, i32 0, i32 2
  call void @_ZNSt18condition_variable10notify_oneEv(ptr noundef nonnull align 8 dereferenceable(48) %89) #6
  br label %94

90:                                               ; preds = %68, %65, %61, %59
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %7, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %115

94:                                               ; preds = %85, %78
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = icmp eq ptr %95, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %94
  store i32 3, ptr %12, align 4
  br label %100

99:                                               ; preds = %94
  store i32 0, ptr %12, align 4
  br label %100

100:                                              ; preds = %99, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %101 = load i32, ptr %12, align 4
  switch i32 %101, label %122 [
    i32 0, label %102
    i32 3, label %103
  ]

102:                                              ; preds = %100
  br label %77, !llvm.loop !36

103:                                              ; preds = %100
  %104 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 1
  %105 = call noundef zeroext i1 @_ZNKSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %104) #6
  br i1 %105, label %111, label %106

106:                                              ; preds = %103
  %107 = getelementptr inbounds %"class.koishidb::DBimpl", ptr %16, i32 0, i32 1
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %107) #6
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.koishidb::DBimpl::Writer", ptr %109, i32 0, i32 2
  call void @_ZNSt18condition_variable10notify_oneEv(ptr noundef nonnull align 8 dereferenceable(48) %110) #6
  br label %111

111:                                              ; preds = %106, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  store i32 0, ptr %12, align 4
  br label %112

112:                                              ; preds = %111, %53
  call void @_ZNSt11unique_lockISt12shared_mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @_ZN8koishidb6DBimpl6WriterD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #6
  %113 = load i32, ptr %12, align 4
  switch i32 %113, label %122 [
    i32 0, label %114
    i32 1, label %114
  ]

114:                                              ; preds = %112, %112
  ret void

115:                                              ; preds = %90, %54, %43, %39
  call void @_ZNSt11unique_lockISt12shared_mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %6) #6
  br label %116

116:                                              ; preds = %115, %35
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  call void @_ZN8koishidb6DBimpl6WriterD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #6
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr %7, align 8
  %119 = load i32, ptr %8, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121

122:                                              ; preds = %112, %100
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockISt12shared_mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8koishidb6DBimpl16MakeRoomForWriteEv(ptr noundef nonnull align 8 dereferenceable(312)) #3 align 2

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

declare void @_ZN8koishidb18WriteBatchInternal11SetSequenceEPNS_10WriteBatchEm(ptr noundef, i64 noundef) #2

declare noundef i32 @_ZN8koishidb18WriteBatchInternal5CountEPKNS_10WriteBatchE(ptr noundef) #2

declare void @_ZN8koishidb10WriteBatch9InsertAllEPNS_8MemtableE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2

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

; Function Attrs: nounwind
declare void @_ZNSt18condition_variable10notify_oneEv(ptr noundef nonnull align 8 dereferenceable(48)) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8koishidb6DBimpl6WriterD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN8koishidb6DBimpl6WriterE", !6, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt18condition_variable", !13, i64 0}
!13 = !{!"_ZTSSt9__condvar", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !23, i64 256}
!17 = !{!"_ZTSN8koishidb6DBimplE", !18, i64 0, !19, i64 8, !25, i64 88, !27, i64 144, !6, i64 184, !6, i64 192, !12, i64 200, !11, i64 248, !23, i64 256, !29, i64 264, !31, i64 272, !23, i64 296, !6, i64 304}
!18 = !{!"_ZTSN8koishidb2DBE"}
!19 = !{!"_ZTSSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt11_Deque_baseIPN8koishidb6DBimpl6WriterESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseIPN8koishidb6DBimpl6WriterESaIS3_EE11_Deque_implE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseIPN8koishidb6DBimpl6WriterESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !23, i64 8, !24, i64 16, !24, i64 48}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt15_Deque_iteratorIPN8koishidb6DBimpl6WriterERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt12shared_mutex", !26, i64 0}
!26 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!27 = !{!"_ZTSSt5mutex", !28, i64 0}
!28 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!29 = !{!"_ZTSSt6atomicIbE", !30, i64 0}
!30 = !{!"_ZTSSt13__atomic_baseIbE", !11, i64 0}
!31 = !{!"_ZTSSt6vectorIPN8koishidb8FileMetaESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN8koishidb8FileMetaESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN8koishidb8FileMetaESaIS2_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN8koishidb8FileMetaESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!17, !6, i64 184}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.koishidb::DBimpl::Writer" = type { ptr, i8, %"class.std::condition_variable" }
%"class.std::condition_variable" = type { %"class.std::__condvar" }
%"class.std::__condvar" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.std::unique_lock.6" = type <{ ptr, i8, [7 x i8] }>
%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9)) 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 uwtable
define dso_local void @_ZN8koishidb6DBimpl5WriteEPNS_10WriteBatchE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.koishidb::DBimpl::Writer", align 8
  %4 = alloca %"class.std::unique_lock.6", align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::unique_lock", align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #6
  call void @_ZN8koishidb6DBimpl6WriterC2EPNS_10WriteBatchE(ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 88
  invoke void @_ZNSt11unique_lockISt12shared_mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %9 unwind label %23

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr %3, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %11 unwind label %25

11:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %12 = getelementptr inbounds i8, ptr %3, i64 8
  %13 = load i8, ptr %12, align 8, !tbaa !9, !range !14, !noundef !15
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %29, label %15

15:                                               ; preds = %11
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %.not = icmp eq ptr %3, %17
  br i1 %.not, label %29, label %18

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 144
  call void @_ZNSt11unique_lockISt5mutexEC2ERS0_St12adopt_lock_t(ptr noundef nonnull align 8 dereferenceable(9) %6, ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  %20 = getelementptr inbounds i8, ptr %3, i64 16
  invoke void @_ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 8 dereferenceable(9) %6)
          to label %21 unwind label %27

21:                                               ; preds = %18
  %22 = call noundef ptr @_ZNSt11unique_lockISt5mutexE7releaseEv(ptr noundef nonnull align 8 dereferenceable(9) %6) #6
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %29

23:                                               ; preds = %2
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %69

25:                                               ; preds = %9
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %68

27:                                               ; preds = %18
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt11unique_lockISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %68

29:                                               ; preds = %21, %15, %11
  %30 = getelementptr inbounds i8, ptr %0, i64 144
  invoke void @_ZNSt5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %30)
          to label %31 unwind label %34

31:                                               ; preds = %29
  %32 = load i8, ptr %12, align 8, !tbaa !9, !range !14, !noundef !15
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %67, label %36

34:                                               ; preds = %36, %29
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %68

36:                                               ; preds = %31
  invoke void @_ZN8koishidb6DBimpl16MakeRoomForWriteEv(ptr noundef nonnull align 8 dereferenceable(312) %0)
          to label %37 unwind label %34

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store ptr %3, ptr %7, align 8, !tbaa !5
  %38 = invoke noundef ptr @_ZN8koishidb6DBimpl20BuildWriteBatchGroupEPPNS0_6WriterE(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef nonnull %7)
          to label %39 unwind label %55

39:                                               ; preds = %37
  %40 = getelementptr inbounds i8, ptr %0, i64 256
  %41 = load i64, ptr %40, align 8, !tbaa !16
  invoke void @_ZN8koishidb18WriteBatchInternal11SetSequenceEPNS_10WriteBatchEm(ptr noundef %38, i64 noundef %41)
          to label %42 unwind label %55

42:                                               ; preds = %39
  %43 = invoke noundef i32 @_ZN8koishidb18WriteBatchInternal5CountEPKNS_10WriteBatchE(ptr noundef %38)
          to label %44 unwind label %55

44:                                               ; preds = %42
  %45 = sext i32 %43 to i64
  %46 = load i64, ptr %40, align 8, !tbaa !16
  %47 = add i64 %46, %45
  store i64 %47, ptr %40, align 8, !tbaa !16
  %48 = getelementptr inbounds i8, ptr %0, i64 184
  %49 = load ptr, ptr %48, align 8, !tbaa !35
  invoke void @_ZN8koishidb10WriteBatch9InsertAllEPNS_8MemtableE(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef %49)
          to label %.preheader unwind label %55

.preheader:                                       ; preds = %44, %57
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  call void @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  %.not18 = icmp eq ptr %51, %3
  br i1 %.not18, label %57, label %52

52:                                               ; preds = %.preheader
  %53 = getelementptr inbounds i8, ptr %51, i64 8
  store i8 1, ptr %53, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %51, i64 16
  call void @_ZNSt18condition_variable10notify_oneEv(ptr noundef nonnull align 8 dereferenceable(48) %54) #6
  br label %57

55:                                               ; preds = %44, %42, %39, %37
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %68

57:                                               ; preds = %52, %.preheader
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = icmp eq ptr %51, %58
  br i1 %59, label %60, label %.preheader

60:                                               ; preds = %57
  %61 = call noundef zeroext i1 @_ZNKSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  br i1 %61, label %66, label %62

62:                                               ; preds = %60
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #6
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  call void @_ZNSt18condition_variable10notify_oneEv(ptr noundef nonnull align 8 dereferenceable(48) %65) #6
  br label %66

66:                                               ; preds = %62, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %67

67:                                               ; preds = %31, %66
  call void @_ZNSt11unique_lockISt12shared_mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN8koishidb6DBimpl6WriterD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #6
  ret void

68:                                               ; preds = %55, %34, %27, %25
  %.pn = phi { ptr, i32 } [ %56, %55 ], [ %35, %34 ], [ %28, %27 ], [ %26, %25 ]
  call void @_ZNSt11unique_lockISt12shared_mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %4) #6
  br label %69

69:                                               ; preds = %68, %23
  %.pn.pn = phi { ptr, i32 } [ %.pn, %68 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN8koishidb6DBimpl6WriterD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockISt12shared_mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8koishidb6DBimpl16MakeRoomForWriteEv(ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8koishidb6DBimpl20BuildWriteBatchGroupEPPNS0_6WriterE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef) local_unnamed_addr #3 align 2

declare void @_ZN8koishidb18WriteBatchInternal11SetSequenceEPNS_10WriteBatchEm(ptr noundef, i64 noundef) local_unnamed_addr #2

declare noundef i32 @_ZN8koishidb18WriteBatchInternal5CountEPKNS_10WriteBatchE(ptr noundef) local_unnamed_addr #2

declare void @_ZN8koishidb10WriteBatch9InsertAllEPNS_8MemtableE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare void @_ZNSt18condition_variable10notify_oneEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8koishidb6DBimpl6WriterD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN8koishidb6DBimpl6WriterE", !6, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt18condition_variable", !13, i64 0}
!13 = !{!"_ZTSSt9__condvar", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !23, i64 256}
!17 = !{!"_ZTSN8koishidb6DBimplE", !18, i64 0, !19, i64 8, !25, i64 88, !27, i64 144, !6, i64 184, !6, i64 192, !12, i64 200, !11, i64 248, !23, i64 256, !29, i64 264, !31, i64 272, !23, i64 296, !6, i64 304}
!18 = !{!"_ZTSN8koishidb2DBE"}
!19 = !{!"_ZTSSt5dequeIPN8koishidb6DBimpl6WriterESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt11_Deque_baseIPN8koishidb6DBimpl6WriterESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseIPN8koishidb6DBimpl6WriterESaIS3_EE11_Deque_implE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseIPN8koishidb6DBimpl6WriterESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !23, i64 8, !24, i64 16, !24, i64 48}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt15_Deque_iteratorIPN8koishidb6DBimpl6WriterERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt12shared_mutex", !26, i64 0}
!26 = !{!"_ZTSSt22__shared_mutex_pthread", !7, i64 0}
!27 = !{!"_ZTSSt5mutex", !28, i64 0}
!28 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!29 = !{!"_ZTSSt6atomicIbE", !30, i64 0}
!30 = !{!"_ZTSSt13__atomic_baseIbE", !11, i64 0}
!31 = !{!"_ZTSSt6vectorIPN8koishidb8FileMetaESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN8koishidb8FileMetaESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN8koishidb8FileMetaESaIS2_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN8koishidb8FileMetaESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!17, !6, i64 184}


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