; LLVM IR from weicao/cascadb :: src/tree/node.ll (ZN7cascadb8LeafNodeD2Ev)

; 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.__gnu_cxx::__normal_iterator.30" = type { ptr }
%"class.cascadb::LeafNode" = type { %"class.cascadb::DataNode.base", i8, i64, i64, i64, %"class.std::vector.8", %"class.cascadb::RecordBuckets" }
%"class.cascadb::DataNode.base" = type <{ %"class.cascadb::Node", ptr, i32 }>
%"class.cascadb::Node" = type { ptr, %"class.std::__cxx11::basic_string", i64, %"class.cascadb::Mutex", i8, i8, i8, %struct.timeval, %struct.timeval, i32, i32, %"class.cascadb::RWLock" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.cascadb::Mutex" = type { i8, %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.timeval = type { i64, i64 }
%"class.cascadb::RWLock" = 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::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<cascadb::LeafNode::BucketInfo, std::allocator<cascadb::LeafNode::BucketInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<cascadb::LeafNode::BucketInfo, std::allocator<cascadb::LeafNode::BucketInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<cascadb::LeafNode::BucketInfo, std::allocator<cascadb::LeafNode::BucketInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cascadb::LeafNode::BucketInfo, std::allocator<cascadb::LeafNode::BucketInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.cascadb::RecordBuckets" = type { i64, %"class.std::vector.13", i64, i64, i64 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<cascadb::RecordBuckets::RecordBucketInfo, std::allocator<cascadb::RecordBuckets::RecordBucketInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<cascadb::RecordBuckets::RecordBucketInfo, std::allocator<cascadb::RecordBuckets::RecordBucketInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<cascadb::RecordBuckets::RecordBucketInfo, std::allocator<cascadb::RecordBuckets::RecordBucketInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cascadb::RecordBuckets::RecordBucketInfo, std::allocator<cascadb::RecordBuckets::RecordBucketInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.cascadb::LeafNode::BucketInfo" = type <{ %"class.cascadb::Slice", %"class.cascadb::Slice", i32, i32, i32, i16, [2 x i8] }>
%"class.cascadb::Slice" = type <{ ptr, i32, [4 x i8] }>
%"class.cascadb::Record" = type { %"class.cascadb::Slice", %"class.cascadb::Slice" }

@_ZTVN7cascadb8LeafNodeE = external dso_local unnamed_addr constant { [11 x ptr] }, align 8

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

; 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
declare dso_local void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7cascadb8LeafNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(320) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 72) ({ [11 x ptr] }, ptr @_ZTVN7cascadb8LeafNodeE, i32 0, i32 0, i32 2), ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !11
  br label %11

11:                                               ; preds = %23, %1
  %12 = load i64, ptr %3, align 8, !tbaa !11
  %13 = getelementptr inbounds %"class.cascadb::LeafNode", ptr %10, i32 0, i32 5
  %14 = call noundef i64 @_ZNKSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %15 = icmp ult i64 %12, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %26

17:                                               ; preds = %11
  %18 = getelementptr inbounds %"class.cascadb::LeafNode", ptr %10, i32 0, i32 5
  %19 = load i64, ptr %3, align 8, !tbaa !11
  %20 = call noundef nonnull align 8 dereferenceable(46) ptr @_ZNSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %19) #6
  %21 = getelementptr inbounds %"struct.cascadb::LeafNode::BucketInfo", ptr %20, i32 0, i32 0
  invoke void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12) %21)
          to label %22 unwind label %69

22:                                               ; preds = %17
  br label %23

23:                                               ; preds = %22
  %24 = load i64, ptr %3, align 8, !tbaa !11
  %25 = add i64 %24, 1
  store i64 %25, ptr %3, align 8, !tbaa !11
  br label %11, !llvm.loop !13

26:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !11
  br label %27

27:                                               ; preds = %63, %26
  %28 = load i64, ptr %4, align 8, !tbaa !11
  %29 = getelementptr inbounds %"class.cascadb::LeafNode", ptr %10, i32 0, i32 6
  %30 = invoke noundef i64 @_ZN7cascadb13RecordBuckets14buckets_numberEv(ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %31 unwind label %69

31:                                               ; preds = %27
  %32 = icmp ult i64 %28, %30
  br i1 %32, label %34, label %33

33:                                               ; preds = %31
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %66

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %35 = getelementptr inbounds %"class.cascadb::LeafNode", ptr %10, i32 0, i32 6
  %36 = load i64, ptr %4, align 8, !tbaa !11
  %37 = invoke noundef ptr @_ZN7cascadb13RecordBuckets6bucketEm(ptr noundef nonnull align 8 dereferenceable(56) %35, i64 noundef %36)
          to label %38 unwind label %69

38:                                               ; preds = %34
  store ptr %37, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %62

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = call ptr @_ZNSt6vectorIN7cascadb6RecordESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #6
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %7, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  br label %45

45:                                               ; preds = %58, %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call ptr @_ZNSt6vectorIN7cascadb6RecordESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #6
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %8, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br i1 %49, label %51, label %50

50:                                               ; preds = %45
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %61

51:                                               ; preds = %45
  %52 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %53 = getelementptr inbounds %"class.cascadb::Record", ptr %52, i32 0, i32 0
  invoke void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12) %53)
          to label %54 unwind label %69

54:                                               ; preds = %51
  %55 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %56 = getelementptr inbounds %"class.cascadb::Record", ptr %55, i32 0, i32 1
  invoke void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12) %56)
          to label %57 unwind label %69

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %57
  %59 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #6
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %9, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  br label %45, !llvm.loop !15

61:                                               ; preds = %50
  br label %62

62:                                               ; preds = %61, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %63

63:                                               ; preds = %62
  %64 = load i64, ptr %4, align 8, !tbaa !11
  %65 = add i64 %64, 1
  store i64 %65, ptr %4, align 8, !tbaa !11
  br label %27, !llvm.loop !16

66:                                               ; preds = %33
  %67 = getelementptr inbounds %"class.cascadb::LeafNode", ptr %10, i32 0, i32 6
  call void @_ZN7cascadb13RecordBucketsD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %67) #6
  %68 = getelementptr inbounds %"class.cascadb::LeafNode", ptr %10, i32 0, i32 5
  call void @_ZNSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %68) #6
  call void @_ZN7cascadb4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(212) %10) #6
  ret void

69:                                               ; preds = %54, %51, %34, %27, %17
  %70 = landingpad { ptr, i32 }
          catch ptr null
  %71 = extractvalue { ptr, i32 } %70, 0
  call void @__clang_call_terminate(ptr %71) #7
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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.__gnu_cxx::__normal_iterator.30" = type { ptr }

@_ZTVN7cascadb8LeafNodeE = external dso_local unnamed_addr constant { [11 x ptr] }, align 8

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7cascadb8LeafNodeD2Ev(ptr noundef nonnull align 8 dereferenceable(320) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  store ptr getelementptr inbounds inrange(-16, 72) (i8, ptr @_ZTVN7cascadb8LeafNodeE, i64 16), ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 240
  %5 = tail call noundef i64 @_ZNKSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %.not20 = icmp eq i64 %5, 0
  br i1 %.not20, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %9, %1
  %6 = getelementptr inbounds i8, ptr %0, i64 264
  %7 = tail call noundef i64 @_ZN7cascadb13RecordBuckets14buckets_numberEv(ptr noundef nonnull align 8 dereferenceable(56) %6)
  %.not21 = icmp eq i64 %7, 0
  br i1 %.not21, label %._crit_edge18, label %.lr.ph17

.lr.ph:                                           ; preds = %1, %9
  %.014 = phi i64 [ %10, %9 ], [ 0, %1 ]
  %8 = tail call noundef nonnull align 8 dereferenceable(46) ptr @_ZNSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.014) #6
  invoke void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12) %8)
          to label %9 unwind label %.loopexit.split-lp

9:                                                ; preds = %.lr.ph
  %10 = add nuw i64 %.014, 1
  %11 = tail call noundef i64 @_ZNKSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %12 = icmp ult i64 %10, %11
  br i1 %12, label %.lr.ph, label %.preheader, !llvm.loop !8

._crit_edge18:                                    ; preds = %26, %.preheader
  call void @_ZN7cascadb13RecordBucketsD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #6
  call void @_ZNSt6vectorIN7cascadb8LeafNode10BucketInfoESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @_ZN7cascadb4NodeD2Ev(ptr noundef nonnull align 8 dereferenceable(212) %0) #6
  ret void

.lr.ph17:                                         ; preds = %.preheader, %26
  %.0916 = phi i64 [ %27, %26 ], [ 0, %.preheader ]
  %13 = call noundef ptr @_ZN7cascadb13RecordBuckets6bucketEm(ptr noundef nonnull align 8 dereferenceable(56) %6, i64 noundef %.0916)
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %26, label %14

14:                                               ; preds = %.lr.ph17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %15 = call ptr @_ZNSt6vectorIN7cascadb6RecordESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  store ptr %15, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %16 = call ptr @_ZNSt6vectorIN7cascadb6RecordESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  store ptr %16, ptr %3, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br i1 %17, label %.lr.ph15, label %._crit_edge

._crit_edge:                                      ; preds = %22, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br label %26

.lr.ph15:                                         ; preds = %14, %22
  %18 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  invoke void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12) %18)
          to label %19 unwind label %.loopexit

19:                                               ; preds = %.lr.ph15
  %20 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  invoke void @_ZN7cascadb5Slice7destroyEv(ptr noundef nonnull align 8 dereferenceable(12) %21)
          to label %22 unwind label %.loopexit

22:                                               ; preds = %19
  %23 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %24 = call ptr @_ZNSt6vectorIN7cascadb6RecordESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  store ptr %24, ptr %3, align 8
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br i1 %25, label %.lr.ph15, label %._crit_edge, !llvm.loop !10

26:                                               ; preds = %._crit_edge, %.lr.ph17
  %27 = add nuw i64 %.0916, 1
  %28 = call noundef i64 @_ZN7cascadb13RecordBuckets14buckets_numberEv(ptr noundef nonnull align 8 dereferenceable(56) %6)
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %.lr.ph17, label %._crit_edge18, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph15, %19
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %30

.loopexit.split-lp:                               ; preds = %.lr.ph
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %30

30:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  %31 = extractvalue { ptr, i32 } %lpad.phi, 0
  call void @__clang_call_terminate(ptr %31) #7
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7cascadb6RecordESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noinline noreturn nounwind uwtable "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 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}


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