; LLVM IR from weicao/cascadb :: src/cache/cache.ll (ZN7cascadb5Cache4initEv)

; 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.cascadb::LoggerFormat" = type { ptr, %"class.std::__cxx11::basic_ostringstream" }
%"class.std::__cxx11::basic_ostringstream" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.cascadb::Cache" = type { %"class.cascadb::Options", %"class.cascadb::RWLock", %"class.std::map", %"class.cascadb::Mutex", i64, %"class.cascadb::RWLock", %"class.std::map.0", %"class.cascadb::Mutex", i8, ptr }
%"class.cascadb::Options" = type <{ ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cascadb::Cache::TableSettings>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cascadb::Cache::TableSettings>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, cascadb::Cache::TableSettings>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, cascadb::Cache::TableSettings>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<cascadb::Cache::CacheKey, std::pair<const cascadb::Cache::CacheKey, cascadb::Node *>, std::_Select1st<std::pair<const cascadb::Cache::CacheKey, cascadb::Node *>>, std::less<cascadb::Cache::CacheKey>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<cascadb::Cache::CacheKey, std::pair<const cascadb::Cache::CacheKey, cascadb::Node *>, std::_Select1st<std::pair<const cascadb::Cache::CacheKey, cascadb::Node *>>, std::less<cascadb::Cache::CacheKey>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"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 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@__PRETTY_FUNCTION__._ZN7cascadb5Cache4initEv = external hidden unnamed_addr constant [28 x i8], align 1
@_ZN7cascadb14g_logger_levelE = external global i32, align 4
@_ZN7cascadb8g_loggerE = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb5Cache4initEv(ptr noundef nonnull align 8 dereferenceable(432) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.cascadb::LoggerFormat", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %7 = load ptr, ptr %3, align 8
  %8 = getelementptr inbounds %"class.cascadb::Cache", ptr %7, i32 0, i32 8
  %9 = load i8, ptr %8, align 8, !tbaa !9, !range !31, !noundef !32
  %10 = trunc i8 %9 to i1
  %11 = xor i1 %10, true
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  br label %15

13:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 57, ptr noundef @__PRETTY_FUNCTION__._ZN7cascadb5Cache4initEv) #9
  unreachable

14:                                               ; No predecessors!
  br label %15

15:                                               ; preds = %14, %12
  %16 = getelementptr inbounds %"class.cascadb::Cache", ptr %7, i32 0, i32 8
  store i8 1, ptr %16, align 8, !tbaa !9
  %17 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #10
  invoke void @_ZN7cascadb6ThreadC1EPFPvS1_E(ptr noundef nonnull align 8 dereferenceable(17) %17, ptr noundef @_ZL12flusher_mainPv)
          to label %18 unwind label %26

18:                                               ; preds = %15
  %19 = getelementptr inbounds %"class.cascadb::Cache", ptr %7, i32 0, i32 9
  store ptr %17, ptr %19, align 8, !tbaa !33
  %20 = getelementptr inbounds %"class.cascadb::Cache", ptr %7, i32 0, i32 9
  %21 = load ptr, ptr %20, align 8, !tbaa !33
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %30

23:                                               ; preds = %18
  %24 = getelementptr inbounds %"class.cascadb::Cache", ptr %7, i32 0, i32 9
  %25 = load ptr, ptr %24, align 8, !tbaa !33
  call void @_ZN7cascadb6Thread5startEPv(ptr noundef nonnull align 8 dereferenceable(17) %25, ptr noundef %7)
  store i1 true, ptr %2, align 1
  br label %62

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %4, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %17, i64 noundef 24) #11
  br label %64

30:                                               ; preds = %18
  %31 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !34
  %32 = icmp sge i32 3, %31
  br i1 %32, label %33, label %61

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 384, ptr %6) #12
  %34 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %6, ptr noundef %34)
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %6, i32 noundef 3)
          to label %36 unwind label %57

36:                                               ; preds = %33
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef @.str.2)
          to label %38 unwind label %57

38:                                               ; preds = %36
  %39 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #13
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %44

41:                                               ; preds = %38
  %42 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #13
  %43 = getelementptr inbounds i8, ptr %42, i64 1
  br label %45

44:                                               ; preds = %38
  br label %45

45:                                               ; preds = %44, %41
  %46 = phi ptr [ %43, %41 ], [ @.str.1, %44 ]
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef %46)
          to label %48 unwind label %57

48:                                               ; preds = %45
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @.str.3)
          to label %50 unwind label %57

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %49, i32 noundef 66)
          to label %52 unwind label %57

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @.str.2)
          to label %54 unwind label %57

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef @.str.4)
          to label %56 unwind label %57

56:                                               ; preds = %54
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %6) #12
  call void @llvm.lifetime.end.p0(i64 384, ptr %6) #12
  br label %61

57:                                               ; preds = %54, %52, %50, %48, %45, %36, %33
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %4, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %5, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %6) #12
  call void @llvm.lifetime.end.p0(i64 384, ptr %6) #12
  br label %64

61:                                               ; preds = %56, %30
  store i1 false, ptr %2, align 1
  br label %62

62:                                               ; preds = %61, %23
  %63 = load i1, ptr %2, align 1
  ret i1 %63

64:                                               ; preds = %57, %26
  %65 = load ptr, ptr %4, align 8
  %66 = load i32, ptr %5, align 4
  %67 = insertvalue { ptr, i32 } poison, ptr %65, 0
  %68 = insertvalue { ptr, i32 } %67, i32 %66, 1
  resume { ptr, i32 } %68
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL12flusher_mainPv(ptr noundef) #1

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

declare void @_ZN7cascadb6Thread5startEPv(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) #1 align 2

; Function Attrs: nounwind willreturn memory(read)
declare noundef ptr @strrchr(ptr noundef, i32 noundef) #7

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

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

attributes #0 = { nobuiltin 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 #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 = { noreturn 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 #3 = { nobuiltin allocsize(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 = { "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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind willreturn memory(read) "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 #8 = { 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 #9 = { noreturn nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }

!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, !15, i64 416}
!10 = !{!"_ZTSN7cascadb5CacheE", !11, i64 0, !16, i64 104, !17, i64 160, !25, i64 208, !12, i64 256, !16, i64 264, !26, i64 320, !25, i64 368, !15, i64 416, !6, i64 424}
!11 = !{!"_ZTSN7cascadb7OptionsE", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !14, i64 96, !15, i64 100}
!12 = !{!"long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN7cascadb8CompressE", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN7cascadb6RWLockE", !7, i64 0}
!17 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7cascadb5Cache13TableSettingsESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7cascadb5Cache13TableSettingsEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7cascadb5Cache13TableSettingsEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !12, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{!"_ZTSN7cascadb5MutexE", !15, i64 0, !7, i64 8}
!26 = !{!"_ZTSSt3mapIN7cascadb5Cache8CacheKeyEPNS0_4NodeESt4lessIS2_ESaISt4pairIKS2_S4_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeIN7cascadb5Cache8CacheKeyESt4pairIKS2_PNS0_4NodeEESt10_Select1stIS7_ESt4lessIS2_ESaIS7_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeIN7cascadb5Cache8CacheKeyESt4pairIKS2_PNS0_4NodeEESt10_Select1stIS7_ESt4lessIS2_ESaIS7_EE13_Rb_tree_implISB_Lb1EEE", !29, i64 0, !22, i64 8}
!29 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7cascadb5Cache8CacheKeyEEE", !30, i64 0}
!30 = !{!"_ZTSSt4lessIN7cascadb5Cache8CacheKeyEE"}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!10, !6, i64 424}
!34 = !{!35, !35, i64 0}
!35 = !{!"_ZTSN7cascadb11LoggerLevelE", !7, i64 0}


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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@__PRETTY_FUNCTION__._ZN7cascadb5Cache4initEv = external hidden unnamed_addr constant [28 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb5Cache4initEv(ptr noundef nonnull align 8 dereferenceable(432) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 416
  %3 = load i8, ptr %2, align 8, !tbaa !5, !range !30, !noundef !31
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %6

5:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 57, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7cascadb5Cache4initEv) #5
  unreachable

6:                                                ; preds = %1
  store i8 1, ptr %2, align 8, !tbaa !5
  %7 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
  invoke void @_ZN7cascadb6ThreadC1EPFPvS1_E(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull @_ZL12flusher_mainPv)
          to label %8 unwind label %10

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 424
  store ptr %7, ptr %9, align 8, !tbaa !32
  tail call void @_ZN7cascadb6Thread5startEPv(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull %0)
  ret i1 true

10:                                               ; preds = %6
  %11 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %7, i64 noundef 24) #7
  resume { ptr, i32 } %11
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL12flusher_mainPv(ptr noundef) #1

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

declare void @_ZN7cascadb6Thread5startEPv(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef) local_unnamed_addr #4

attributes #0 = { nobuiltin 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 #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 = { noreturn 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 #3 = { nobuiltin allocsize(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 = { "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 = { noreturn nounwind }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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, !14, i64 416}
!6 = !{!"_ZTSN7cascadb5CacheE", !7, i64 0, !15, i64 104, !16, i64 160, !24, i64 208, !11, i64 256, !15, i64 264, !25, i64 320, !24, i64 368, !14, i64 416, !8, i64 424}
!7 = !{!"_ZTSN7cascadb7OptionsE", !8, i64 0, !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !13, i64 96, !14, i64 100}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"long", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ZTSN7cascadb8CompressE", !9, i64 0}
!14 = !{!"bool", !9, i64 0}
!15 = !{!"_ZTSN7cascadb6RWLockE", !9, i64 0}
!16 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7cascadb5Cache13TableSettingsESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7cascadb5Cache13TableSettingsEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7cascadb5Cache13TableSettingsEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !11, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!24 = !{!"_ZTSN7cascadb5MutexE", !14, i64 0, !9, i64 8}
!25 = !{!"_ZTSSt3mapIN7cascadb5Cache8CacheKeyEPNS0_4NodeESt4lessIS2_ESaISt4pairIKS2_S4_EEE", !26, i64 0}
!26 = !{!"_ZTSSt8_Rb_treeIN7cascadb5Cache8CacheKeyESt4pairIKS2_PNS0_4NodeEESt10_Select1stIS7_ESt4lessIS2_ESaIS7_EE", !27, i64 0}
!27 = !{!"_ZTSNSt8_Rb_treeIN7cascadb5Cache8CacheKeyESt4pairIKS2_PNS0_4NodeEESt10_Select1stIS7_ESt4lessIS2_ESaIS7_EE13_Rb_tree_implISB_Lb1EEE", !28, i64 0, !21, i64 8}
!28 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7cascadb5Cache8CacheKeyEEE", !29, i64 0}
!29 = !{!"_ZTSSt4lessIN7cascadb5Cache8CacheKeyEE"}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!6, !8, i64 424}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PromotePass,SROAPass,SimplifyCFGPass,TailCallElimPass