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

; 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::Slice" = type <{ ptr, i32, [4 x i8] }>
%"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::Block" = type { %"class.cascadb::Slice", i64, i64 }
%"class.cascadb::BlockReader" = 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.32 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZN7cascadb6Layout20alloc_aligned_bufferEm(ptr noundef nonnull align 8 dereferenceable(600), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cascadb5BlockC2ENS_5SliceEmm(ptr noundef nonnull align 8 dereferenceable(32), ptr, i32, i64 noundef, i64 noundef) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7cascadb6Layout9read_dataEmRNS_5SliceE(ptr noundef nonnull align 8 dereferenceable(600), i64 noundef, ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb6Layout19load_2nd_superblockEv(ptr noundef nonnull align 8 dereferenceable(600) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.cascadb::Slice", align 8
  %5 = alloca { ptr, i32 }, align 8
  %6 = alloca %"class.cascadb::LoggerFormat", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.cascadb::LoggerFormat", align 8
  %11 = alloca %"class.cascadb::LoggerFormat", align 8
  %12 = alloca %"class.cascadb::Block", align 8
  %13 = alloca %"class.cascadb::Slice", align 8
  %14 = alloca %"class.cascadb::BlockReader", align 8
  %15 = alloca %"class.cascadb::LoggerFormat", align 8
  %16 = alloca %"class.cascadb::Slice", align 8
  %17 = alloca %"class.cascadb::LoggerFormat", align 8
  %18 = alloca %"class.cascadb::Slice", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #7
  %20 = call { ptr, i32 } @_ZN7cascadb6Layout20alloc_aligned_bufferEm(ptr noundef nonnull align 8 dereferenceable(600) %19, i64 noundef 4096)
  store { ptr, i32 } %20, ptr %5, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %5, i64 12, i1 false)
  %21 = call noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %4)
  %22 = icmp ne i64 %21, 0
  br i1 %22, label %57, label %23

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

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

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.2)
          to label %31 unwind label %52

31:                                               ; preds = %29
  %32 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %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) #8
  %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 %52

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.3)
          to label %43 unwind label %52

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

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.2)
          to label %47 unwind label %52

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.32)
          to label %49 unwind label %52

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

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

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

56:                                               ; preds = %51, %23
  store i1 false, ptr %2, align 1
  store i32 1, ptr %9, align 4
  br label %202

57:                                               ; preds = %1
  %58 = call noundef zeroext i1 @_ZN7cascadb6Layout9read_dataEmRNS_5SliceE(ptr noundef nonnull align 8 dereferenceable(600) %19, i64 noundef 4096, ptr noundef nonnull align 8 dereferenceable(12) %4)
  br i1 %58, label %91, label %59

59:                                               ; preds = %57
  %60 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !9
  %61 = icmp sge i32 3, %60
  br i1 %61, label %62, label %90

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 384, ptr %10) #7
  %63 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %10, ptr noundef %63)
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %10, i32 noundef 3)
          to label %65 unwind label %86

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

67:                                               ; preds = %65
  %68 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %73

70:                                               ; preds = %67
  %71 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %72 = getelementptr inbounds i8, ptr %71, i64 1
  br label %74

73:                                               ; preds = %67
  br label %74

74:                                               ; preds = %73, %70
  %75 = phi ptr [ %72, %70 ], [ @.str.1, %73 ]
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef %75)
          to label %77 unwind label %86

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 @.str.3)
          to label %79 unwind label %86

79:                                               ; preds = %77
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %78, i32 noundef 377)
          to label %81 unwind label %86

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 @.str.2)
          to label %83 unwind label %86

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

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

86:                                               ; preds = %83, %81, %79, %77, %74, %65, %62
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %10) #7
  call void @llvm.lifetime.end.p0(i64 384, ptr %10) #7
  br label %204

90:                                               ; preds = %85, %59
  store i1 false, ptr %2, align 1
  store i32 1, ptr %9, align 4
  br label %202

91:                                               ; preds = %57
  %92 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !9
  %93 = icmp sge i32 0, %92
  br i1 %93, label %94, label %122

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 384, ptr %11) #7
  %95 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %11, ptr noundef %95)
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %11, i32 noundef 0)
          to label %97 unwind label %118

97:                                               ; preds = %94
  %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 %118

99:                                               ; preds = %97
  %100 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %105

102:                                              ; preds = %99
  %103 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %104 = getelementptr inbounds i8, ptr %103, i64 1
  br label %106

105:                                              ; preds = %99
  br label %106

106:                                              ; preds = %105, %102
  %107 = phi ptr [ %104, %102 ], [ @.str.1, %105 ]
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef %107)
          to label %109 unwind label %118

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

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %110, i32 noundef 381)
          to label %113 unwind label %118

113:                                              ; preds = %111
  %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.2)
          to label %115 unwind label %118

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 @.str.38)
          to label %117 unwind label %118

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

118:                                              ; preds = %115, %113, %111, %109, %106, %97, %94
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %7, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %8, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %11) #7
  call void @llvm.lifetime.end.p0(i64 384, ptr %11) #7
  br label %204

122:                                              ; preds = %117, %91
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %4, i64 16, i1 false), !tbaa.struct !11
  %123 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8
  %125 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %126 = load i32, ptr %125, align 8
  call void @_ZN7cascadb5BlockC2ENS_5SliceEmm(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr %124, i32 %126, i64 noundef 0, i64 noundef 4096)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @_ZN7cascadb11BlockReaderC2EPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %12)
  %127 = call noundef zeroext i1 @_ZN7cascadb6Layout15read_superblockERNS_11BlockReaderE(ptr noundef nonnull align 8 dereferenceable(600) %19, ptr noundef nonnull align 8 dereferenceable(16) %14)
  br i1 %127, label %164, label %128

128:                                              ; preds = %122
  %129 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !9
  %130 = icmp sge i32 3, %129
  br i1 %130, label %131, label %159

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 384, ptr %15) #7
  %132 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !5
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %15, ptr noundef %132)
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %15, i32 noundef 3)
          to label %134 unwind label %155

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

136:                                              ; preds = %134
  %137 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %142

139:                                              ; preds = %136
  %140 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %141 = getelementptr inbounds i8, ptr %140, i64 1
  br label %143

142:                                              ; preds = %136
  br label %143

143:                                              ; preds = %142, %139
  %144 = phi ptr [ %141, %139 ], [ @.str.1, %142 ]
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef %144)
          to label %146 unwind label %155

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

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

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

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

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

155:                                              ; preds = %152, %150, %148, %146, %143, %134, %131
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %7, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %8, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %15) #7
  call void @llvm.lifetime.end.p0(i64 384, ptr %15) #7
  br label %201

159:                                              ; preds = %154, %128
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %4, i64 16, i1 false), !tbaa.struct !11
  %160 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8
  %162 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %163 = load i32, ptr %162, align 8
  call void @_ZN7cascadb6Layout11free_bufferENS_5SliceE(ptr noundef nonnull align 8 dereferenceable(600) %19, ptr %161, i32 %163)
  store i1 false, ptr %2, align 1
  store i32 1, ptr %9, align 4
  br label %200

164:                                              ; preds = %122
  %165 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !9
  %166 = icmp sge i32 0, %165
  br i1 %166, label %167, label %195

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

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

172:                                              ; preds = %170
  %173 = call noundef ptr @strrchr(ptr noundef @.str.1, i32 noundef 47) #8
  %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) #8
  %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 %191

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

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

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

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.40)
          to label %190 unwind label %191

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

191:                                              ; preds = %188, %186, %184, %182, %179, %170, %167
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %7, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %8, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %17) #7
  call void @llvm.lifetime.end.p0(i64 384, ptr %17) #7
  br label %201

195:                                              ; preds = %190, %164
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %4, i64 16, i1 false), !tbaa.struct !11
  %196 = getelementptr inbounds { ptr, i32 }, ptr %18, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8
  %198 = getelementptr inbounds { ptr, i32 }, ptr %18, i32 0, i32 1
  %199 = load i32, ptr %198, align 8
  call void @_ZN7cascadb6Layout11free_bufferENS_5SliceE(ptr noundef nonnull align 8 dereferenceable(600) %19, ptr %197, i32 %199)
  store i1 true, ptr %2, align 1
  store i32 1, ptr %9, align 4
  br label %200

200:                                              ; preds = %195, %159
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  br label %202

201:                                              ; preds = %191, %155
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  br label %204

202:                                              ; preds = %200, %90, %56
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  %203 = load i1, ptr %2, align 1
  ret i1 %203

204:                                              ; preds = %201, %118, %86, %52
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %7, align 8
  %207 = load i32, ptr %8, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cascadb11BlockReaderC2EPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7cascadb6Layout15read_superblockERNS_11BlockReaderE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{!"_ZTSN7cascadb11LoggerLevelE", !7, i64 0}
!11 = !{i64 0, i64 8, !5, i64 8, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}


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

%"class.cascadb::Slice" = type <{ ptr, i32, [4 x i8] }>
%"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::Block" = type { %"class.cascadb::Slice", i64, i64 }
%"class.cascadb::BlockReader" = 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.32 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [23 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 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 dso_local { ptr, i32 } @_ZN7cascadb6Layout20alloc_aligned_bufferEm(ptr noundef nonnull align 8 dereferenceable(600), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cascadb5BlockC2ENS_5SliceEmm(ptr noundef nonnull align 8 dereferenceable(32), ptr, i32, i64 noundef, i64 noundef) unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb6Layout19load_2nd_superblockEv(ptr noundef nonnull align 8 dereferenceable(600) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.cascadb::Slice", align 8
  %3 = alloca %"class.cascadb::LoggerFormat", align 8
  %4 = alloca %"class.cascadb::LoggerFormat", align 8
  %5 = alloca %"class.cascadb::LoggerFormat", align 8
  %6 = alloca %"class.cascadb::Block", align 8
  %7 = alloca %"class.cascadb::BlockReader", align 8
  %8 = alloca %"class.cascadb::LoggerFormat", align 8
  %9 = alloca %"class.cascadb::LoggerFormat", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  %10 = tail call { ptr, i32 } @_ZN7cascadb6Layout20alloc_aligned_bufferEm(ptr noundef nonnull align 8 dereferenceable(600) %0, i64 noundef 4096)
  %.fca.0.extract = extractvalue { ptr, i32 } %10, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %10, 1
  store ptr %.fca.0.extract, ptr %2, align 8
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.28.0..sroa_idx, align 8
  %11 = call noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %2)
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %12, label %37

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

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

18:                                               ; preds = %15
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @.str.2)
          to label %20 unwind label %35

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

24:                                               ; preds = %20
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull @.str.3)
          to label %26 unwind label %35

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

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

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

32:                                               ; preds = %30
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %31, i32 noundef 4096)
          to label %34 unwind label %35

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

35:                                               ; preds = %32, %30, %28, %26, %24, %20, %18, %15
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %3) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %3) #6
  br label %134

37:                                               ; preds = %1
  %38 = call noundef zeroext i1 @_ZN7cascadb6Layout9read_dataEmRNS_5SliceE(ptr noundef nonnull align 8 dereferenceable(600) %0, i64 noundef 4096, ptr noundef nonnull align 8 dereferenceable(12) %2)
  %39 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !5
  br i1 %38, label %62, label %40

40:                                               ; preds = %37
  %41 = icmp slt i32 %39, 4
  br i1 %41, label %42, label %133

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %4) #6
  %43 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %4, ptr noundef %43)
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %4, i32 noundef 3)
          to label %45 unwind label %60

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

47:                                               ; preds = %45
  %48 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not21 = icmp eq ptr %48, null
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %spec.select27 = select i1 %.not21, ptr @.str.1, ptr %49
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull %spec.select27)
          to label %51 unwind label %60

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

53:                                               ; preds = %51
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %52, i32 noundef 377)
          to label %55 unwind label %60

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

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

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

60:                                               ; preds = %57, %55, %53, %51, %47, %45, %42
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %4) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %4) #6
  br label %134

62:                                               ; preds = %37
  %63 = icmp slt i32 %39, 1
  br i1 %63, label %64, label %84

64:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %5) #6
  %65 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %5, ptr noundef %65)
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %5, i32 noundef 0)
          to label %67 unwind label %82

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

69:                                               ; preds = %67
  %70 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not22 = icmp eq ptr %70, null
  %71 = getelementptr inbounds i8, ptr %70, i64 1
  %spec.select28 = select i1 %.not22, ptr @.str.1, ptr %71
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull %spec.select28)
          to label %73 unwind label %82

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

75:                                               ; preds = %73
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef 381)
          to label %77 unwind label %82

77:                                               ; preds = %75
  %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.2)
          to label %79 unwind label %82

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

81:                                               ; preds = %79
  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 %84

82:                                               ; preds = %79, %77, %75, %73, %69, %67, %64
  %83 = 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 %134

84:                                               ; preds = %81, %62
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %.sroa.04.0.copyload = load ptr, ptr %2, align 8, !tbaa !9
  %.sroa.25.0.copyload = load i32, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !11
  call void @_ZN7cascadb5BlockC2ENS_5SliceEmm(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr %.sroa.04.0.copyload, i32 %.sroa.25.0.copyload, i64 noundef 0, i64 noundef 4096)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @_ZN7cascadb11BlockReaderC2EPNS_5BlockE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull %6)
  %85 = call noundef zeroext i1 @_ZN7cascadb6Layout15read_superblockERNS_11BlockReaderE(ptr noundef nonnull align 8 dereferenceable(600) %0, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %86 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !5
  br i1 %85, label %109, label %87

87:                                               ; preds = %84
  %88 = icmp slt i32 %86, 4
  br i1 %88, label %89, label %131

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %8) #6
  %90 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %8, ptr noundef %90)
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %8, i32 noundef 3)
          to label %92 unwind label %107

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

94:                                               ; preds = %92
  %95 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not23 = icmp eq ptr %95, null
  %96 = getelementptr inbounds i8, ptr %95, i64 1
  %spec.select29 = select i1 %.not23, ptr @.str.1, ptr %96
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull %spec.select29)
          to label %98 unwind label %107

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

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %99, i32 noundef 385)
          to label %102 unwind label %107

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

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

106:                                              ; preds = %104
  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 %131

107:                                              ; preds = %104, %102, %100, %98, %94, %92, %89
  %108 = 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 %132

109:                                              ; preds = %84
  %110 = icmp slt i32 %86, 1
  br i1 %110, label %111, label %131

111:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %9) #6
  %112 = load ptr, ptr @_ZN7cascadb8g_loggerE, align 8, !tbaa !9
  call void @_ZN7cascadb12LoggerFormatC2EPNS_6LoggerE(ptr noundef nonnull align 8 dereferenceable(384) %9, ptr noundef %112)
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7cascadb12LoggerFormat3getENS_11LoggerLevelE(ptr noundef nonnull align 8 dereferenceable(384) %9, i32 noundef 0)
          to label %114 unwind label %129

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

116:                                              ; preds = %114
  %117 = call noundef ptr @strrchr(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 47) #7
  %.not24 = icmp eq ptr %117, null
  %118 = getelementptr inbounds i8, ptr %117, i64 1
  %spec.select30 = select i1 %.not24, ptr @.str.1, ptr %118
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull %spec.select30)
          to label %120 unwind label %129

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

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %121, i32 noundef 390)
          to label %124 unwind label %129

124:                                              ; preds = %122
  %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.2)
          to label %126 unwind label %129

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

128:                                              ; preds = %126
  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 %131

129:                                              ; preds = %126, %124, %122, %120, %116, %114, %111
  %130 = 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 %132

131:                                              ; preds = %109, %128, %87, %106
  %.sroa.0.0.copyload.sink = load ptr, ptr %2, align 8, !tbaa !9
  %.sroa.2.0.copyload = load i32, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !11
  call void @_ZN7cascadb6Layout11free_bufferENS_5SliceE(ptr noundef nonnull align 8 dereferenceable(600) %0, ptr %.sroa.0.0.copyload.sink, i32 %.sroa.2.0.copyload)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %133

132:                                              ; preds = %129, %107
  %.pn = phi { ptr, i32 } [ %130, %129 ], [ %108, %107 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %134

133:                                              ; preds = %40, %59, %12, %34, %131
  %.1 = phi i1 [ %85, %131 ], [ false, %34 ], [ false, %12 ], [ false, %59 ], [ false, %40 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  ret i1 %.1

134:                                              ; preds = %132, %82, %60, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %132 ], [ %83, %82 ], [ %61, %60 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7cascadb6Layout15read_superblockERNS_11BlockReaderE(ptr noundef nonnull align 8 dereferenceable(600), ptr noundef nonnull align 8 dereferenceable(16)) 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, !12, i64 0}
!12 = !{!"int", !7, i64 0}


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