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

; 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::Tree" = type { %"class.std::__cxx11::basic_string", %"class.cascadb::Options", ptr, ptr, ptr, ptr, ptr, 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.cascadb::SchemaNode" = type { %"class.cascadb::Node", i64, i64, i64, i64 }
%"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.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 }

@_ZN7cascadb14g_logger_levelE = external global i32, align 4
@_ZN7cascadb8g_loggerE = external global ptr, align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN7cascadb4Tree4initEv = external hidden unnamed_addr constant [27 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb4Tree4initEv(ptr noundef nonnull align 8 dereferenceable(184) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.cascadb::LoggerFormat", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.cascadb::LoggerFormat", align 8
  %8 = alloca %"class.cascadb::LoggerFormat", align 8
  %9 = alloca %"class.cascadb::LoggerFormat", align 8
  %10 = alloca %"class.cascadb::LoggerFormat", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  %12 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 1
  %13 = getelementptr inbounds %"class.cascadb::Options", ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %48

16:                                               ; preds = %1
  %17 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %18 = icmp sge i32 3, %17
  br i1 %18, label %19, label %47

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 384, ptr %4) #11
  %20 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %4, ptr noundef %20)
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %4, i32 noundef 3)
          to label %22 unwind label %43

22:                                               ; preds = %19
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef @.str)
          to label %24 unwind label %43

24:                                               ; preds = %22
  %25 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  %28 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  br label %31

30:                                               ; preds = %24
  br label %31

31:                                               ; preds = %30, %27
  %32 = phi ptr [ %29, %27 ], [ @.str.1, %30 ]
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %32)
          to label %34 unwind label %43

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

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef 33)
          to label %38 unwind label %43

38:                                               ; preds = %36
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str)
          to label %40 unwind label %43

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef @.str.3)
          to label %42 unwind label %43

42:                                               ; preds = %40
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %4) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %4) #11
  br label %47

43:                                               ; preds = %40, %38, %36, %34, %31, %22, %19
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %5, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %6, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %4) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %4) #11
  br label %283

47:                                               ; preds = %42, %16
  store i1 false, ptr %2, align 1
  br label %281

48:                                               ; preds = %1
  %49 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 1
  %50 = getelementptr inbounds %"class.cascadb::Options", ptr %49, i32 0, i32 15
  %51 = load i32, ptr %50, align 8, !tbaa !20
  switch i32 %51, label %55 [
    i32 0, label %55
    i32 1, label %52
  ]

52:                                               ; preds = %48
  %53 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #13
  call void @llvm.memset.p0.i64(ptr align 8 %53, i8 0, i64 8, i1 false)
  call void @_ZN7cascadb16SnappyCompressorC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %53) #11
  %54 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 5
  store ptr %53, ptr %54, align 8, !tbaa !21
  br label %55

55:                                               ; preds = %52, %48, %48
  %56 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #13
  invoke void @_ZN7cascadb4Tree15TreeNodeFactoryC1EPS0_(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef %11)
          to label %57 unwind label %94

57:                                               ; preds = %55
  %58 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 4
  store ptr %56, ptr %58, align 8, !tbaa !22
  %59 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 0
  %62 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !22
  %64 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !24
  %66 = call noundef zeroext i1 @_ZN7cascadb5Cache9add_tableERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_11NodeFactoryEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(432) %60, ptr noundef nonnull align 8 dereferenceable(32) %61, ptr noundef %63, ptr noundef %65)
  br i1 %66, label %103, label %67

67:                                               ; preds = %57
  %68 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %69 = icmp sge i32 3, %68
  br i1 %69, label %70, label %102

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 384, ptr %7) #11
  %71 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %7, ptr noundef %71)
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %7, i32 noundef 3)
          to label %73 unwind label %98

73:                                               ; preds = %70
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef @.str)
          to label %75 unwind label %98

75:                                               ; preds = %73
  %76 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %81

78:                                               ; preds = %75
  %79 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %80 = getelementptr inbounds i8, ptr %79, i64 1
  br label %82

81:                                               ; preds = %75
  br label %82

82:                                               ; preds = %81, %78
  %83 = phi ptr [ %80, %78 ], [ @.str.1, %81 ]
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef %83)
          to label %85 unwind label %98

85:                                               ; preds = %82
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef @.str.2)
          to label %87 unwind label %98

87:                                               ; preds = %85
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %86, i32 noundef 47)
          to label %89 unwind label %98

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef @.str)
          to label %91 unwind label %98

91:                                               ; preds = %89
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @.str.4)
          to label %93 unwind label %98

93:                                               ; preds = %91
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %7) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %7) #11
  br label %102

94:                                               ; preds = %55
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %5, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %56, i64 noundef 16) #14
  br label %283

98:                                               ; preds = %91, %89, %87, %85, %82, %73, %70
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %5, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %6, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %7) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %7) #11
  br label %283

102:                                              ; preds = %93, %67
  store i1 false, ptr %2, align 1
  br label %281

103:                                              ; preds = %57
  %104 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !23
  %106 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 0
  %107 = call noundef ptr @_ZN7cascadb5Cache3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmb(ptr noundef nonnull align 8 dereferenceable(432) %105, ptr noundef nonnull align 8 dereferenceable(32) %106, i64 noundef 1, i1 noundef zeroext false)
  %108 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  store ptr %107, ptr %108, align 8, !tbaa !25
  %109 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %110 = load ptr, ptr %109, align 8, !tbaa !25
  %111 = icmp eq ptr %110, null
  br i1 %111, label %112, label %171

112:                                              ; preds = %103
  %113 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %114 = icmp sge i32 1, %113
  br i1 %114, label %115, label %143

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 384, ptr %8) #11
  %116 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %8, ptr noundef %116)
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %8, i32 noundef 1)
          to label %118 unwind label %139

118:                                              ; preds = %115
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef @.str)
          to label %120 unwind label %139

120:                                              ; preds = %118
  %121 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %126

123:                                              ; preds = %120
  %124 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %125 = getelementptr inbounds i8, ptr %124, i64 1
  br label %127

126:                                              ; preds = %120
  br label %127

127:                                              ; preds = %126, %123
  %128 = phi ptr [ %125, %123 ], [ @.str.1, %126 ]
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef %128)
          to label %130 unwind label %139

130:                                              ; preds = %127
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %129, ptr noundef @.str.2)
          to label %132 unwind label %139

132:                                              ; preds = %130
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %131, i32 noundef 53)
          to label %134 unwind label %139

134:                                              ; preds = %132
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef @.str)
          to label %136 unwind label %139

136:                                              ; preds = %134
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef @.str.5)
          to label %138 unwind label %139

138:                                              ; preds = %136
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %8) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %8) #11
  br label %143

139:                                              ; preds = %136, %134, %132, %130, %127, %118, %115
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %5, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %6, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %8) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %8) #11
  br label %283

143:                                              ; preds = %138, %112
  %144 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 232) #13
  %145 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 0
  invoke void @_ZN7cascadb10SchemaNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(232) %144, ptr noundef nonnull align 8 dereferenceable(32) %145)
          to label %146 unwind label %167

146:                                              ; preds = %143
  %147 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  store ptr %144, ptr %147, align 8, !tbaa !25
  %148 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %149 = load ptr, ptr %148, align 8, !tbaa !25
  %150 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %149, i32 0, i32 1
  store i64 0, ptr %150, align 8, !tbaa !26
  %151 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %152 = load ptr, ptr %151, align 8, !tbaa !25
  %153 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %152, i32 0, i32 2
  store i64 2, ptr %153, align 8, !tbaa !32
  %154 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %155 = load ptr, ptr %154, align 8, !tbaa !25
  %156 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %155, i32 0, i32 3
  store i64 281474976710657, ptr %156, align 8, !tbaa !33
  %157 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %158 = load ptr, ptr %157, align 8, !tbaa !25
  %159 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %158, i32 0, i32 4
  store i64 2, ptr %159, align 8, !tbaa !34
  %160 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %161 = load ptr, ptr %160, align 8, !tbaa !25
  call void @_ZN7cascadb4Node9set_dirtyEb(ptr noundef nonnull align 8 dereferenceable(200) %161, i1 noundef zeroext true)
  %162 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 2
  %163 = load ptr, ptr %162, align 8, !tbaa !23
  %164 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 0
  %165 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !25
  call void @_ZN7cascadb5Cache3putERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPNS_4NodeE(ptr noundef nonnull align 8 dereferenceable(432) %163, ptr noundef nonnull align 8 dereferenceable(32) %164, i64 noundef 1, ptr noundef %166)
  br label %171

167:                                              ; preds = %143
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %5, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %144, i64 noundef 232) #14
  br label %283

171:                                              ; preds = %146, %103
  %172 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %173 = load ptr, ptr %172, align 8, !tbaa !25
  %174 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %173, i32 0, i32 1
  %175 = load i64, ptr %174, align 8, !tbaa !26
  %176 = icmp eq i64 %175, 0
  br i1 %176, label %177, label %225

177:                                              ; preds = %171
  %178 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %179 = icmp sge i32 1, %178
  br i1 %179, label %180, label %208

180:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 384, ptr %9) #11
  %181 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %9, ptr noundef %181)
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %9, i32 noundef 1)
          to label %183 unwind label %204

183:                                              ; preds = %180
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @.str)
          to label %185 unwind label %204

185:                                              ; preds = %183
  %186 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %191

188:                                              ; preds = %185
  %189 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %190 = getelementptr inbounds i8, ptr %189, i64 1
  br label %192

191:                                              ; preds = %185
  br label %192

192:                                              ; preds = %191, %188
  %193 = phi ptr [ %190, %188 ], [ @.str.1, %191 ]
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef %193)
          to label %195 unwind label %204

195:                                              ; preds = %192
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef @.str.2)
          to label %197 unwind label %204

197:                                              ; preds = %195
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %196, i32 noundef 64)
          to label %199 unwind label %204

199:                                              ; preds = %197
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef @.str)
          to label %201 unwind label %204

201:                                              ; preds = %199
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef @.str.6)
          to label %203 unwind label %204

203:                                              ; preds = %201
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %9) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %9) #11
  br label %208

204:                                              ; preds = %201, %199, %197, %195, %192, %183, %180
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %5, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %6, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %9) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %9) #11
  br label %283

208:                                              ; preds = %203, %177
  %209 = call noundef ptr @_ZN7cascadb4Tree14new_inner_nodeEv(ptr noundef nonnull align 8 dereferenceable(184) %11)
  %210 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 7
  store ptr %209, ptr %210, align 8, !tbaa !35
  %211 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 7
  %212 = load ptr, ptr %211, align 8, !tbaa !35
  call void @_ZN7cascadb9InnerNode15init_empty_rootEv(ptr noundef nonnull align 8 dereferenceable(312) %212)
  %213 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %214 = load ptr, ptr %213, align 8, !tbaa !25
  call void @_ZN7cascadb4Node10write_lockEv(ptr noundef nonnull align 8 dereferenceable(200) %214)
  %215 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 7
  %216 = load ptr, ptr %215, align 8, !tbaa !35
  %217 = call noundef i64 @_ZN7cascadb4Node3nidEv(ptr noundef nonnull align 8 dereferenceable(200) %216)
  %218 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %219 = load ptr, ptr %218, align 8, !tbaa !25
  %220 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %219, i32 0, i32 1
  store i64 %217, ptr %220, align 8, !tbaa !26
  %221 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %222 = load ptr, ptr %221, align 8, !tbaa !25
  call void @_ZN7cascadb4Node9set_dirtyEb(ptr noundef nonnull align 8 dereferenceable(200) %222, i1 noundef zeroext true)
  %223 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %224 = load ptr, ptr %223, align 8, !tbaa !25
  call void @_ZN7cascadb4Node6unlockEv(ptr noundef nonnull align 8 dereferenceable(200) %224)
  br label %273

225:                                              ; preds = %171
  %226 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %227 = icmp sge i32 1, %226
  br i1 %227, label %228, label %266

228:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 384, ptr %10) #11
  %229 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %10, ptr noundef %229)
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %10, i32 noundef 1)
          to label %231 unwind label %262

231:                                              ; preds = %228
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %230, ptr noundef @.str)
          to label %233 unwind label %262

233:                                              ; preds = %231
  %234 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %235 = icmp ne ptr %234, null
  br i1 %235, label %236, label %239

236:                                              ; preds = %233
  %237 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #12
  %238 = getelementptr inbounds i8, ptr %237, i64 1
  br label %240

239:                                              ; preds = %233
  br label %240

240:                                              ; preds = %239, %236
  %241 = phi ptr [ %238, %236 ], [ @.str.1, %239 ]
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %232, ptr noundef %241)
          to label %243 unwind label %262

243:                                              ; preds = %240
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %242, ptr noundef @.str.2)
          to label %245 unwind label %262

245:                                              ; preds = %243
  %246 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %244, i32 noundef 73)
          to label %247 unwind label %262

247:                                              ; preds = %245
  %248 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %246, ptr noundef @.str)
          to label %249 unwind label %262

249:                                              ; preds = %247
  %250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %248, ptr noundef @.str.7)
          to label %251 unwind label %262

251:                                              ; preds = %249
  %252 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %250, ptr noundef @_ZSt3hexRSt8ios_base)
          to label %253 unwind label %262

253:                                              ; preds = %251
  %254 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %255 = load ptr, ptr %254, align 8, !tbaa !25
  %256 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %255, i32 0, i32 1
  %257 = load i64, ptr %256, align 8, !tbaa !26
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %252, i64 noundef %257)
          to label %259 unwind label %262

259:                                              ; preds = %253
  %260 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %258, ptr noundef @_ZSt3decRSt8ios_base)
          to label %261 unwind label %262

261:                                              ; preds = %259
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %10) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %10) #11
  br label %266

262:                                              ; preds = %259, %253, %251, %249, %247, %245, %243, %240, %231, %228
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %5, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %6, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %10) #11
  call void @llvm.lifetime.end.p0(i64 384, ptr %10) #11
  br label %283

266:                                              ; preds = %261, %225
  %267 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 6
  %268 = load ptr, ptr %267, align 8, !tbaa !25
  %269 = getelementptr inbounds %"class.cascadb::SchemaNode", ptr %268, i32 0, i32 1
  %270 = load i64, ptr %269, align 8, !tbaa !26
  %271 = call noundef ptr @_ZN7cascadb4Tree9load_nodeEmb(ptr noundef nonnull align 8 dereferenceable(184) %11, i64 noundef %270, i1 noundef zeroext false)
  %272 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 7
  store ptr %271, ptr %272, align 8, !tbaa !35
  br label %273

273:                                              ; preds = %266, %208
  %274 = getelementptr inbounds %"class.cascadb::Tree", ptr %11, i32 0, i32 7
  %275 = load ptr, ptr %274, align 8, !tbaa !35
  %276 = icmp ne ptr %275, null
  br i1 %276, label %277, label %278

277:                                              ; preds = %273
  br label %280

278:                                              ; preds = %273
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 77, ptr noundef @__PRETTY_FUNCTION__._ZN7cascadb4Tree4initEv) #15
  unreachable

279:                                              ; No predecessors!
  br label %280

280:                                              ; preds = %279, %277
  store i1 true, ptr %2, align 1
  br label %281

281:                                              ; preds = %280, %102, %47
  %282 = load i1, ptr %2, align 1
  ret i1 %282

283:                                              ; preds = %262, %204, %167, %139, %98, %94, %43
  %284 = load ptr, ptr %5, align 8
  %285 = load i32, ptr %6, align 4
  %286 = insertvalue { ptr, i32 } poison, ptr %284, 0
  %287 = insertvalue { ptr, i32 } %286, i32 %285, 1
  resume { ptr, i32 } %287
}

; 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) #1

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

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

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

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 #5 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

declare noundef zeroext i1 @_ZN7cascadb5Cache9add_tableERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_11NodeFactoryEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef) #4

declare noundef ptr @_ZN7cascadb5Cache3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmb(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i1 noundef zeroext) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb10SchemaNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb4Node9set_dirtyEb(ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) #0 align 2

declare void @_ZN7cascadb5Cache3putERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPNS_4NodeE(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7cascadb4Tree14new_inner_nodeEv(ptr noundef nonnull align 8 dereferenceable(184)) #0 align 2

declare void @_ZN7cascadb9InnerNode15init_empty_rootEv(ptr noundef nonnull align 8 dereferenceable(312)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN7cascadb4Node3nidEv(ptr noundef nonnull align 8 dereferenceable(200)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3hexRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7cascadb4Tree9load_nodeEmb(ptr noundef nonnull align 8 dereferenceable(184), i64 noundef, i1 noundef zeroext) #0 align 2

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

declare void @_ZN7cascadb4Tree15TreeNodeFactoryC1EPS0_(ptr, ptr)

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 #9 = { 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 #10 = { 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 #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin nounwind }
attributes #15 = { 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, !6, i64 40}
!10 = !{!"_ZTSN7cascadb4TreeE", !11, i64 0, !14, i64 32, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN7cascadb7OptionsE", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84, !15, i64 88, !15, i64 92, !16, i64 96, !17, i64 100}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN7cascadb8CompressE", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTSN7cascadb11LoggerLevelE", !7, i64 0}
!20 = !{!10, !16, i64 128}
!21 = !{!10, !6, i64 160}
!22 = !{!10, !6, i64 152}
!23 = !{!10, !6, i64 136}
!24 = !{!10, !6, i64 144}
!25 = !{!10, !6, i64 168}
!26 = !{!27, !13, i64 200}
!27 = !{!"_ZTSN7cascadb10SchemaNodeE", !28, i64 0, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224}
!28 = !{!"_ZTSN7cascadb4NodeE", !11, i64 8, !13, i64 40, !29, i64 48, !17, i64 96, !17, i64 97, !17, i64 98, !30, i64 104, !30, i64 120, !15, i64 136, !15, i64 140, !31, i64 144}
!29 = !{!"_ZTSN7cascadb5MutexE", !17, i64 0, !7, i64 8}
!30 = !{!"_ZTS7timeval", !13, i64 0, !13, i64 8}
!31 = !{!"_ZTSN7cascadb6RWLockE", !7, i64 0}
!32 = !{!27, !13, i64 208}
!33 = !{!27, !13, i64 216}
!34 = !{!27, !13, i64 224}
!35 = !{!10, !6, i64 176}


; 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.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 }

@_ZN7cascadb14g_logger_levelE = external local_unnamed_addr global i32, align 4
@_ZN7cascadb8g_loggerE = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN7cascadb4Tree4initEv = external hidden unnamed_addr constant [27 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb4Tree4initEv(ptr noundef nonnull align 8 dereferenceable(184) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.cascadb::LoggerFormat", align 8
  %3 = alloca %"class.cascadb::LoggerFormat", align 8
  %4 = alloca %"class.cascadb::LoggerFormat", align 8
  %5 = alloca %"class.cascadb::LoggerFormat", align 8
  %6 = alloca %"class.cascadb::LoggerFormat", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %33

10:                                               ; preds = %1
  %11 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !17
  %12 = icmp slt i32 %11, 4
  br i1 %12, label %13, label %186

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %2) #10
  %14 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !19
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %2, ptr noundef %14)
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %2, i32 noundef 3)
          to label %16 unwind label %31

16:                                               ; preds = %13
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @.str)
          to label %18 unwind label %31

18:                                               ; preds = %16
  %19 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #11
  %.not14 = icmp eq ptr %19, null
  %20 = getelementptr inbounds i8, ptr %19, i64 1
  %spec.select = select i1 %.not14, ptr @.str.1, ptr %20
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull %spec.select)
          to label %22 unwind label %31

22:                                               ; preds = %18
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.2)
          to label %24 unwind label %31

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef 33)
          to label %26 unwind label %31

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str)
          to label %28 unwind label %31

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull @.str.3)
          to label %30 unwind label %31

30:                                               ; preds = %28
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %2) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %2) #10
  br label %186

31:                                               ; preds = %28, %26, %24, %22, %18, %16, %13
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %2) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %2) #10
  br label %187

33:                                               ; preds = %1
  %34 = getelementptr inbounds i8, ptr %0, i64 128
  %35 = load i32, ptr %34, align 8, !tbaa !20
  %cond = icmp eq i32 %35, 1
  br i1 %cond, label %36, label %39

36:                                               ; preds = %33
  %37 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #12
  store i64 0, ptr %37, align 8
  tail call void @_ZN7cascadb16SnappyCompressorC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #10
  %38 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %37, ptr %38, align 8, !tbaa !21
  br label %39

39:                                               ; preds = %33, %36
  %40 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #12
  invoke void @_ZN7cascadb4Tree15TreeNodeFactoryC1EPS0_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull %0)
          to label %41 unwind label %69

41:                                               ; preds = %39
  %42 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %40, ptr %42, align 8, !tbaa !22
  %43 = getelementptr inbounds i8, ptr %0, i64 136
  %44 = load ptr, ptr %43, align 8, !tbaa !23
  %45 = getelementptr inbounds i8, ptr %0, i64 144
  %46 = load ptr, ptr %45, align 8, !tbaa !24
  %47 = tail call noundef zeroext i1 @_ZN7cascadb5Cache9add_tableERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_11NodeFactoryEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(432) %44, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %40, ptr noundef %46)
  br i1 %47, label %73, label %48

48:                                               ; preds = %41
  %49 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !17
  %50 = icmp slt i32 %49, 4
  br i1 %50, label %51, label %186

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %3) #10
  %52 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !19
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %3, ptr noundef %52)
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %3, i32 noundef 3)
          to label %54 unwind label %71

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

56:                                               ; preds = %54
  %57 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #11
  %.not = icmp eq ptr %57, null
  %58 = getelementptr inbounds i8, ptr %57, i64 1
  %spec.select16 = select i1 %.not, ptr @.str.1, ptr %58
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull %spec.select16)
          to label %60 unwind label %71

60:                                               ; preds = %56
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.2)
          to label %62 unwind label %71

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %61, i32 noundef 47)
          to label %64 unwind label %71

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull @.str)
          to label %66 unwind label %71

66:                                               ; preds = %64
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @.str.4)
          to label %68 unwind label %71

68:                                               ; preds = %66
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %3) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %3) #10
  br label %186

69:                                               ; preds = %39
  %70 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %40, i64 noundef 16) #13
  br label %187

71:                                               ; preds = %66, %64, %62, %60, %56, %54, %51
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %3) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %3) #10
  br label %187

73:                                               ; preds = %41
  %74 = load ptr, ptr %43, align 8, !tbaa !23
  %75 = tail call noundef ptr @_ZN7cascadb5Cache3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmb(ptr noundef nonnull align 8 dereferenceable(432) %74, ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 1, i1 noundef zeroext false)
  %76 = getelementptr inbounds i8, ptr %0, i64 168
  store ptr %75, ptr %76, align 8, !tbaa !25
  %77 = icmp eq ptr %75, null
  br i1 %77, label %78, label %112

78:                                               ; preds = %73
  %79 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !17
  %80 = icmp slt i32 %79, 2
  br i1 %80, label %81, label %101

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %4) #10
  %82 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !19
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %4, ptr noundef %82)
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %4, i32 noundef 1)
          to label %84 unwind label %99

84:                                               ; preds = %81
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str)
          to label %86 unwind label %99

86:                                               ; preds = %84
  %87 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #11
  %.not10 = icmp eq ptr %87, null
  %88 = getelementptr inbounds i8, ptr %87, i64 1
  %spec.select17 = select i1 %.not10, ptr @.str.1, ptr %88
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull %spec.select17)
          to label %90 unwind label %99

90:                                               ; preds = %86
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull @.str.2)
          to label %92 unwind label %99

92:                                               ; preds = %90
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %91, i32 noundef 53)
          to label %94 unwind label %99

94:                                               ; preds = %92
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @.str)
          to label %96 unwind label %99

96:                                               ; preds = %94
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @.str.5)
          to label %98 unwind label %99

98:                                               ; preds = %96
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %4) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %4) #10
  br label %101

99:                                               ; preds = %96, %94, %92, %90, %86, %84, %81
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %4) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %4) #10
  br label %187

101:                                              ; preds = %98, %78
  %102 = call noalias noundef nonnull dereferenceable(232) ptr @_Znwm(i64 noundef 232) #12
  invoke void @_ZN7cascadb10SchemaNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(232) %102, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %103 unwind label %110

103:                                              ; preds = %101
  store ptr %102, ptr %76, align 8, !tbaa !25
  %104 = getelementptr inbounds i8, ptr %102, i64 200
  store i64 0, ptr %104, align 8, !tbaa !26
  %105 = getelementptr inbounds i8, ptr %102, i64 208
  store i64 2, ptr %105, align 8, !tbaa !32
  %106 = getelementptr inbounds i8, ptr %102, i64 216
  store i64 281474976710657, ptr %106, align 8, !tbaa !33
  %107 = getelementptr inbounds i8, ptr %102, i64 224
  store i64 2, ptr %107, align 8, !tbaa !34
  call void @_ZN7cascadb4Node9set_dirtyEb(ptr noundef nonnull align 8 dereferenceable(200) %102, i1 noundef zeroext true)
  %108 = load ptr, ptr %43, align 8, !tbaa !23
  %109 = load ptr, ptr %76, align 8, !tbaa !25
  call void @_ZN7cascadb5Cache3putERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPNS_4NodeE(ptr noundef nonnull align 8 dereferenceable(432) %108, ptr noundef nonnull align 8 dereferenceable(32) %0, i64 noundef 1, ptr noundef %109)
  %.pre = load ptr, ptr %76, align 8, !tbaa !25
  br label %112

110:                                              ; preds = %101
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %102, i64 noundef 232) #13
  br label %187

112:                                              ; preds = %103, %73
  %113 = phi ptr [ %.pre, %103 ], [ %75, %73 ]
  %114 = getelementptr inbounds i8, ptr %113, i64 200
  %115 = load i64, ptr %114, align 8, !tbaa !26
  %116 = icmp eq i64 %115, 0
  %117 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !17
  %118 = icmp slt i32 %117, 2
  br i1 %116, label %119, label %149

119:                                              ; preds = %112
  br i1 %118, label %120, label %140

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %5) #10
  %121 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !19
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %5, ptr noundef %121)
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %5, i32 noundef 1)
          to label %123 unwind label %138

123:                                              ; preds = %120
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull @.str)
          to label %125 unwind label %138

125:                                              ; preds = %123
  %126 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #11
  %.not12 = icmp eq ptr %126, null
  %127 = getelementptr inbounds i8, ptr %126, i64 1
  %spec.select18 = select i1 %.not12, ptr @.str.1, ptr %127
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull %spec.select18)
          to label %129 unwind label %138

129:                                              ; preds = %125
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull @.str.2)
          to label %131 unwind label %138

131:                                              ; preds = %129
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %130, i32 noundef 64)
          to label %133 unwind label %138

133:                                              ; preds = %131
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef nonnull @.str)
          to label %135 unwind label %138

135:                                              ; preds = %133
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull @.str.6)
          to label %137 unwind label %138

137:                                              ; preds = %135
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %5) #10
  br label %140

138:                                              ; preds = %135, %133, %131, %129, %125, %123, %120
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %5) #10
  br label %187

140:                                              ; preds = %137, %119
  %141 = call noundef ptr @_ZN7cascadb4Tree14new_inner_nodeEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  %142 = getelementptr inbounds i8, ptr %0, i64 176
  store ptr %141, ptr %142, align 8, !tbaa !35
  call void @_ZN7cascadb9InnerNode15init_empty_rootEv(ptr noundef nonnull align 8 dereferenceable(312) %141)
  %143 = load ptr, ptr %76, align 8, !tbaa !25
  call void @_ZN7cascadb4Node10write_lockEv(ptr noundef nonnull align 8 dereferenceable(200) %143)
  %144 = load ptr, ptr %142, align 8, !tbaa !35
  %145 = call noundef i64 @_ZN7cascadb4Node3nidEv(ptr noundef nonnull align 8 dereferenceable(200) %144)
  %146 = load ptr, ptr %76, align 8, !tbaa !25
  %147 = getelementptr inbounds i8, ptr %146, i64 200
  store i64 %145, ptr %147, align 8, !tbaa !26
  call void @_ZN7cascadb4Node9set_dirtyEb(ptr noundef nonnull align 8 dereferenceable(200) %146, i1 noundef zeroext true)
  %148 = load ptr, ptr %76, align 8, !tbaa !25
  call void @_ZN7cascadb4Node6unlockEv(ptr noundef nonnull align 8 dereferenceable(200) %148)
  %.pre23 = load ptr, ptr %142, align 8, !tbaa !35
  br label %183

149:                                              ; preds = %112
  br i1 %118, label %150, label %179

150:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %6) #10
  %151 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !19
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %6, ptr noundef %151)
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %6, i32 noundef 1)
          to label %153 unwind label %177

153:                                              ; preds = %150
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef nonnull @.str)
          to label %155 unwind label %177

155:                                              ; preds = %153
  %156 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #11
  %.not11 = icmp eq ptr %156, null
  %157 = getelementptr inbounds i8, ptr %156, i64 1
  %spec.select19 = select i1 %.not11, ptr @.str.1, ptr %157
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull %spec.select19)
          to label %159 unwind label %177

159:                                              ; preds = %155
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef nonnull @.str.2)
          to label %161 unwind label %177

161:                                              ; preds = %159
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %160, i32 noundef 73)
          to label %163 unwind label %177

163:                                              ; preds = %161
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull @.str)
          to label %165 unwind label %177

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull @.str.7)
          to label %167 unwind label %177

167:                                              ; preds = %165
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
          to label %169 unwind label %177

169:                                              ; preds = %167
  %170 = load ptr, ptr %76, align 8, !tbaa !25
  %171 = getelementptr inbounds i8, ptr %170, i64 200
  %172 = load i64, ptr %171, align 8, !tbaa !26
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %168, i64 noundef %172)
          to label %174 unwind label %177

174:                                              ; preds = %169
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %176 unwind label %177

176:                                              ; preds = %174
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %6) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %6) #10
  %.pre20 = load ptr, ptr %76, align 8, !tbaa !25
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre20, i64 200
  %.pre21 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !26
  br label %179

177:                                              ; preds = %174, %169, %167, %165, %163, %161, %159, %155, %153, %150
  %178 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %6) #10
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %6) #10
  br label %187

179:                                              ; preds = %176, %149
  %180 = phi i64 [ %.pre21, %176 ], [ %115, %149 ]
  %181 = call noundef ptr @_ZN7cascadb4Tree9load_nodeEmb(ptr noundef nonnull align 8 dereferenceable(184) %0, i64 noundef %180, i1 noundef zeroext false)
  %182 = getelementptr inbounds i8, ptr %0, i64 176
  store ptr %181, ptr %182, align 8, !tbaa !35
  br label %183

183:                                              ; preds = %179, %140
  %184 = phi ptr [ %181, %179 ], [ %.pre23, %140 ]
  %.not13 = icmp eq ptr %184, null
  br i1 %.not13, label %185, label %186

185:                                              ; preds = %183
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 77, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7cascadb4Tree4initEv) #14
  unreachable

186:                                              ; preds = %183, %48, %68, %10, %30
  %.04 = phi i1 [ false, %30 ], [ false, %10 ], [ false, %68 ], [ false, %48 ], [ true, %183 ]
  ret i1 %.04

187:                                              ; preds = %177, %138, %110, %99, %71, %69, %31
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %139, %138 ], [ %178, %177 ], [ %111, %110 ], [ %100, %99 ], [ %72, %71 ], [ %70, %69 ]
  resume { ptr, i32 } %.pn
}

; 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) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare noundef ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

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

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

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

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

declare noundef zeroext i1 @_ZN7cascadb5Cache9add_tableERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_11NodeFactoryEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef) local_unnamed_addr #4

declare noundef ptr @_ZN7cascadb5Cache3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmb(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb10SchemaNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb4Node9set_dirtyEb(ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) local_unnamed_addr #0 align 2

declare void @_ZN7cascadb5Cache3putERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPNS_4NodeE(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7cascadb4Tree14new_inner_nodeEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #0 align 2

declare void @_ZN7cascadb9InnerNode15init_empty_rootEv(ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb4Node10write_lockEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN7cascadb4Node3nidEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb4Node6unlockEv(ptr noundef nonnull align 8 dereferenceable(200)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3hexRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7cascadb4Tree9load_nodeEmb(ptr noundef nonnull align 8 dereferenceable(184), i64 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

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

declare void @_ZN7cascadb4Tree15TreeNodeFactoryC1EPS0_(ptr, ptr) local_unnamed_addr

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: 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 #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 = { 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 = { 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 #7 = { 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin nounwind }
attributes #14 = { 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, !9, i64 40}
!6 = !{!"_ZTSN7cascadb4TreeE", !7, i64 0, !13, i64 32, !9, i64 136, !9, i64 144, !9, i64 152, !9, i64 160, !9, i64 168, !9, i64 176}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSN7cascadb7OptionsE", !9, i64 0, !9, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !15, i64 96, !16, i64 100}
!14 = !{!"int", !10, i64 0}
!15 = !{!"_ZTSN7cascadb8CompressE", !10, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTSN7cascadb11LoggerLevelE", !10, i64 0}
!19 = !{!9, !9, i64 0}
!20 = !{!6, !15, i64 128}
!21 = !{!6, !9, i64 160}
!22 = !{!6, !9, i64 152}
!23 = !{!6, !9, i64 136}
!24 = !{!6, !9, i64 144}
!25 = !{!6, !9, i64 168}
!26 = !{!27, !12, i64 200}
!27 = !{!"_ZTSN7cascadb10SchemaNodeE", !28, i64 0, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224}
!28 = !{!"_ZTSN7cascadb4NodeE", !7, i64 8, !12, i64 40, !29, i64 48, !16, i64 96, !16, i64 97, !16, i64 98, !30, i64 104, !30, i64 120, !14, i64 136, !14, i64 140, !31, i64 144}
!29 = !{!"_ZTSN7cascadb5MutexE", !16, i64 0, !10, i64 8}
!30 = !{!"_ZTS7timeval", !12, i64 0, !12, i64 8}
!31 = !{!"_ZTSN7cascadb6RWLockE", !10, i64 0}
!32 = !{!27, !12, i64 208}
!33 = !{!27, !12, i64 216}
!34 = !{!27, !12, i64 224}
!35 = !{!6, !9, i64 176}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass