; LLVM IR from weicao/cascadb :: src/serialize/layout.ll (ZN7cascadb6Layout4readEmb)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.cascadb::BlockMeta" = type { i64, i32, i32, i16, i16 }
%"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 }

@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@_ZN7cascadb14g_logger_levelE = external global i32, align 4
@_ZN7cascadb8g_loggerE = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: 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: 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

; 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: 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
define dso_local noundef ptr @_ZN7cascadb6Layout4readEmb(ptr noundef nonnull align 8 dereferenceable(600) %0, i64 noundef %1, i1 noundef zeroext %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i8, align 1
  %8 = alloca %"struct.cascadb::BlockMeta", align 8
  %9 = alloca %"class.cascadb::LoggerFormat", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.cascadb::LoggerFormat", align 8
  %16 = alloca i16, align 2
  %17 = alloca i16, align 2
  %18 = alloca %"class.cascadb::LoggerFormat", align 8
  %19 = alloca %"class.cascadb::LoggerFormat", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  %20 = zext i1 %2 to i8
  store i8 %20, ptr %7, align 1, !tbaa !11
  %21 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  %22 = load i64, ptr %6, align 8, !tbaa !9
  %23 = call noundef zeroext i1 @_ZN7cascadb6Layout14get_block_metaEmRNS_9BlockMetaE(ptr noundef nonnull align 8 dereferenceable(600) %21, i64 noundef %22, ptr noundef nonnull align 8 dereferenceable(24) %8)
  br i1 %23, label %63, label %24

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

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

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

32:                                               ; preds = %30
  %33 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %38

35:                                               ; preds = %32
  %36 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %37 = getelementptr inbounds i8, ptr %36, i64 1
  br label %39

38:                                               ; preds = %32
  br label %39

39:                                               ; preds = %38, %35
  %40 = phi ptr [ %37, %35 ], [ @.str.1, %38 ]
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef %40)
          to label %42 unwind label %58

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

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

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

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

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @_ZSt3hexRSt8ios_base)
          to label %52 unwind label %58

52:                                               ; preds = %50
  %53 = load i64, ptr %6, align 8, !tbaa !9
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %51, i64 noundef %53)
          to label %55 unwind label %58

55:                                               ; preds = %52
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef @_ZSt3decRSt8ios_base)
          to label %57 unwind label %58

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

58:                                               ; preds = %55, %52, %50, %48, %46, %44, %42, %39, %30, %27
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %10, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %11, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %9) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr %9) #6
  br label %289

62:                                               ; preds = %57, %24
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %287

63:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %64 = load i8, ptr %7, align 1, !tbaa !11, !range !15, !noundef !16
  %65 = trunc i8 %64 to i1
  br i1 %65, label %66, label %69

66:                                               ; preds = %63
  %67 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 1
  %68 = load i32, ptr %67, align 8, !tbaa !17
  store i32 %68, ptr %13, align 4, !tbaa !21
  br label %72

69:                                               ; preds = %63
  %70 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !22
  store i32 %71, ptr %13, align 4, !tbaa !21
  br label %72

72:                                               ; preds = %69, %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %73 = load i32, ptr %13, align 4, !tbaa !21
  %74 = call noundef zeroext i1 @_ZN7cascadb6Layout10read_blockERKNS_9BlockMetaEjjPPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600) %21, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 0, i32 noundef %73, ptr noundef %14)
  br i1 %74, label %131, label %75

75:                                               ; preds = %72
  %76 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !13
  %77 = icmp sge i32 3, %76
  br i1 %77, label %78, label %130

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 384, ptr %15) #6
  %79 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %15, ptr noundef %79)
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %15, i32 noundef 3)
          to label %81 unwind label %126

81:                                               ; preds = %78
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef @.str.2)
          to label %83 unwind label %126

83:                                               ; preds = %81
  %84 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %89

86:                                               ; preds = %83
  %87 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %88 = getelementptr inbounds i8, ptr %87, i64 1
  br label %90

89:                                               ; preds = %83
  br label %90

90:                                               ; preds = %89, %86
  %91 = phi ptr [ %88, %86 ], [ @.str.1, %89 ]
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef %91)
          to label %93 unwind label %126

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

95:                                               ; preds = %93
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %94, i32 noundef 119)
          to label %97 unwind label %126

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

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @.str.10)
          to label %101 unwind label %126

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef @_ZSt3hexRSt8ios_base)
          to label %103 unwind label %126

103:                                              ; preds = %101
  %104 = load i64, ptr %6, align 8, !tbaa !9
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %102, i64 noundef %104)
          to label %106 unwind label %126

106:                                              ; preds = %103
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt3decRSt8ios_base)
          to label %108 unwind label %126

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.11)
          to label %110 unwind label %126

110:                                              ; preds = %108
  %111 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 0
  %112 = load i64, ptr %111, align 8, !tbaa !23
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %109, i64 noundef %112)
          to label %114 unwind label %126

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

116:                                              ; preds = %114
  %117 = load i32, ptr %13, align 4, !tbaa !21
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %115, i32 noundef %117)
          to label %119 unwind label %126

119:                                              ; preds = %116
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef @.str.13)
          to label %121 unwind label %126

121:                                              ; preds = %119
  %122 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 3
  %123 = load i16, ptr %122, align 8, !tbaa !24
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %120, i16 noundef zeroext %123)
          to label %125 unwind label %126

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

126:                                              ; preds = %121, %119, %116, %114, %110, %108, %106, %103, %101, %99, %97, %95, %93, %90, %81, %78
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %10, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %11, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %15) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr %15) #6
  br label %286

130:                                              ; preds = %125, %75
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %285

131:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #6
  %132 = load i8, ptr %7, align 1, !tbaa !11, !range !15, !noundef !16
  %133 = trunc i8 %132 to i1
  br i1 %133, label %134, label %143

134:                                              ; preds = %131
  %135 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 4
  %136 = load i16, ptr %135, align 2, !tbaa !25
  store i16 %136, ptr %16, align 2, !tbaa !26
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32) %137)
  %139 = call noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %138)
  %140 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 1
  %141 = load i32, ptr %140, align 8, !tbaa !17
  %142 = call noundef zeroext i16 @_ZN7cascadb5crc16EPKcj(ptr noundef %139, i32 noundef %141)
  store i16 %142, ptr %17, align 2, !tbaa !26
  br label %154

143:                                              ; preds = %131
  %144 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 3
  %145 = load i16, ptr %144, align 8, !tbaa !24
  store i16 %145, ptr %16, align 2, !tbaa !26
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32) %146)
  %148 = call noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %147)
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32) %149)
  %151 = call noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %150)
  %152 = trunc i64 %151 to i32
  %153 = call noundef zeroext i16 @_ZN7cascadb5crc16EPKcj(ptr noundef %148, i32 noundef %152)
  store i16 %153, ptr %17, align 2, !tbaa !26
  br label %154

154:                                              ; preds = %143, %134
  %155 = load i16, ptr %16, align 2, !tbaa !26
  %156 = zext i16 %155 to i32
  %157 = load i16, ptr %17, align 2, !tbaa !26
  %158 = zext i16 %157 to i32
  %159 = icmp ne i32 %156, %158
  br i1 %159, label %160, label %226

160:                                              ; preds = %154
  %161 = load i16, ptr %16, align 2, !tbaa !26
  %162 = zext i16 %161 to i32
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %226

164:                                              ; preds = %160
  %165 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !13
  %166 = icmp sge i32 3, %165
  br i1 %166, label %167, label %224

167:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 384, ptr %18) #6
  %168 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %18, ptr noundef %168)
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %18, i32 noundef 3)
          to label %170 unwind label %220

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 %220

172:                                              ; preds = %170
  %173 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %178

175:                                              ; preds = %172
  %176 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %177 = getelementptr inbounds i8, ptr %176, i64 1
  br label %179

178:                                              ; preds = %172
  br label %179

179:                                              ; preds = %178, %175
  %180 = phi ptr [ %177, %175 ], [ @.str.1, %178 ]
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef %180)
          to label %182 unwind label %220

182:                                              ; preds = %179
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef @.str.3)
          to label %184 unwind label %220

184:                                              ; preds = %182
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %183, i32 noundef 140)
          to label %186 unwind label %220

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

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

190:                                              ; preds = %188
  %191 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %189, ptr noundef @_ZSt3hexRSt8ios_base)
          to label %192 unwind label %220

192:                                              ; preds = %190
  %193 = load i64, ptr %6, align 8, !tbaa !9
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %191, i64 noundef %193)
          to label %195 unwind label %220

195:                                              ; preds = %192
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef @_ZSt3decRSt8ios_base)
          to label %197 unwind label %220

197:                                              ; preds = %195
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef @.str.11)
          to label %199 unwind label %220

199:                                              ; preds = %197
  %200 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 0
  %201 = load i64, ptr %200, align 8, !tbaa !23
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %198, i64 noundef %201)
          to label %203 unwind label %220

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

205:                                              ; preds = %203
  %206 = load i16, ptr %16, align 2, !tbaa !26
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %204, i16 noundef zeroext %206)
          to label %208 unwind label %220

208:                                              ; preds = %205
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef @.str.16)
          to label %210 unwind label %220

210:                                              ; preds = %208
  %211 = load i16, ptr %17, align 2, !tbaa !26
  %212 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %209, i16 noundef zeroext %211)
          to label %213 unwind label %220

213:                                              ; preds = %210
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %212, ptr noundef @.str.17)
          to label %215 unwind label %220

215:                                              ; preds = %213
  %216 = load i8, ptr %7, align 1, !tbaa !11, !range !15, !noundef !16
  %217 = trunc i8 %216 to i1
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %214, i1 noundef zeroext %217)
          to label %219 unwind label %220

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

220:                                              ; preds = %215, %213, %210, %208, %205, %203, %199, %197, %195, %192, %190, %188, %186, %184, %182, %179, %170, %167
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %10, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %11, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %18) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr %18) #6
  br label %284

224:                                              ; preds = %219, %164
  %225 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN7cascadb6Layout7destroyEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600) %21, ptr noundef %225)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %283

226:                                              ; preds = %160, %154
  %227 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !13
  %228 = icmp sge i32 0, %227
  br i1 %228, label %229, label %281

229:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 384, ptr %19) #6
  %230 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %19, ptr noundef %230)
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %19, i32 noundef 0)
          to label %232 unwind label %277

232:                                              ; preds = %229
  %233 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %231, ptr noundef @.str.2)
          to label %234 unwind label %277

234:                                              ; preds = %232
  %235 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %236 = icmp ne ptr %235, null
  br i1 %236, label %237, label %240

237:                                              ; preds = %234
  %238 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #7
  %239 = getelementptr inbounds i8, ptr %238, i64 1
  br label %241

240:                                              ; preds = %234
  br label %241

241:                                              ; preds = %240, %237
  %242 = phi ptr [ %239, %237 ], [ @.str.1, %240 ]
  %243 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %233, ptr noundef %242)
          to label %244 unwind label %277

244:                                              ; preds = %241
  %245 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %243, ptr noundef @.str.3)
          to label %246 unwind label %277

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

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

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

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

254:                                              ; preds = %252
  %255 = load i64, ptr %6, align 8, !tbaa !9
  %256 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %253, i64 noundef %255)
          to label %257 unwind label %277

257:                                              ; preds = %254
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @_ZSt3decRSt8ios_base)
          to label %259 unwind label %277

259:                                              ; preds = %257
  %260 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %258, ptr noundef @.str.11)
          to label %261 unwind label %277

261:                                              ; preds = %259
  %262 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 0
  %263 = load i64, ptr %262, align 8, !tbaa !23
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %260, i64 noundef %263)
          to label %265 unwind label %277

265:                                              ; preds = %261
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @.str.12)
          to label %267 unwind label %277

267:                                              ; preds = %265
  %268 = load i32, ptr %13, align 4, !tbaa !21
  %269 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %266, i32 noundef %268)
          to label %270 unwind label %277

270:                                              ; preds = %267
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %269, ptr noundef @.str.13)
          to label %272 unwind label %277

272:                                              ; preds = %270
  %273 = getelementptr inbounds %"struct.cascadb::BlockMeta", ptr %8, i32 0, i32 3
  %274 = load i16, ptr %273, align 8, !tbaa !24
  %275 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %271, i16 noundef zeroext %274)
          to label %276 unwind label %277

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

277:                                              ; preds = %272, %270, %267, %265, %261, %259, %257, %254, %252, %250, %248, %246, %244, %241, %232, %229
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %10, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %11, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %19) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr %19) #6
  br label %284

281:                                              ; preds = %276, %226
  %282 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %282, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %283

283:                                              ; preds = %281, %224
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #6
  br label %285

284:                                              ; preds = %277, %220
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #6
  br label %286

285:                                              ; preds = %283, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %287

286:                                              ; preds = %284, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %289

287:                                              ; preds = %285, %62
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  %288 = load ptr, ptr %4, align 8
  ret ptr %288

289:                                              ; preds = %286, %58
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  br label %290

290:                                              ; preds = %289
  %291 = load ptr, ptr %10, align 8
  %292 = load i32, ptr %11, align 4
  %293 = insertvalue { ptr, i32 } poison, ptr %291, 0
  %294 = insertvalue { ptr, i32 } %293, i32 %292, 1
  resume { ptr, i32 } %294
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7cascadb6Layout14get_block_metaEmRNS_9BlockMetaE(ptr noundef nonnull align 8 dereferenceable(600), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #2 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) #2 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: 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 zeroext i1 @_ZN7cascadb6Layout10read_blockERKNS_9BlockMetaEjjPPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef) #2 align 2

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

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

declare noundef zeroext i16 @_ZN7cascadb5crc16EPKcj(ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12)) #5 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: mustprogress uwtable
declare dso_local void @_ZN7cascadb6Layout7destroyEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN7cascadb11LoggerLevelE", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !19, i64 8}
!18 = !{!"_ZTSN7cascadb9BlockMetaE", !10, i64 0, !19, i64 8, !19, i64 12, !20, i64 16, !20, i64 18}
!19 = !{!"int", !7, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{!19, !19, i64 0}
!22 = !{!18, !19, i64 12}
!23 = !{!18, !10, i64 0}
!24 = !{!18, !20, i64 16}
!25 = !{!18, !20, i64 18}
!26 = !{!20, !20, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.cascadb::BlockMeta" = type { i64, i32, i32, i16, i16 }
%"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 }

@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@_ZN7cascadb14g_logger_levelE = external local_unnamed_addr global i32, align 4
@_ZN7cascadb8g_loggerE = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: 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 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

; 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 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
define dso_local noundef ptr @_ZN7cascadb6Layout4readEmb(ptr noundef nonnull align 8 dereferenceable(600) %0, i64 noundef %1, i1 noundef zeroext %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.cascadb::BlockMeta", align 8
  %5 = alloca %"class.cascadb::LoggerFormat", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.cascadb::LoggerFormat", align 8
  %8 = alloca %"class.cascadb::LoggerFormat", align 8
  %9 = alloca %"class.cascadb::LoggerFormat", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %10 = call noundef zeroext i1 @_ZN7cascadb6Layout14get_block_metaEmRNS_9BlockMetaE(ptr noundef nonnull align 8 dereferenceable(600) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %4)
  br i1 %10, label %40, label %11

11:                                               ; preds = %3
  %12 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 2
  br i1 %13, label %14, label %207

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

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.2)
          to label %19 unwind label %38

19:                                               ; preds = %17
  %20 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not = icmp eq ptr %20, null
  %21 = getelementptr inbounds i8, ptr %20, i64 1
  %spec.select = select i1 %.not, 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 %38

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.3)
          to label %25 unwind label %38

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

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.2)
          to label %29 unwind label %38

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.9)
          to label %31 unwind label %38

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %32, i64 noundef %1)
          to label %35 unwind label %38

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

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

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

40:                                               ; preds = %3
  %41 = getelementptr inbounds i8, ptr %4, i64 8
  %42 = load i32, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr %4, i64 12
  %44 = load i32, ptr %43, align 4
  %.022 = select i1 %2, i32 %42, i32 %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %45 = call noundef zeroext i1 @_ZN7cascadb6Layout10read_blockERKNS_9BlockMetaEjjPPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 0, i32 noundef %.022, ptr noundef nonnull %6)
  br i1 %45, label %90, label %46

46:                                               ; preds = %40
  %47 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !5
  %48 = icmp slt i32 %47, 4
  br i1 %48, label %49, label %205

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %7) #6
  %50 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %7, ptr noundef %50)
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %7, i32 noundef 3)
          to label %52 unwind label %88

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

54:                                               ; preds = %52
  %55 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not34 = icmp eq ptr %55, null
  %56 = getelementptr inbounds i8, ptr %55, i64 1
  %spec.select40 = select i1 %.not34, ptr @.str.1, ptr %56
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull %spec.select40)
          to label %58 unwind label %88

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

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %59, i32 noundef 119)
          to label %62 unwind label %88

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

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.10)
          to label %66 unwind label %88

66:                                               ; preds = %64
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
          to label %68 unwind label %88

68:                                               ; preds = %66
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %67, i64 noundef %1)
          to label %70 unwind label %88

70:                                               ; preds = %68
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %72 unwind label %88

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

74:                                               ; preds = %72
  %75 = load i64, ptr %4, align 8, !tbaa !11
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %73, i64 noundef %75)
          to label %77 unwind label %88

77:                                               ; preds = %74
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull @.str.12)
          to label %79 unwind label %88

79:                                               ; preds = %77
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %78, i32 noundef %.022)
          to label %81 unwind label %88

81:                                               ; preds = %79
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull @.str.13)
          to label %83 unwind label %88

83:                                               ; preds = %81
  %84 = getelementptr inbounds i8, ptr %4, i64 16
  %85 = load i16, ptr %84, align 8, !tbaa !16
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %82, i16 noundef zeroext %85)
          to label %87 unwind label %88

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

88:                                               ; preds = %83, %81, %79, %77, %74, %72, %70, %68, %66, %64, %62, %60, %58, %54, %52, %49
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %7) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %7) #6
  br label %206

90:                                               ; preds = %40
  %91 = load ptr, ptr %6, align 8, !tbaa !9
  br i1 %2, label %92, label %99

92:                                               ; preds = %90
  %93 = getelementptr inbounds i8, ptr %4, i64 18
  %94 = load i16, ptr %93, align 2, !tbaa !17
  %95 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32) %91)
  %96 = call noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %95)
  %97 = load i32, ptr %41, align 8, !tbaa !18
  %98 = call noundef zeroext i16 @_ZN7cascadb5crc16EPKcj(ptr noundef %96, i32 noundef %97)
  br label %109

99:                                               ; preds = %90
  %100 = getelementptr inbounds i8, ptr %4, i64 16
  %101 = load i16, ptr %100, align 8, !tbaa !16
  %102 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32) %91)
  %103 = call noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %102)
  %104 = load ptr, ptr %6, align 8, !tbaa !9
  %105 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32) %104)
  %106 = call noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %105)
  %107 = trunc i64 %106 to i32
  %108 = call noundef zeroext i16 @_ZN7cascadb5crc16EPKcj(ptr noundef %103, i32 noundef %107)
  br label %109

109:                                              ; preds = %99, %92
  %.021 = phi i16 [ %94, %92 ], [ %101, %99 ]
  %.0 = phi i16 [ %98, %92 ], [ %108, %99 ]
  %110 = icmp ne i16 %.021, %.0
  %111 = icmp ne i16 %.021, 0
  %or.cond = and i1 %111, %110
  %112 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !5
  br i1 %or.cond, label %113, label %160

113:                                              ; preds = %109
  %114 = icmp slt i32 %112, 4
  br i1 %114, label %115, label %158

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %8) #6
  %116 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  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 3)
          to label %118 unwind label %156

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 nonnull @.str.2)
          to label %120 unwind label %156

120:                                              ; preds = %118
  %121 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not36 = icmp eq ptr %121, null
  %122 = getelementptr inbounds i8, ptr %121, i64 1
  %spec.select41 = select i1 %.not36, ptr @.str.1, ptr %122
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull %spec.select41)
          to label %124 unwind label %156

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

126:                                              ; preds = %124
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %125, i32 noundef 140)
          to label %128 unwind label %156

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

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

132:                                              ; preds = %130
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
          to label %134 unwind label %156

134:                                              ; preds = %132
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %133, i64 noundef %1)
          to label %136 unwind label %156

136:                                              ; preds = %134
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %138 unwind label %156

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

140:                                              ; preds = %138
  %141 = load i64, ptr %4, align 8, !tbaa !11
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %139, i64 noundef %141)
          to label %143 unwind label %156

143:                                              ; preds = %140
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull @.str.15)
          to label %145 unwind label %156

145:                                              ; preds = %143
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %144, i16 noundef zeroext %.021)
          to label %147 unwind label %156

147:                                              ; preds = %145
  %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.16)
          to label %149 unwind label %156

149:                                              ; preds = %147
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %148, i16 noundef zeroext %.0)
          to label %151 unwind label %156

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.17)
          to label %153 unwind label %156

153:                                              ; preds = %151
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) %152, i1 noundef zeroext %2)
          to label %155 unwind label %156

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

156:                                              ; preds = %153, %151, %149, %147, %145, %143, %140, %138, %136, %134, %132, %130, %128, %126, %124, %120, %118, %115
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %8) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %8) #6
  br label %206

158:                                              ; preds = %155, %113
  %159 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_ZN7cascadb6Layout7destroyEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600) %0, ptr noundef %159)
  br label %205

160:                                              ; preds = %109
  %161 = icmp slt i32 %112, 1
  br i1 %161, label %162, label %203

162:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %9) #6
  %163 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %9, ptr noundef %163)
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %9, i32 noundef 0)
          to label %165 unwind label %201

165:                                              ; preds = %162
  %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.2)
          to label %167 unwind label %201

167:                                              ; preds = %165
  %168 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not35 = icmp eq ptr %168, null
  %169 = getelementptr inbounds i8, ptr %168, i64 1
  %spec.select42 = select i1 %.not35, ptr @.str.1, ptr %169
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef nonnull %spec.select42)
          to label %171 unwind label %201

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

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

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

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

179:                                              ; preds = %177
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef nonnull @_ZSt3hexRSt8ios_base)
          to label %181 unwind label %201

181:                                              ; preds = %179
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %180, i64 noundef %1)
          to label %183 unwind label %201

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %185 unwind label %201

185:                                              ; preds = %183
  %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.11)
          to label %187 unwind label %201

187:                                              ; preds = %185
  %188 = load i64, ptr %4, align 8, !tbaa !11
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %186, i64 noundef %188)
          to label %190 unwind label %201

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

192:                                              ; preds = %190
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %191, i32 noundef %.022)
          to label %194 unwind label %201

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

196:                                              ; preds = %194
  %197 = getelementptr inbounds i8, ptr %4, i64 16
  %198 = load i16, ptr %197, align 8, !tbaa !16
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEt(ptr noundef nonnull align 8 dereferenceable(8) %195, i16 noundef zeroext %198)
          to label %200 unwind label %201

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

201:                                              ; preds = %196, %194, %192, %190, %187, %185, %183, %181, %179, %177, %175, %173, %171, %167, %165, %162
  %202 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %9) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %9) #6
  br label %206

203:                                              ; preds = %200, %160
  %204 = load ptr, ptr %6, align 8, !tbaa !9
  br label %205

205:                                              ; preds = %158, %203, %46, %87
  %.128 = phi ptr [ null, %87 ], [ null, %46 ], [ null, %158 ], [ %204, %203 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %207

206:                                              ; preds = %156, %201, %88
  %.pn.pn = phi { ptr, i32 } [ %89, %88 ], [ %157, %156 ], [ %202, %201 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %208

207:                                              ; preds = %11, %37, %205
  %.229 = phi ptr [ %.128, %205 ], [ null, %37 ], [ null, %11 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret ptr %.229

208:                                              ; preds = %206, %38
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %206 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7cascadb6Layout14get_block_metaEmRNS_9BlockMetaE(ptr noundef nonnull align 8 dereferenceable(600), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 #2 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: 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 zeroext i1 @_ZN7cascadb6Layout10read_blockERKNS_9BlockMetaEjjPPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2 align 2

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

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

declare noundef zeroext i16 @_ZN7cascadb5crc16EPKcj(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN7cascadb5Block6bufferEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #5 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: mustprogress uwtable
declare dso_local void @_ZN7cascadb6Layout7destroyEPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 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 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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

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


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