; LLVM IR from weicao/cascadb :: src/store/ram_directory.ll (ZN7cascadb7RAMFile5writeEmNS_5SliceE)

; 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::ScopedMutex" = type { i8, ptr }
%"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::RAMFile" = type { %"class.cascadb::Mutex", i64, %"class.std::vector", i64, i64 }
%"class.cascadb::Mutex" = type { i8, %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__._ZN7cascadb7RAMFile5writeEmNS_5SliceE = external hidden unnamed_addr constant [46 x i8], align 1
@_ZN7cascadb14g_logger_levelE = external global i32, align 4
@_ZN7cascadb8g_loggerE = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb11ScopedMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPcSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb7RAMFile5writeEmNS_5SliceE(ptr noundef nonnull align 8 dereferenceable(96) %0, i64 noundef %1, ptr %2, i32 %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca %"class.cascadb::Slice", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.cascadb::ScopedMutex", align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca %"class.cascadb::LoggerFormat", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = getelementptr inbounds { ptr, i32 }, ptr %6, i32 0, i32 0
  store ptr %2, ptr %22, align 8
  %23 = getelementptr inbounds { ptr, i32 }, ptr %6, i32 0, i32 1
  store i32 %3, ptr %23, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  %24 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #9
  %25 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 0
  call void @_ZN7cascadb11ScopedMutexC2EPNS_5MutexE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %25)
  %26 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = icmp ugt i64 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %4
  br label %32

30:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 55, ptr noundef @__PRETTY_FUNCTION__._ZN7cascadb7RAMFile5writeEmNS_5SliceE) #10
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %33 = load i64, ptr %8, align 8, !tbaa !9
  %34 = invoke noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %35 unwind label %60

35:                                               ; preds = %32
  %36 = add i64 %33, %34
  store i64 %36, ptr %10, align 8, !tbaa !9
  %37 = load i64, ptr %10, align 8, !tbaa !9
  %38 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 3
  %39 = load i64, ptr %38, align 8, !tbaa !19
  %40 = icmp ugt i64 %37, %39
  br i1 %40, label %41, label %136

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %42 = load i64, ptr %10, align 8, !tbaa !9
  %43 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 3
  %44 = load i64, ptr %43, align 8, !tbaa !19
  %45 = sub i64 %42, %44
  %46 = add i64 %45, 4096
  %47 = sub i64 %46, 1
  %48 = udiv i64 %47, 4096
  store i64 %48, ptr %13, align 8, !tbaa !9
  %49 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 2
  %50 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 2
  %51 = call noundef i64 @_ZNKSt6vectorIPcSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #9
  %52 = load i64, ptr %13, align 8, !tbaa !9
  %53 = add i64 %51, %52
  invoke void @_ZNSt6vectorIPcSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %53)
          to label %54 unwind label %64

54:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %125, %54
  %56 = load i64, ptr %14, align 8, !tbaa !9
  %57 = load i64, ptr %13, align 8, !tbaa !9
  %58 = icmp ult i64 %56, %57
  br i1 %58, label %68, label %59

59:                                               ; preds = %55
  store i32 2, ptr %15, align 4
  br label %129

60:                                               ; preds = %136, %32
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  br label %227

64:                                               ; preds = %41
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %11, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %12, align 4
  br label %135

68:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %69 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef 4096) #11
          to label %70 unwind label %79

70:                                               ; preds = %68
  store ptr %69, ptr %16, align 8, !tbaa !5
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %83

73:                                               ; preds = %70
  %74 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 2
  invoke void @_ZNSt6vectorIPcSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %75 unwind label %79

75:                                               ; preds = %73
  %76 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 3
  %77 = load i64, ptr %76, align 8, !tbaa !19
  %78 = add i64 %77, 4096
  store i64 %78, ptr %76, align 8, !tbaa !19
  br label %121

79:                                               ; preds = %73, %68
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %11, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %12, align 4
  br label %128

83:                                               ; preds = %70
  %84 = load i32, ptr @_ZN7cascadb14g_logger_levelE, align 4, !tbaa !20
  %85 = icmp sge i32 3, %84
  br i1 %85, label %86, label %120

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

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

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

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

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

98:                                               ; preds = %92
  br label %99

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

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

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

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

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.5)
          to label %110 unwind label %115

110:                                              ; preds = %108
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %17) #9
  call void @llvm.lifetime.end.p0(i64 384, ptr %17) #9
  br label %120

111:                                              ; preds = %86
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  br label %119

115:                                              ; preds = %108, %106, %104, %102, %99, %90, %88
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %11, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %12, align 4
  call void @_ZN7cascadb12LoggerFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(384) %17) #9
  br label %119

119:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 384, ptr %17) #9
  br label %128

120:                                              ; preds = %110, %83
  store i1 false, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %122

121:                                              ; preds = %75
  store i32 0, ptr %15, align 4
  br label %122

122:                                              ; preds = %121, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  %123 = load i32, ptr %15, align 4
  switch i32 %123, label %129 [
    i32 0, label %124
  ]

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124
  %126 = load i64, ptr %14, align 8, !tbaa !9
  %127 = add i64 %126, 1
  store i64 %127, ptr %14, align 8, !tbaa !9
  br label %55, !llvm.loop !22

128:                                              ; preds = %119, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %135

129:                                              ; preds = %122, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  %130 = load i32, ptr %15, align 4
  switch i32 %130, label %132 [
    i32 2, label %131
  ]

131:                                              ; preds = %129
  store i32 0, ptr %15, align 4
  br label %132

132:                                              ; preds = %131, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  %133 = load i32, ptr %15, align 4
  switch i32 %133, label %225 [
    i32 0, label %134
  ]

134:                                              ; preds = %132
  br label %136

135:                                              ; preds = %128, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %227

136:                                              ; preds = %134, %35
  invoke void @_ZN7cascadb11ScopedMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %137 unwind label %60

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %138 = load i64, ptr %8, align 8, !tbaa !9
  %139 = udiv i64 %138, 4096
  store i64 %139, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  store i64 0, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %140 = invoke noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %141 unwind label %200

141:                                              ; preds = %137
  store i64 %140, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %142 = load i64, ptr %8, align 8, !tbaa !9
  %143 = urem i64 %142, 4096
  %144 = sub i64 4096, %143
  store i64 %144, ptr %21, align 8, !tbaa !9
  %145 = load i64, ptr %20, align 8, !tbaa !9
  %146 = load i64, ptr %21, align 8, !tbaa !9
  %147 = icmp ult i64 %145, %146
  br i1 %147, label %148, label %150

148:                                              ; preds = %141
  %149 = load i64, ptr %20, align 8, !tbaa !9
  br label %152

150:                                              ; preds = %141
  %151 = load i64, ptr %21, align 8, !tbaa !9
  br label %152

152:                                              ; preds = %150, %148
  %153 = phi i64 [ %149, %148 ], [ %151, %150 ]
  store i64 %153, ptr %21, align 8, !tbaa !9
  %154 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 2
  %155 = load i64, ptr %18, align 8, !tbaa !9
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPcSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %155) #9
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load i64, ptr %8, align 8, !tbaa !9
  %159 = urem i64 %158, 4096
  %160 = getelementptr inbounds i8, ptr %157, i64 %159
  %161 = invoke noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %162 unwind label %204

162:                                              ; preds = %152
  %163 = load i64, ptr %21, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %160, ptr align 1 %161, i64 %163, i1 false)
  %164 = load i64, ptr %21, align 8, !tbaa !9
  %165 = load i64, ptr %20, align 8, !tbaa !9
  %166 = sub i64 %165, %164
  store i64 %166, ptr %20, align 8, !tbaa !9
  %167 = load i64, ptr %21, align 8, !tbaa !9
  %168 = load i64, ptr %19, align 8, !tbaa !9
  %169 = add i64 %168, %167
  store i64 %169, ptr %19, align 8, !tbaa !9
  %170 = load i64, ptr %18, align 8, !tbaa !9
  %171 = add i64 %170, 1
  store i64 %171, ptr %18, align 8, !tbaa !9
  br label %172

172:                                              ; preds = %188, %162
  %173 = load i64, ptr %20, align 8, !tbaa !9
  %174 = icmp ugt i64 %173, 0
  br i1 %174, label %175, label %208

175:                                              ; preds = %172
  %176 = load i64, ptr %20, align 8, !tbaa !9
  %177 = icmp ult i64 %176, 4096
  br i1 %177, label %178, label %180

178:                                              ; preds = %175
  %179 = load i64, ptr %20, align 8, !tbaa !9
  br label %181

180:                                              ; preds = %175
  br label %181

181:                                              ; preds = %180, %178
  %182 = phi i64 [ %179, %178 ], [ 4096, %180 ]
  store i64 %182, ptr %21, align 8, !tbaa !9
  %183 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 2
  %184 = load i64, ptr %18, align 8, !tbaa !9
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPcSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %183, i64 noundef %184) #9
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = invoke noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %6)
          to label %188 unwind label %204

188:                                              ; preds = %181
  %189 = load i64, ptr %19, align 8, !tbaa !9
  %190 = getelementptr inbounds i8, ptr %187, i64 %189
  %191 = load i64, ptr %21, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %186, ptr align 1 %190, i64 %191, i1 false)
  %192 = load i64, ptr %21, align 8, !tbaa !9
  %193 = load i64, ptr %20, align 8, !tbaa !9
  %194 = sub i64 %193, %192
  store i64 %194, ptr %20, align 8, !tbaa !9
  %195 = load i64, ptr %21, align 8, !tbaa !9
  %196 = load i64, ptr %19, align 8, !tbaa !9
  %197 = add i64 %196, %195
  store i64 %197, ptr %19, align 8, !tbaa !9
  %198 = load i64, ptr %18, align 8, !tbaa !9
  %199 = add i64 %198, 1
  store i64 %199, ptr %18, align 8, !tbaa !9
  br label %172, !llvm.loop !24

200:                                              ; preds = %137
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %11, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %12, align 4
  br label %224

204:                                              ; preds = %214, %181, %152
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %11, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %224

208:                                              ; preds = %172
  %209 = load i64, ptr %20, align 8, !tbaa !9
  %210 = icmp eq i64 %209, 0
  br i1 %210, label %211, label %212

211:                                              ; preds = %208
  br label %214

212:                                              ; preds = %208
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 92, ptr noundef @__PRETTY_FUNCTION__._ZN7cascadb7RAMFile5writeEmNS_5SliceE) #10
  unreachable

213:                                              ; No predecessors!
  br label %214

214:                                              ; preds = %213, %211
  invoke void @_ZN7cascadb11ScopedMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %215 unwind label %204

215:                                              ; preds = %214
  %216 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 4
  %217 = load i64, ptr %216, align 8, !tbaa !25
  %218 = load i64, ptr %10, align 8, !tbaa !9
  %219 = icmp ult i64 %217, %218
  br i1 %219, label %220, label %223

220:                                              ; preds = %215
  %221 = load i64, ptr %10, align 8, !tbaa !9
  %222 = getelementptr inbounds %"class.cascadb::RAMFile", ptr %24, i32 0, i32 4
  store i64 %221, ptr %222, align 8, !tbaa !25
  br label %223

223:                                              ; preds = %220, %215
  store i1 true, ptr %5, align 1
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %225

224:                                              ; preds = %204, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %227

225:                                              ; preds = %223, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @_ZN7cascadb11ScopedMutexD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  %226 = load i1, ptr %5, align 1
  ret i1 %226

227:                                              ; preds = %224, %135, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @_ZN7cascadb11ScopedMutexD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  br label %228

228:                                              ; preds = %227
  %229 = load ptr, ptr %11, align 8
  %230 = load i32, ptr %12, align 4
  %231 = insertvalue { ptr, i32 } poison, ptr %229, 0
  %232 = insertvalue { ptr, i32 } %231, i32 %230, 1
  resume { ptr, i32 } %232
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPcSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPcSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb11ScopedMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { 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, !10, i64 48}
!12 = !{!"_ZTSN7cascadb7RAMFileE", !13, i64 0, !10, i64 48, !15, i64 56, !10, i64 80, !10, i64 88}
!13 = !{!"_ZTSN7cascadb5MutexE", !14, i64 0, !7, i64 8}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIPcSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPcSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!12, !10, i64 80}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTSN7cascadb11LoggerLevelE", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!12, !10, i64 88}


; 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::ScopedMutex" = type { i8, ptr }

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._ZN7cascadb7RAMFile5writeEmNS_5SliceE = external hidden unnamed_addr constant [46 x i8], align 1

; 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 uwtable
declare dso_local void @_ZN7cascadb11ScopedMutexC2EPNS_5MutexE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb11ScopedMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPcSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress 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) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7cascadb7RAMFile5writeEmNS_5SliceE(ptr noundef nonnull align 8 dereferenceable(96) %0, i64 noundef %1, ptr %2, i32 %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.cascadb::Slice", align 8
  %6 = alloca %"class.cascadb::ScopedMutex", align 8
  %7 = alloca ptr, align 8
  store ptr %2, ptr %5, align 8
  %8 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 %3, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN7cascadb11ScopedMutexC2EPNS_5MutexE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %0)
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %10 = load i64, ptr %9, align 8, !tbaa !5
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %11, label %12

11:                                               ; preds = %4
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 55, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7cascadb7RAMFile5writeEmNS_5SliceE) #8
  unreachable

12:                                               ; preds = %4
  %13 = call noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
  %14 = add i64 %13, %1
  %15 = getelementptr inbounds i8, ptr %0, i64 80
  %16 = load i64, ptr %15, align 8, !tbaa !17
  %17 = icmp ugt i64 %14, %16
  br i1 %17, label %18, label %.loopexit

18:                                               ; preds = %12
  %reass.sub = sub i64 %14, %16
  %19 = add i64 %reass.sub, 4095
  %20 = lshr i64 %19, 12
  %21 = getelementptr inbounds i8, ptr %0, i64 56
  %22 = call noundef i64 @_ZNKSt6vectorIPcSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  %23 = add i64 %22, %20
  invoke void @_ZNSt6vectorIPcSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %23)
          to label %.preheader unwind label %26

.preheader:                                       ; preds = %18
  %.not71 = icmp ult i64 %19, 4096
  br i1 %.not71, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %umax = call i64 @llvm.umax.i64(i64 %20, i64 1)
  br label %.lr.ph

24:                                               ; preds = %.loopexit
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %63

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %63

.lr.ph:                                           ; preds = %.lr.ph.preheader, %30
  %.04665 = phi i64 [ %33, %30 ], [ 0, %.lr.ph.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %28 = invoke noalias noundef nonnull dereferenceable(4096) ptr @_Znam(i64 noundef 4096) #9
          to label %29 unwind label %34

29:                                               ; preds = %.lr.ph
  store ptr %28, ptr %7, align 8, !tbaa !18
  invoke void @_ZNSt6vectorIPcSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %30 unwind label %34

30:                                               ; preds = %29
  %31 = load i64, ptr %15, align 8, !tbaa !17
  %32 = add i64 %31, 4096
  store i64 %32, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %33 = add nuw nsw i64 %.04665, 1
  %exitcond.not = icmp eq i64 %33, %umax
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !19

34:                                               ; preds = %29, %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %63

.loopexit:                                        ; preds = %30, %.preheader, %12
  invoke void @_ZN7cascadb11ScopedMutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %36 unwind label %24

36:                                               ; preds = %.loopexit
  %37 = lshr i64 %1, 12
  %38 = call noundef i64 @_ZNK7cascadb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
  %39 = and i64 %1, 4095
  %40 = sub nuw nsw i64 4096, %39
  %41 = call i64 @llvm.umin.i64(i64 %38, i64 %40)
  %42 = getelementptr inbounds i8, ptr %0, i64 56
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPcSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %37) #7
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  %45 = getelementptr inbounds i8, ptr %44, i64 %39
  %46 = call noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %45, ptr align 1 %46, i64 %41, i1 false)
  %47 = sub i64 %38, %41
  %.not6166 = icmp eq i64 %47, 0
  br i1 %.not6166, label %._crit_edge, label %.lr.ph70

.lr.ph70:                                         ; preds = %36, %.lr.ph70
  %.069 = phi i64 [ %53, %.lr.ph70 ], [ %47, %36 ]
  %.04368 = phi i64 [ %54, %.lr.ph70 ], [ %41, %36 ]
  %.044.in67 = phi i64 [ %.044, %.lr.ph70 ], [ %37, %36 ]
  %.044 = add i64 %.044.in67, 1
  %48 = call i64 @llvm.umin.i64(i64 %.069, i64 4096)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPcSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %.044) #7
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = call noundef ptr @_ZNK7cascadb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
  %52 = getelementptr inbounds i8, ptr %51, i64 %.04368
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %50, ptr noundef nonnull align 1 dereferenceable(1) %52, i64 %48, i1 false)
  %53 = sub i64 %.069, %48
  %54 = add i64 %48, %.04368
  %.not61 = icmp eq i64 %53, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph70, !llvm.loop !21

55:                                               ; preds = %._crit_edge
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %63

._crit_edge:                                      ; preds = %.lr.ph70, %36
  invoke void @_ZN7cascadb11ScopedMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %57 unwind label %55

57:                                               ; preds = %._crit_edge
  %58 = getelementptr inbounds i8, ptr %0, i64 88
  %59 = load i64, ptr %58, align 8, !tbaa !22
  %60 = icmp ult i64 %59, %14
  br i1 %60, label %61, label %62

61:                                               ; preds = %57
  store i64 %14, ptr %58, align 8, !tbaa !22
  br label %62

62:                                               ; preds = %57, %61
  call void @_ZN7cascadb11ScopedMutexD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  ret i1 true

63:                                               ; preds = %26, %34, %55, %24
  %.pn63 = phi { ptr, i32 } [ %56, %55 ], [ %25, %24 ], [ %35, %34 ], [ %27, %26 ]
  call void @_ZN7cascadb11ScopedMutexD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn63
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPcSaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPcSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPcSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cascadb11ScopedMutex4lockEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { builtin allocsize(0) }

!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, !11, i64 48}
!6 = !{!"_ZTSN7cascadb7RAMFileE", !7, i64 0, !11, i64 48, !12, i64 56, !11, i64 80, !11, i64 88}
!7 = !{!"_ZTSN7cascadb5MutexE", !8, i64 0, !9, i64 8}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"long", !9, i64 0}
!12 = !{!"_ZTSSt6vectorIPcSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPcSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !9, i64 0}
!17 = !{!6, !11, i64 80}
!18 = !{!16, !16, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!6, !11, i64 88}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PromotePass,ReassociatePass,SROAPass,SimplifyCFGPass