; LLVM IR from weicao/cascadb :: src/db/db_impl.ll (ZN7cascadb6DBImpl4initEv)

; 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::DBImpl" = type { %"class.cascadb::DB", %"class.std::__cxx11::basic_string", %"class.cascadb::Options", ptr, ptr, ptr, ptr }
%"class.cascadb::DB" = type { 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] }>

@_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 [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb6DBImpl4initEv(ptr noundef nonnull align 8 dereferenceable(176) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.cascadb::LoggerFormat", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.cascadb::LoggerFormat", align 8
  %14 = alloca %"class.cascadb::LoggerFormat", align 8
  %15 = alloca %"class.cascadb::LoggerFormat", align 8
  %16 = alloca %"class.cascadb::LoggerFormat", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %18 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 2
  %19 = getelementptr inbounds %"class.cascadb::Options", ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  store ptr %20, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %55, label %23

23:                                               ; preds = %1
  %24 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !19
  %25 = icmp sge i32 3, %24
  br i1 %25, label %26, label %54

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 384, ptr %5) #8
  %27 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %5, ptr noundef %27)
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %5, i32 noundef 3)
          to label %29 unwind label %50

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

31:                                               ; preds = %29
  %32 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %37

34:                                               ; preds = %31
  %35 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %36 = getelementptr inbounds i8, ptr %35, i64 1
  br label %38

37:                                               ; preds = %31
  br label %38

38:                                               ; preds = %37, %34
  %39 = phi ptr [ %36, %34 ], [ @.str.1, %37 ]
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef %39)
          to label %41 unwind label %50

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

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 27)
          to label %45 unwind label %50

45:                                               ; preds = %43
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @.str)
          to label %47 unwind label %50

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

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

50:                                               ; preds = %47, %45, %43, %41, %38, %29, %26
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #8
  call void @llvm.lifetime.end.p0(i64 384, ptr %5) #8
  br label %308

54:                                               ; preds = %49, %23
  store i1 false, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %306

55:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  %56 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 1
  call void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef @.str.4)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.5)
          to label %57 unwind label %74

57:                                               ; preds = %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 0, ptr %11, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #8
  store i8 1, ptr %12, align 1, !tbaa !22
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load ptr, ptr %58, align 8, !tbaa !23
  %60 = getelementptr inbounds ptr, ptr %59, i64 2
  %61 = load ptr, ptr %60, align 8
  %62 = invoke noundef zeroext i1 %61(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %63 unwind label %78

63:                                               ; preds = %57
  br i1 %62, label %64, label %83

64:                                               ; preds = %63
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %65, align 8, !tbaa !23
  %67 = getelementptr inbounds ptr, ptr %66, i64 6
  %68 = load ptr, ptr %67, align 8
  %69 = invoke noundef i64 %68(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %70 unwind label %78

70:                                               ; preds = %64
  store i64 %69, ptr %11, align 8, !tbaa !21
  %71 = load i64, ptr %11, align 8, !tbaa !21
  %72 = icmp ugt i64 %71, 0
  br i1 %72, label %73, label %82

73:                                               ; preds = %70
  store i8 0, ptr %12, align 1, !tbaa !22
  br label %82

74:                                               ; preds = %55
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  br label %305

78:                                               ; preds = %254, %245, %197, %193, %143, %135, %129, %64, %57
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %6, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %7, align 4
  br label %304

82:                                               ; preds = %73, %70
  br label %83

83:                                               ; preds = %82, %63
  %84 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !19
  %85 = icmp sge i32 1, %84
  br i1 %85, label %86, label %129

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 384, ptr %13) #8
  %87 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %13, ptr noundef %87)
          to label %88 unwind label %120

88:                                               ; preds = %86
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %13, i32 noundef 1)
          to label %90 unwind label %124

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

92:                                               ; preds = %90
  %93 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %98

95:                                               ; preds = %92
  %96 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %97 = getelementptr inbounds i8, ptr %96, i64 1
  br label %99

98:                                               ; preds = %92
  br label %99

99:                                               ; preds = %98, %95
  %100 = phi ptr [ %97, %95 ], [ @.str.1, %98 ]
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef %100)
          to label %102 unwind label %124

102:                                              ; preds = %99
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @.str.2)
          to label %104 unwind label %124

104:                                              ; preds = %102
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %103, i32 noundef 40)
          to label %106 unwind label %124

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @.str)
          to label %108 unwind label %124

108:                                              ; preds = %106
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @.str.6)
          to label %110 unwind label %124

110:                                              ; preds = %108
  %111 = load i64, ptr %11, align 8, !tbaa !21
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %109, i64 noundef %111)
          to label %113 unwind label %124

113:                                              ; preds = %110
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @.str.7)
          to label %115 unwind label %124

115:                                              ; preds = %113
  %116 = load i8, ptr %12, align 1, !tbaa !22, !range !25, !noundef !26
  %117 = trunc i8 %116 to i1
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %114, i1 noundef zeroext %117)
          to label %119 unwind label %124

119:                                              ; preds = %115
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %13) #8
  call void @llvm.lifetime.end.p0(i64 384, ptr %13) #8
  br label %129

120:                                              ; preds = %86
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %6, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %7, align 4
  br label %128

124:                                              ; preds = %115, %113, %110, %108, %106, %104, %102, %99, %90, %88
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %6, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %7, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %13) #8
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 384, ptr %13) #8
  br label %304

129:                                              ; preds = %119, %83
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = load ptr, ptr %130, align 8, !tbaa !23
  %132 = getelementptr inbounds ptr, ptr %131, i64 5
  %133 = load ptr, ptr %132, align 8
  %134 = invoke noundef ptr %133(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %135 unwind label %78

135:                                              ; preds = %129
  %136 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 3
  store ptr %134, ptr %136, align 8, !tbaa !27
  %137 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 600) #10
          to label %138 unwind label %78

138:                                              ; preds = %135
  %139 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 3
  %140 = load ptr, ptr %139, align 8, !tbaa !27
  %141 = load i64, ptr %11, align 8, !tbaa !21
  %142 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 2
  invoke void @_ZN7cascadb6LayoutC1EPNS_7AIOFileEmRKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(600) %137, ptr noundef %140, i64 noundef %141, ptr noundef nonnull align 8 dereferenceable(101) %142)
          to label %143 unwind label %179

143:                                              ; preds = %138
  %144 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 4
  store ptr %137, ptr %144, align 8, !tbaa !28
  %145 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !28
  %147 = load i8, ptr %12, align 1, !tbaa !22, !range !25, !noundef !26
  %148 = trunc i8 %147 to i1
  %149 = invoke noundef zeroext i1 @_ZN7cascadb6Layout4initEb(ptr noundef nonnull align 8 dereferenceable(600) %146, i1 noundef zeroext %148)
          to label %150 unwind label %78

150:                                              ; preds = %143
  br i1 %149, label %193, label %151

151:                                              ; preds = %150
  %152 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !19
  %153 = icmp sge i32 3, %152
  br i1 %153, label %154, label %192

154:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 384, ptr %14) #8
  %155 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %14, ptr noundef %155)
          to label %156 unwind label %183

156:                                              ; preds = %154
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %14, i32 noundef 3)
          to label %158 unwind label %187

158:                                              ; preds = %156
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef @.str)
          to label %160 unwind label %187

160:                                              ; preds = %158
  %161 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %166

163:                                              ; preds = %160
  %164 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %165 = getelementptr inbounds i8, ptr %164, i64 1
  br label %167

166:                                              ; preds = %160
  br label %167

167:                                              ; preds = %166, %163
  %168 = phi ptr [ %165, %163 ], [ @.str.1, %166 ]
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef %168)
          to label %170 unwind label %187

170:                                              ; preds = %167
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef @.str.2)
          to label %172 unwind label %187

172:                                              ; preds = %170
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %171, i32 noundef 45)
          to label %174 unwind label %187

174:                                              ; preds = %172
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef @.str)
          to label %176 unwind label %187

176:                                              ; preds = %174
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef @.str.8)
          to label %178 unwind label %187

178:                                              ; preds = %176
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %14) #8
  call void @llvm.lifetime.end.p0(i64 384, ptr %14) #8
  br label %192

179:                                              ; preds = %138
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %6, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %137, i64 noundef 600) #11
  br label %304

183:                                              ; preds = %154
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %6, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %7, align 4
  br label %191

187:                                              ; preds = %176, %174, %172, %170, %167, %158, %156
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %6, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %7, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %14) #8
  br label %191

191:                                              ; preds = %187, %183
  call void @llvm.lifetime.end.p0(i64 384, ptr %14) #8
  br label %304

192:                                              ; preds = %178, %151
  store i1 false, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %303

193:                                              ; preds = %150
  %194 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #10
          to label %195 unwind label %78

195:                                              ; preds = %193
  %196 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 2
  invoke void @_ZN7cascadb5CacheC1ERKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(432) %194, ptr noundef nonnull align 8 dereferenceable(101) %196)
          to label %197 unwind label %231

197:                                              ; preds = %195
  %198 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 5
  store ptr %194, ptr %198, align 8, !tbaa !29
  %199 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 5
  %200 = load ptr, ptr %199, align 8, !tbaa !29
  %201 = invoke noundef zeroext i1 @_ZN7cascadb5Cache4initEv(ptr noundef nonnull align 8 dereferenceable(432) %200)
          to label %202 unwind label %78

202:                                              ; preds = %197
  br i1 %201, label %245, label %203

203:                                              ; preds = %202
  %204 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !19
  %205 = icmp sge i32 3, %204
  br i1 %205, label %206, label %244

206:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 384, ptr %15) #8
  %207 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %15, ptr noundef %207)
          to label %208 unwind label %235

208:                                              ; preds = %206
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %15, i32 noundef 3)
          to label %210 unwind label %239

210:                                              ; preds = %208
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef @.str)
          to label %212 unwind label %239

212:                                              ; preds = %210
  %213 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %214 = icmp ne ptr %213, null
  br i1 %214, label %215, label %218

215:                                              ; preds = %212
  %216 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %217 = getelementptr inbounds i8, ptr %216, i64 1
  br label %219

218:                                              ; preds = %212
  br label %219

219:                                              ; preds = %218, %215
  %220 = phi ptr [ %217, %215 ], [ @.str.1, %218 ]
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %211, ptr noundef %220)
          to label %222 unwind label %239

222:                                              ; preds = %219
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef @.str.2)
          to label %224 unwind label %239

224:                                              ; preds = %222
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %223, i32 noundef 51)
          to label %226 unwind label %239

226:                                              ; preds = %224
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @.str)
          to label %228 unwind label %239

228:                                              ; preds = %226
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %227, ptr noundef @.str.9)
          to label %230 unwind label %239

230:                                              ; preds = %228
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %15) #8
  call void @llvm.lifetime.end.p0(i64 384, ptr %15) #8
  br label %244

231:                                              ; preds = %195
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %6, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %194, i64 noundef 432) #11
  br label %304

235:                                              ; preds = %206
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %6, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %7, align 4
  br label %243

239:                                              ; preds = %228, %226, %224, %222, %219, %210, %208
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %6, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %7, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %15) #8
  br label %243

243:                                              ; preds = %239, %235
  call void @llvm.lifetime.end.p0(i64 384, ptr %15) #8
  br label %304

244:                                              ; preds = %230, %203
  store i1 false, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %303

245:                                              ; preds = %202
  %246 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 184) #10
          to label %247 unwind label %78

247:                                              ; preds = %245
  %248 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 1
  %249 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 2
  %250 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 5
  %251 = load ptr, ptr %250, align 8, !tbaa !29
  %252 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 4
  %253 = load ptr, ptr %252, align 8, !tbaa !28
  invoke void @_ZN7cascadb4TreeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsEPNS_5CacheEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(184) %246, ptr noundef nonnull align 8 dereferenceable(32) %248, ptr noundef nonnull align 8 dereferenceable(101) %249, ptr noundef %251, ptr noundef %253)
          to label %254 unwind label %288

254:                                              ; preds = %247
  %255 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 6
  store ptr %246, ptr %255, align 8, !tbaa !30
  %256 = getelementptr inbounds %"class.cascadb::DBImpl", ptr %17, i32 0, i32 6
  %257 = load ptr, ptr %256, align 8, !tbaa !30
  %258 = invoke noundef zeroext i1 @_ZN7cascadb4Tree4initEv(ptr noundef nonnull align 8 dereferenceable(184) %257)
          to label %259 unwind label %78

259:                                              ; preds = %254
  br i1 %258, label %302, label %260

260:                                              ; preds = %259
  %261 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !19
  %262 = icmp sge i32 3, %261
  br i1 %262, label %263, label %301

263:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 384, ptr %16) #8
  %264 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %16, ptr noundef %264)
          to label %265 unwind label %292

265:                                              ; preds = %263
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %16, i32 noundef 3)
          to label %267 unwind label %296

267:                                              ; preds = %265
  %268 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %266, ptr noundef @.str)
          to label %269 unwind label %296

269:                                              ; preds = %267
  %270 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %271 = icmp ne ptr %270, null
  br i1 %271, label %272, label %275

272:                                              ; preds = %269
  %273 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #9
  %274 = getelementptr inbounds i8, ptr %273, i64 1
  br label %276

275:                                              ; preds = %269
  br label %276

276:                                              ; preds = %275, %272
  %277 = phi ptr [ %274, %272 ], [ @.str.1, %275 ]
  %278 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %268, ptr noundef %277)
          to label %279 unwind label %296

279:                                              ; preds = %276
  %280 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %278, ptr noundef @.str.2)
          to label %281 unwind label %296

281:                                              ; preds = %279
  %282 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %280, i32 noundef 57)
          to label %283 unwind label %296

283:                                              ; preds = %281
  %284 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %282, ptr noundef @.str)
          to label %285 unwind label %296

285:                                              ; preds = %283
  %286 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %284, ptr noundef @.str.10)
          to label %287 unwind label %296

287:                                              ; preds = %285
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %16) #8
  call void @llvm.lifetime.end.p0(i64 384, ptr %16) #8
  br label %301

288:                                              ; preds = %247
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %6, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %246, i64 noundef 184) #11
  br label %304

292:                                              ; preds = %263
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %6, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %7, align 4
  br label %300

296:                                              ; preds = %285, %283, %281, %279, %276, %267, %265
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %6, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %7, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %16) #8
  br label %300

300:                                              ; preds = %296, %292
  call void @llvm.lifetime.end.p0(i64 384, ptr %16) #8
  br label %304

301:                                              ; preds = %287, %260
  store i1 false, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %303

302:                                              ; preds = %259
  store i1 true, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %303

303:                                              ; preds = %302, %301, %244, %192
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %306

304:                                              ; preds = %300, %288, %243, %231, %191, %179, %128, %78
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %305

305:                                              ; preds = %304, %74
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %308

306:                                              ; preds = %303, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  %307 = load i1, ptr %2, align 1
  ret i1 %307

308:                                              ; preds = %305, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %309

309:                                              ; preds = %308
  %310 = load ptr, ptr %6, align 8
  %311 = load i32, ptr %7, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #2 align 2

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

declare void @_ZN7cascadb6LayoutC1EPNS_7AIOFileEmRKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(101)) unnamed_addr #6

declare noundef zeroext i1 @_ZN7cascadb6Layout4initEb(ptr noundef nonnull align 8 dereferenceable(600), i1 noundef zeroext) #6

declare void @_ZN7cascadb5CacheC1ERKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(101)) unnamed_addr #6

declare noundef zeroext i1 @_ZN7cascadb5Cache4initEv(ptr noundef nonnull align 8 dereferenceable(432)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb4TreeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsEPNS_5CacheEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(101), ptr noundef, ptr noundef) unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN7cascadb4Tree4initEv(ptr noundef nonnull align 8 dereferenceable(184)) #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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, !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 = !{!"_ZTSN7cascadb6DBImplE", !11, i64 0, !12, i64 8, !15, i64 40, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168}
!11 = !{!"_ZTSN7cascadb2DBE"}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN7cascadb7OptionsE", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !16, i64 72, !16, i64 76, !16, i64 80, !16, i64 84, !16, i64 88, !16, i64 92, !17, i64 96, !18, i64 100}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN7cascadb8CompressE", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"_ZTSN7cascadb11LoggerLevelE", !7, i64 0}
!21 = !{!14, !14, i64 0}
!22 = !{!18, !18, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!10, !6, i64 144}
!28 = !{!10, !6, i64 152}
!29 = !{!10, !6, i64 160}
!30 = !{!10, !6, i64 168}


; 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 [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

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

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

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

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

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

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

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

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

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

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

32:                                               ; preds = %29, %27, %25, %23, %19, %17, %14
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %2) #8
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %2) #8
  br label %205

34:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull @.str.4)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.5)
          to label %36 unwind label %48

36:                                               ; preds = %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  %37 = load ptr, ptr %10, align 8, !tbaa !21
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef zeroext i1 %39(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %41 unwind label %50

41:                                               ; preds = %36
  br i1 %40, label %42, label %52

42:                                               ; preds = %41
  %43 = load ptr, ptr %10, align 8, !tbaa !21
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = load ptr, ptr %44, align 8
  %46 = invoke noundef i64 %45(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %47 unwind label %50

47:                                               ; preds = %42
  %.not32 = icmp eq i64 %46, 0
  br label %52

48:                                               ; preds = %34
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %203

50:                                               ; preds = %168, %163, %130, %127, %94, %90, %85, %42, %36
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %202

52:                                               ; preds = %47, %41
  %.012 = phi i64 [ 0, %41 ], [ %46, %47 ]
  %.0 = phi i1 [ true, %41 ], [ %.not32, %47 ]
  %53 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %54 = icmp slt i32 %53, 2
  br i1 %54, label %55, label %85

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %5) #8
  %56 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !20
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %5, ptr noundef %56)
          to label %57 unwind label %80

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %5, i32 noundef 1)
          to label %59 unwind label %82

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @.str)
          to label %61 unwind label %82

61:                                               ; preds = %59
  %62 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #9
  %.not33 = icmp eq ptr %62, null
  %63 = getelementptr inbounds i8, ptr %62, i64 1
  %spec.select49 = select i1 %.not33, ptr @.str.1, ptr %63
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull %spec.select49)
          to label %65 unwind label %82

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

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %66, i32 noundef 40)
          to label %69 unwind label %82

69:                                               ; preds = %67
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @.str)
          to label %71 unwind label %82

71:                                               ; preds = %69
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull @.str.6)
          to label %73 unwind label %82

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %72, i64 noundef %.012)
          to label %75 unwind label %82

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @.str.7)
          to label %77 unwind label %82

77:                                               ; preds = %75
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %76, i1 noundef zeroext %.0)
          to label %79 unwind label %82

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

80:                                               ; preds = %55
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %77, %75, %73, %71, %69, %67, %65, %61, %59, %57
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #8
  br label %84

84:                                               ; preds = %82, %80
  %.pn = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %5) #8
  br label %202

85:                                               ; preds = %79, %52
  %86 = load ptr, ptr %10, align 8, !tbaa !21
  %87 = getelementptr inbounds i8, ptr %86, i64 40
  %88 = load ptr, ptr %87, align 8
  %89 = invoke noundef ptr %88(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %90 unwind label %50

90:                                               ; preds = %85
  %91 = getelementptr inbounds i8, ptr %0, i64 144
  store ptr %89, ptr %91, align 8, !tbaa !23
  %92 = invoke noalias noundef nonnull dereferenceable(600) ptr @_Znwm(i64 noundef 600) #10
          to label %93 unwind label %50

93:                                               ; preds = %90
  invoke void @_ZN7cascadb6LayoutC1EPNS_7AIOFileEmRKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(600) %92, ptr noundef %89, i64 noundef %.012, ptr noundef nonnull align 8 dereferenceable(101) %9)
          to label %94 unwind label %120

94:                                               ; preds = %93
  %95 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %92, ptr %95, align 8, !tbaa !24
  %96 = invoke noundef zeroext i1 @_ZN7cascadb6Layout4initEb(ptr noundef nonnull align 8 dereferenceable(600) %92, i1 noundef zeroext %.0)
          to label %97 unwind label %50

97:                                               ; preds = %94
  br i1 %96, label %127, label %98

98:                                               ; preds = %97
  %99 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %100 = icmp slt i32 %99, 4
  br i1 %100, label %101, label %201

101:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %6) #8
  %102 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !20
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %6, ptr noundef %102)
          to label %103 unwind label %122

103:                                              ; preds = %101
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %6, i32 noundef 3)
          to label %105 unwind label %124

105:                                              ; preds = %103
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @.str)
          to label %107 unwind label %124

107:                                              ; preds = %105
  %108 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #9
  %.not35 = icmp eq ptr %108, null
  %109 = getelementptr inbounds i8, ptr %108, i64 1
  %spec.select50 = select i1 %.not35, ptr @.str.1, ptr %109
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull %spec.select50)
          to label %111 unwind label %124

111:                                              ; preds = %107
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef nonnull @.str.2)
          to label %113 unwind label %124

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %112, i32 noundef 45)
          to label %115 unwind label %124

115:                                              ; preds = %113
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef nonnull @.str)
          to label %117 unwind label %124

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

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

120:                                              ; preds = %93
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %92, i64 noundef 600) #11
  br label %202

122:                                              ; preds = %101
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %126

124:                                              ; preds = %117, %115, %113, %111, %107, %105, %103
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %6) #8
  br label %126

126:                                              ; preds = %124, %122
  %.pn36 = phi { ptr, i32 } [ %125, %124 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %6) #8
  br label %202

127:                                              ; preds = %97
  %128 = invoke noalias noundef nonnull dereferenceable(432) ptr @_Znwm(i64 noundef 432) #10
          to label %129 unwind label %50

129:                                              ; preds = %127
  invoke void @_ZN7cascadb5CacheC1ERKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(432) %128, ptr noundef nonnull align 8 dereferenceable(101) %9)
          to label %130 unwind label %156

130:                                              ; preds = %129
  %131 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %128, ptr %131, align 8, !tbaa !25
  %132 = invoke noundef zeroext i1 @_ZN7cascadb5Cache4initEv(ptr noundef nonnull align 8 dereferenceable(432) %128)
          to label %133 unwind label %50

133:                                              ; preds = %130
  br i1 %132, label %163, label %134

134:                                              ; preds = %133
  %135 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %136 = icmp slt i32 %135, 4
  br i1 %136, label %137, label %201

137:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %7) #8
  %138 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !20
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %7, ptr noundef %138)
          to label %139 unwind label %158

139:                                              ; preds = %137
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %7, i32 noundef 3)
          to label %141 unwind label %160

141:                                              ; preds = %139
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %140, ptr noundef nonnull @.str)
          to label %143 unwind label %160

143:                                              ; preds = %141
  %144 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #9
  %.not38 = icmp eq ptr %144, null
  %145 = getelementptr inbounds i8, ptr %144, i64 1
  %spec.select51 = select i1 %.not38, ptr @.str.1, ptr %145
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull %spec.select51)
          to label %147 unwind label %160

147:                                              ; preds = %143
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @.str.2)
          to label %149 unwind label %160

149:                                              ; preds = %147
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %148, i32 noundef 51)
          to label %151 unwind label %160

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

153:                                              ; preds = %151
  %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.9)
          to label %155 unwind label %160

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

156:                                              ; preds = %129
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %128, i64 noundef 432) #11
  br label %202

158:                                              ; preds = %137
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %162

160:                                              ; preds = %153, %151, %149, %147, %143, %141, %139
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %7) #8
  br label %162

162:                                              ; preds = %160, %158
  %.pn39 = phi { ptr, i32 } [ %161, %160 ], [ %159, %158 ]
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %7) #8
  br label %202

163:                                              ; preds = %133
  %164 = invoke noalias noundef nonnull dereferenceable(184) ptr @_Znwm(i64 noundef 184) #10
          to label %165 unwind label %50

165:                                              ; preds = %163
  %166 = load ptr, ptr %131, align 8, !tbaa !25
  %167 = load ptr, ptr %95, align 8, !tbaa !24
  invoke void @_ZN7cascadb4TreeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsEPNS_5CacheEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(184) %164, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(101) %9, ptr noundef %166, ptr noundef %167)
          to label %168 unwind label %194

168:                                              ; preds = %165
  %169 = getelementptr inbounds i8, ptr %0, i64 168
  store ptr %164, ptr %169, align 8, !tbaa !26
  %170 = invoke noundef zeroext i1 @_ZN7cascadb4Tree4initEv(ptr noundef nonnull align 8 dereferenceable(184) %164)
          to label %171 unwind label %50

171:                                              ; preds = %168
  br i1 %170, label %201, label %172

172:                                              ; preds = %171
  %173 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !18
  %174 = icmp slt i32 %173, 4
  br i1 %174, label %175, label %201

175:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %8) #8
  %176 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !20
  invoke void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %8, ptr noundef %176)
          to label %177 unwind label %196

177:                                              ; preds = %175
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %8, i32 noundef 3)
          to label %179 unwind label %198

179:                                              ; preds = %177
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef nonnull @.str)
          to label %181 unwind label %198

181:                                              ; preds = %179
  %182 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #9
  %.not41 = icmp eq ptr %182, null
  %183 = getelementptr inbounds i8, ptr %182, i64 1
  %spec.select52 = select i1 %.not41, ptr @.str.1, ptr %183
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef nonnull %spec.select52)
          to label %185 unwind label %198

185:                                              ; preds = %181
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %184, ptr noundef nonnull @.str.2)
          to label %187 unwind label %198

187:                                              ; preds = %185
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %186, i32 noundef 57)
          to label %189 unwind label %198

189:                                              ; preds = %187
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %188, ptr noundef nonnull @.str)
          to label %191 unwind label %198

191:                                              ; preds = %189
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %190, ptr noundef nonnull @.str.10)
          to label %193 unwind label %198

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

194:                                              ; preds = %165
  %195 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %164, i64 noundef 184) #11
  br label %202

196:                                              ; preds = %175
  %197 = landingpad { ptr, i32 }
          cleanup
  br label %200

198:                                              ; preds = %191, %189, %187, %185, %181, %179, %177
  %199 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %8) #8
  br label %200

200:                                              ; preds = %198, %196
  %.pn42 = phi { ptr, i32 } [ %199, %198 ], [ %197, %196 ]
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %8) #8
  br label %202

201:                                              ; preds = %171, %172, %193, %134, %155, %98, %119
  %.021 = phi i1 [ false, %119 ], [ false, %98 ], [ false, %155 ], [ false, %134 ], [ false, %193 ], [ false, %172 ], [ true, %171 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %204

202:                                              ; preds = %200, %194, %162, %156, %126, %120, %84, %50
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %200 ], [ %51, %50 ], [ %195, %194 ], [ %.pn39, %162 ], [ %157, %156 ], [ %.pn36, %126 ], [ %121, %120 ], [ %.pn, %84 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %203

203:                                              ; preds = %202, %48
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %202 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %205

204:                                              ; preds = %11, %31, %201
  %.122 = phi i1 [ %.021, %201 ], [ false, %31 ], [ false, %11 ]
  ret i1 %.122

205:                                              ; preds = %203, %32
  %.pn42.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn, %203 ], [ %33, %32 ]
  resume { ptr, i32 } %.pn42.pn.pn.pn
}

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

; 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 #4

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

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

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

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

declare void @_ZN7cascadb6LayoutC1EPNS_7AIOFileEmRKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(101)) unnamed_addr #6

declare noundef zeroext i1 @_ZN7cascadb6Layout4initEb(ptr noundef nonnull align 8 dereferenceable(600), i1 noundef zeroext) local_unnamed_addr #6

declare void @_ZN7cascadb5CacheC1ERKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef nonnull align 8 dereferenceable(101)) unnamed_addr #6

declare noundef zeroext i1 @_ZN7cascadb5Cache4initEv(ptr noundef nonnull align 8 dereferenceable(432)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb4TreeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsEPNS_5CacheEPNS_6LayoutE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(101), ptr noundef, ptr noundef) unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN7cascadb4Tree4initEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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, !10, i64 40}
!6 = !{!"_ZTSN7cascadb6DBImplE", !7, i64 0, !8, i64 8, !14, i64 40, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168}
!7 = !{!"_ZTSN7cascadb2DBE"}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSN7cascadb7OptionsE", !10, i64 0, !10, 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", !11, i64 0}
!16 = !{!"_ZTSN7cascadb8CompressE", !11, i64 0}
!17 = !{!"bool", !11, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTSN7cascadb11LoggerLevelE", !11, i64 0}
!20 = !{!10, !10, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !12, i64 0}
!23 = !{!6, !10, i64 144}
!24 = !{!6, !10, i64 152}
!25 = !{!6, !10, i64 160}
!26 = !{!6, !10, i64 168}


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