; LLVM IR from pmwkaa/monotone :: monotone/engine/engine (op)

; 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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.Guard = type { ptr, ptr, ptr }
%struct.Exception = type { ptr, i8, ptr, [1 x %struct.__jmp_buf_tag] }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.Engine = type { %struct.Mutex, %struct.CondVar, %struct.Mapping, %struct.Pipeline, %struct.StorageMgr, ptr, ptr, ptr }
%struct.Mutex = 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.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 }
%struct.Mapping = type { %struct.Rbtree, i32 }
%struct.Rbtree = type { ptr }
%struct.Pipeline = type { %struct.List, i32, ptr }
%struct.List = type { ptr, ptr }
%struct.StorageMgr = type { %struct.List, i32, ptr }
%struct.Ref = type { ptr, %struct.Lockage, %struct.Slice }
%struct.Lockage = type { [2 x %struct.Lock], ptr, ptr }
%struct.Lock = type { i64, i32, i32 }
%struct.Slice = type { i64, i64, %struct.RbtreeNode }
%struct.RbtreeNode = type { ptr, ptr, ptr, i8 }
%struct.Part = type { %struct.Id, i32, i64, i64, i8, ptr, %struct.Memtable, %struct.Memtable, %struct.File, %struct.Index, %struct.Buf, ptr, ptr, ptr, %struct.List }
%struct.Id = type { i64, i64 }
%struct.Memtable = type { ptr, %struct.Rbtree, i32, i32, i32, i64, i64, i64, %struct.List, i32, %struct.Heap }
%struct.Heap = type { ptr, ptr, i32, ptr }
%struct.File = type { i32, i64, %struct.Str, %struct.List }
%struct.Str = type { ptr, ptr, i8 }
%struct.Index = type <{ i32, i32, i32, i32, %struct.Id, i32, i32, i64, i64, i64, i64, i32, i64, i64, i64, i32, i64, i8, i8, [4 x i32] }>
%struct.Buf = type { ptr, ptr, ptr }

@mn_runtime = external thread_local global %struct.Runtime, align 8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @guard_runner(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mapping_next(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @control_unlock_guard(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @engine_checkpoint(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.Guard, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @control_lock_exclusive()
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  %10 = getelementptr inbounds %struct.Guard, ptr %3, i32 0, i32 0
  store ptr @control_unlock_guard, ptr %10, align 8, !tbaa !9
  %11 = getelementptr inbounds %struct.Guard, ptr %3, i32 0, i32 1
  store ptr null, ptr %11, align 8, !tbaa !11
  %12 = getelementptr inbounds %struct.Guard, ptr %3, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %13 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %14 = getelementptr inbounds %struct.Runtime, ptr %13, i32 0, i32 0
  %15 = getelementptr inbounds %struct.ExceptionMgr, ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  store ptr %16, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Exception, ptr %17, i32 0, i32 2
  %19 = load ptr, ptr %18, align 8, !tbaa !17
  store ptr %19, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.Exception, ptr %20, i32 0, i32 2
  store ptr %3, ptr %21, align 8, !tbaa !17
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %22, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %23, ptr %12, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.Engine, ptr %24, i32 0, i32 2
  %26 = call ptr @mapping_min(ptr noundef %25)
  store ptr %26, ptr %7, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %58, %1
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %63

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call ptr @ref_of(ptr noundef %31)
  store ptr %32, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.Ref, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = getelementptr inbounds %struct.Part, ptr %35, i32 0, i32 4
  %37 = load i8, ptr %36, align 8, !tbaa !27, !range !38, !noundef !39
  %38 = trunc i8 %37 to i1
  br i1 %38, label %58, label %39

39:                                               ; preds = %30
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Ref, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !21
  %43 = getelementptr inbounds %struct.Part, ptr %42, i32 0, i32 5
  %44 = load ptr, ptr %43, align 8, !tbaa !40
  %45 = getelementptr inbounds %struct.Memtable, ptr %44, i32 0, i32 10
  %46 = call i64 @heap_used(ptr noundef %45)
  %47 = icmp ugt i64 %46, 0
  br i1 %47, label %48, label %58

48:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Ref, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  store ptr %51, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Engine, ptr %52, i32 0, i32 6
  %54 = load ptr, ptr %53, align 8, !tbaa !41
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  call void @service_refresh(ptr noundef %54, ptr noundef %55)
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.Part, ptr %56, i32 0, i32 4
  store i8 1, ptr %57, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %58

58:                                               ; preds = %48, %39, %30
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.Engine, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = call ptr @mapping_next(ptr noundef %60, ptr noundef %61)
  store ptr %62, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %27, !llvm.loop !48

63:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @guard_runner(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @control_lock_exclusive() #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mapping_min(ptr noundef) #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden ptr @ref_of(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @heap_used(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @service_refresh(ptr noundef, ptr noundef) #3

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

!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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"Guard", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !6, i64 0}
!13 = !{!"Runtime", !14, i64 0, !15, i64 8, !6, i64 312}
!14 = !{!"ExceptionMgr", !6, i64 0}
!15 = !{!"Error", !7, i64 0, !16, i64 256, !6, i64 264, !6, i64 272, !16, i64 280, !6, i64 288, !6, i64 296}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !6, i64 16}
!18 = !{!"Exception", !6, i64 0, !19, i64 8, !6, i64 16, !7, i64 24}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!10, !6, i64 16}
!21 = !{!22, !6, i64 0}
!22 = !{!"Ref", !6, i64 0, !23, i64 8, !24, i64 56}
!23 = !{!"Lockage", !7, i64 0, !6, i64 32, !6, i64 40}
!24 = !{!"Slice", !25, i64 0, !25, i64 8, !26, i64 16}
!25 = !{!"long", !7, i64 0}
!26 = !{!"RbtreeNode", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24}
!27 = !{!28, !19, i64 40}
!28 = !{!"Part", !29, i64 0, !16, i64 16, !25, i64 24, !25, i64 32, !19, i64 40, !6, i64 48, !30, i64 56, !30, i64 168, !34, i64 280, !36, i64 336, !37, i64 472, !6, i64 496, !6, i64 504, !6, i64 512, !32, i64 520}
!29 = !{!"Id", !25, i64 0, !25, i64 8}
!30 = !{!"Memtable", !6, i64 0, !31, i64 8, !16, i64 16, !16, i64 20, !16, i64 24, !25, i64 32, !25, i64 40, !25, i64 48, !32, i64 56, !16, i64 72, !33, i64 80}
!31 = !{!"Rbtree", !6, i64 0}
!32 = !{!"List", !6, i64 0, !6, i64 8}
!33 = !{!"Heap", !6, i64 0, !6, i64 8, !16, i64 16, !6, i64 24}
!34 = !{!"File", !16, i64 0, !25, i64 8, !35, i64 16, !32, i64 40}
!35 = !{!"Str", !6, i64 0, !6, i64 8, !19, i64 16}
!36 = !{!"Index", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !29, i64 16, !16, i64 32, !16, i64 36, !25, i64 40, !25, i64 48, !25, i64 56, !25, i64 64, !16, i64 72, !25, i64 76, !25, i64 84, !25, i64 92, !16, i64 100, !25, i64 104, !7, i64 112, !7, i64 113, !7, i64 114}
!37 = !{!"Buf", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!28, !6, i64 48}
!41 = !{!42, !6, i64 176}
!42 = !{!"Engine", !43, i64 0, !44, i64 40, !45, i64 88, !46, i64 104, !47, i64 136, !6, i64 168, !6, i64 176, !6, i64 184}
!43 = !{!"Mutex", !7, i64 0}
!44 = !{!"CondVar", !7, i64 0}
!45 = !{!"Mapping", !31, i64 0, !16, i64 8}
!46 = !{!"Pipeline", !32, i64 0, !16, i64 16, !6, i64 24}
!47 = !{!"StorageMgr", !32, i64 0, !16, i64 16, !6, i64 24}
!48 = distinct !{!48, !49}
!49 = !{!"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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.Guard = type { ptr, ptr, ptr }

@mn_runtime = external thread_local local_unnamed_addr global %struct.Runtime, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @guard_runner(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mapping_next(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @control_unlock_guard(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @engine_checkpoint(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca %struct.Guard, align 8
  tail call void @control_lock_exclusive()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  store ptr @control_unlock_guard, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr null, ptr %3, align 8, !tbaa !10
  %4 = getelementptr inbounds i8, ptr %2, i64 16
  %5 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !16
  store ptr %2, ptr %7, align 8, !tbaa !16
  store ptr %8, ptr %4, align 8, !tbaa !19
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  %10 = call ptr @mapping_min(ptr noundef nonnull %9)
  %.not16 = icmp eq ptr %10, null
  br i1 %.not16, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 176
  br label %12

12:                                               ; preds = %.lr.ph, %27
  %.017 = phi ptr [ %10, %.lr.ph ], [ %28, %27 ]
  %13 = call ptr @ref_of(ptr noundef nonnull %.017)
  %14 = load ptr, ptr %13, align 8, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %14, i64 40
  %16 = load i8, ptr %15, align 8, !tbaa !26, !range !37, !noundef !38
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %27, label %18

18:                                               ; preds = %12
  %19 = getelementptr inbounds i8, ptr %14, i64 48
  %20 = load ptr, ptr %19, align 8, !tbaa !39
  %21 = getelementptr inbounds i8, ptr %20, i64 80
  %22 = call i64 @heap_used(ptr noundef nonnull %21)
  %.not15 = icmp eq i64 %22, 0
  br i1 %.not15, label %27, label %23

23:                                               ; preds = %18
  %24 = load ptr, ptr %13, align 8, !tbaa !20
  %25 = load ptr, ptr %11, align 8, !tbaa !40
  call void @service_refresh(ptr noundef %25, ptr noundef %24)
  %26 = getelementptr inbounds i8, ptr %24, i64 40
  store i8 1, ptr %26, align 8, !tbaa !26
  br label %27

27:                                               ; preds = %23, %18, %12
  %28 = call ptr @mapping_next(ptr noundef nonnull %9, ptr noundef nonnull %.017)
  %.not = icmp eq ptr %28, null
  br i1 %.not, label %._crit_edge, label %12, !llvm.loop !47

._crit_edge:                                      ; preds = %27, %1
  call void @guard_runner(ptr noundef nonnull %2)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @control_lock_exclusive() local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mapping_min(ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden ptr @ref_of(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @heap_used(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @service_refresh(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"Guard", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !7, i64 0}
!12 = !{!"Runtime", !13, i64 0, !14, i64 8, !7, i64 312}
!13 = !{!"ExceptionMgr", !7, i64 0}
!14 = !{!"Error", !8, i64 0, !15, i64 256, !7, i64 264, !7, i64 272, !15, i64 280, !7, i64 288, !7, i64 296}
!15 = !{!"int", !8, i64 0}
!16 = !{!17, !7, i64 16}
!17 = !{!"Exception", !7, i64 0, !18, i64 8, !7, i64 16, !8, i64 24}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!6, !7, i64 16}
!20 = !{!21, !7, i64 0}
!21 = !{!"Ref", !7, i64 0, !22, i64 8, !23, i64 56}
!22 = !{!"Lockage", !8, i64 0, !7, i64 32, !7, i64 40}
!23 = !{!"Slice", !24, i64 0, !24, i64 8, !25, i64 16}
!24 = !{!"long", !8, i64 0}
!25 = !{!"RbtreeNode", !7, i64 0, !7, i64 8, !7, i64 16, !8, i64 24}
!26 = !{!27, !18, i64 40}
!27 = !{!"Part", !28, i64 0, !15, i64 16, !24, i64 24, !24, i64 32, !18, i64 40, !7, i64 48, !29, i64 56, !29, i64 168, !33, i64 280, !35, i64 336, !36, i64 472, !7, i64 496, !7, i64 504, !7, i64 512, !31, i64 520}
!28 = !{!"Id", !24, i64 0, !24, i64 8}
!29 = !{!"Memtable", !7, i64 0, !30, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !24, i64 32, !24, i64 40, !24, i64 48, !31, i64 56, !15, i64 72, !32, i64 80}
!30 = !{!"Rbtree", !7, i64 0}
!31 = !{!"List", !7, i64 0, !7, i64 8}
!32 = !{!"Heap", !7, i64 0, !7, i64 8, !15, i64 16, !7, i64 24}
!33 = !{!"File", !15, i64 0, !24, i64 8, !34, i64 16, !31, i64 40}
!34 = !{!"Str", !7, i64 0, !7, i64 8, !18, i64 16}
!35 = !{!"Index", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !28, i64 16, !15, i64 32, !15, i64 36, !24, i64 40, !24, i64 48, !24, i64 56, !24, i64 64, !15, i64 72, !24, i64 76, !24, i64 84, !24, i64 92, !15, i64 100, !24, i64 104, !8, i64 112, !8, i64 113, !8, i64 114}
!36 = !{!"Buf", !7, i64 0, !7, i64 8, !7, i64 16}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{!27, !7, i64 48}
!40 = !{!41, !7, i64 176}
!41 = !{!"Engine", !42, i64 0, !43, i64 40, !44, i64 88, !45, i64 104, !46, i64 136, !7, i64 168, !7, i64 176, !7, i64 184}
!42 = !{!"Mutex", !8, i64 0}
!43 = !{!"CondVar", !8, i64 0}
!44 = !{!"Mapping", !30, i64 0, !15, i64 8}
!45 = !{!"Pipeline", !31, i64 0, !15, i64 16, !7, i64 24}
!46 = !{!"StorageMgr", !31, i64 0, !15, i64 16, !7, i64 24}
!47 = distinct !{!47, !48}
!48 = !{!"llvm.loop.mustprogress"}


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