; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src (cm-storage-proxy)

; 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.std::lock_guard" = type { ptr }
%class.CmStorageProxy = type { %class.CmLoader, %"struct.std::atomic", %"struct.std::atomic", %"class.std::mutex", ptr, ptr }
%class.CmLoader = type { %struct.CM_PROVIDER_API }
%struct.CM_PROVIDER_API = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.CM_KEY_API_ST = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK14CmStorageProxy15isOpenedStorageEv(ptr noundef nonnull align 8 dereferenceable(168)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

declare ptr @ba_copy_with_alloc(ptr noundef, i64 noundef, i64 noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

declare void @ba_free(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14CmStorageProxy12keyDhWrapKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_RKSt6vectorIP12ByteArray_stSaISA_EESE_PSC_RSC_(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::lock_guard", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %30 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %31 = getelementptr inbounds %class.CmStorageProxy, ptr %30, i32 0, i32 3
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(40) %31)
  %32 = invoke noundef zeroext i1 @_ZNK14CmStorageProxy15isOpenedStorageEv(ptr noundef nonnull align 8 dereferenceable(168) %30)
          to label %33 unwind label %35

33:                                               ; preds = %7
  br i1 %32, label %39, label %34

34:                                               ; preds = %33
  store i32 4121, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %262

35:                                               ; preds = %7
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %17, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %18, align 4
  br label %264

39:                                               ; preds = %33
  %40 = getelementptr inbounds %class.CmStorageProxy, ptr %30, i32 0, i32 5
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = icmp ne ptr %41, null
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 4108, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %262

44:                                               ; preds = %39
  %45 = getelementptr inbounds %class.CmStorageProxy, ptr %30, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.CM_KEY_API_ST, ptr %46, i32 0, i32 14
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %49 = icmp ne ptr %48, null
  br i1 %49, label %51, label %50

50:                                               ; preds = %44
  store i32 4118, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %262

51:                                               ; preds = %44
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %52) #4
  br i1 %53, label %66, label %54

54:                                               ; preds = %51
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %55) #4
  br i1 %56, label %66, label %57

57:                                               ; preds = %54
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = call noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #4
  br i1 %59, label %66, label %60

60:                                               ; preds = %57
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #4
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #4
  %65 = icmp ne i64 %62, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %60, %57, %54, %51
  store i32 4101, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %262

67:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #4
  %70 = trunc i64 %69 to i32
  store i32 %70, ptr %20, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  store ptr null, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %71 = getelementptr inbounds %class.CmStorageProxy, ptr %30, i32 0, i32 5
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.CM_KEY_API_ST, ptr %72, i32 0, i32 14
  %74 = load ptr, ptr %73, align 8, !tbaa !19
  %75 = getelementptr inbounds %class.CmStorageProxy, ptr %30, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %77) #4
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %79) #4
  %81 = load i32, ptr %20, align 4, !tbaa !21
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = call noundef ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #4
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = call noundef ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #4
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %89

88:                                               ; preds = %67
  br label %90

89:                                               ; preds = %67
  br label %90

90:                                               ; preds = %89, %88
  %91 = phi ptr [ %21, %88 ], [ null, %89 ]
  %92 = invoke noundef i32 %74(ptr noundef %76, ptr noundef %78, ptr noundef %80, i32 noundef %81, ptr noundef %83, ptr noundef %85, ptr noundef %91, ptr noundef %22)
          to label %93 unwind label %98

93:                                               ; preds = %90
  store i32 %92, ptr %23, align 4, !tbaa !21
  %94 = load i32, ptr %23, align 4, !tbaa !21
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %102

96:                                               ; preds = %93
  %97 = load i32, ptr %23, align 4, !tbaa !21
  store i32 %97, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %260

98:                                               ; preds = %198, %195, %156, %90
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %17, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %18, align 4
  br label %261

102:                                              ; preds = %93
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %153

105:                                              ; preds = %102
  %106 = load ptr, ptr %21, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %153

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %109, ptr %24, align 8, !tbaa !5
  %110 = load ptr, ptr %24, align 8, !tbaa !5
  %111 = load i32, ptr %20, align 4, !tbaa !21
  %112 = zext i32 %111 to i64
  invoke void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %112)
          to label %113 unwind label %119

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 0, ptr %25, align 4, !tbaa !21
  br label %114

114:                                              ; preds = %147, %113
  %115 = load i32, ptr %25, align 4, !tbaa !21
  %116 = load i32, ptr %20, align 4, !tbaa !21
  %117 = icmp ult i32 %115, %116
  br i1 %117, label %123, label %118

118:                                              ; preds = %114
  store i32 2, ptr %19, align 4
  br label %150

119:                                              ; preds = %108
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %17, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %18, align 4
  br label %152

123:                                              ; preds = %114
  %124 = load ptr, ptr %21, align 8, !tbaa !5
  %125 = load i32, ptr %25, align 4, !tbaa !21
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %124, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = invoke ptr @ba_copy_with_alloc(ptr noundef %128, i64 noundef 0, i64 noundef 0)
          to label %130 unwind label %142

130:                                              ; preds = %123
  %131 = load ptr, ptr %24, align 8, !tbaa !5
  %132 = load i32, ptr %25, align 4, !tbaa !21
  %133 = zext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %133) #4
  store ptr %129, ptr %134, align 8, !tbaa !5
  %135 = load ptr, ptr %24, align 8, !tbaa !5
  %136 = load i32, ptr %25, align 4, !tbaa !21
  %137 = zext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef %137) #4
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %146, label %141

141:                                              ; preds = %130
  store i32 4097, ptr %23, align 4, !tbaa !21
  store i32 2, ptr %19, align 4
  br label %150

142:                                              ; preds = %123
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %17, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %152

146:                                              ; preds = %130
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %25, align 4, !tbaa !21
  %149 = add i32 %148, 1
  store i32 %149, ptr %25, align 4, !tbaa !21
  br label %114, !llvm.loop !23

150:                                              ; preds = %141, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %151

151:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %153

152:                                              ; preds = %142, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %261

153:                                              ; preds = %151, %105, %102
  %154 = load i32, ptr %23, align 4, !tbaa !21
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %195

156:                                              ; preds = %153
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = load i32, ptr %20, align 4, !tbaa !21
  %159 = zext i32 %158 to i64
  invoke void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %159)
          to label %160 unwind label %98

160:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  store i32 0, ptr %26, align 4, !tbaa !21
  br label %161

161:                                              ; preds = %190, %160
  %162 = load i32, ptr %26, align 4, !tbaa !21
  %163 = load i32, ptr %20, align 4, !tbaa !21
  %164 = icmp ult i32 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 5, ptr %19, align 4
  br label %193

166:                                              ; preds = %161
  %167 = load ptr, ptr %22, align 8, !tbaa !5
  %168 = load i32, ptr %26, align 4, !tbaa !21
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds ptr, ptr %167, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  %172 = invoke ptr @ba_copy_with_alloc(ptr noundef %171, i64 noundef 0, i64 noundef 0)
          to label %173 unwind label %185

173:                                              ; preds = %166
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = load i32, ptr %26, align 4, !tbaa !21
  %176 = zext i32 %175 to i64
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %174, i64 noundef %176) #4
  store ptr %172, ptr %177, align 8, !tbaa !5
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  %179 = load i32, ptr %26, align 4, !tbaa !21
  %180 = zext i32 %179 to i64
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %180) #4
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %189, label %184

184:                                              ; preds = %173
  store i32 4097, ptr %23, align 4, !tbaa !21
  store i32 5, ptr %19, align 4
  br label %193

185:                                              ; preds = %166
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %17, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %261

189:                                              ; preds = %173
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %26, align 4, !tbaa !21
  %192 = add i32 %191, 1
  store i32 %192, ptr %26, align 4, !tbaa !21
  br label %161, !llvm.loop !25

193:                                              ; preds = %184, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194, %153
  %196 = load i32, ptr %20, align 4, !tbaa !21
  %197 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN14CmStorageProxy13arrayCmbaFreeEjPP12CM_BYTEARRAY(ptr noundef nonnull align 8 dereferenceable(168) %30, i32 noundef %196, ptr noundef %197)
          to label %198 unwind label %98

198:                                              ; preds = %195
  %199 = load i32, ptr %20, align 4, !tbaa !21
  %200 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN14CmStorageProxy13arrayCmbaFreeEjPP12CM_BYTEARRAY(ptr noundef nonnull align 8 dereferenceable(168) %30, i32 noundef %199, ptr noundef %200)
          to label %201 unwind label %98

201:                                              ; preds = %198
  %202 = load i32, ptr %23, align 4, !tbaa !21
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %258

204:                                              ; preds = %201
  %205 = load ptr, ptr %14, align 8, !tbaa !5
  %206 = icmp ne ptr %205, null
  br i1 %206, label %207, label %233

207:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %208 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %208, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  store i64 0, ptr %28, align 8, !tbaa !26
  br label %209

209:                                              ; preds = %224, %207
  %210 = load i64, ptr %28, align 8, !tbaa !26
  %211 = load ptr, ptr %27, align 8, !tbaa !5
  %212 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %211) #4
  %213 = icmp ult i64 %210, %212
  br i1 %213, label %215, label %214

214:                                              ; preds = %209
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  br label %231

215:                                              ; preds = %209
  %216 = load ptr, ptr %27, align 8, !tbaa !5
  %217 = load i64, ptr %28, align 8, !tbaa !26
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %216, i64 noundef %217) #4
  %219 = load ptr, ptr %218, align 8, !tbaa !5
  invoke void @ba_free(ptr noundef %219)
          to label %220 unwind label %227

220:                                              ; preds = %215
  %221 = load ptr, ptr %27, align 8, !tbaa !5
  %222 = load i64, ptr %28, align 8, !tbaa !26
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %222) #4
  store ptr null, ptr %223, align 8, !tbaa !5
  br label %224

224:                                              ; preds = %220
  %225 = load i64, ptr %28, align 8, !tbaa !26
  %226 = add i64 %225, 1
  store i64 %226, ptr %28, align 8, !tbaa !26
  br label %209, !llvm.loop !28

227:                                              ; preds = %215
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %17, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %261

231:                                              ; preds = %214
  %232 = load ptr, ptr %27, align 8, !tbaa !5
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %232) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %233

233:                                              ; preds = %231, %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  store i64 0, ptr %29, align 8, !tbaa !26
  br label %234

234:                                              ; preds = %249, %233
  %235 = load i64, ptr %29, align 8, !tbaa !26
  %236 = load ptr, ptr %15, align 8, !tbaa !5
  %237 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %236) #4
  %238 = icmp ult i64 %235, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %234
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  br label %256

240:                                              ; preds = %234
  %241 = load ptr, ptr %15, align 8, !tbaa !5
  %242 = load i64, ptr %29, align 8, !tbaa !26
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %241, i64 noundef %242) #4
  %244 = load ptr, ptr %243, align 8, !tbaa !5
  invoke void @ba_free(ptr noundef %244)
          to label %245 unwind label %252

245:                                              ; preds = %240
  %246 = load ptr, ptr %15, align 8, !tbaa !5
  %247 = load i64, ptr %29, align 8, !tbaa !26
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %246, i64 noundef %247) #4
  store ptr null, ptr %248, align 8, !tbaa !5
  br label %249

249:                                              ; preds = %245
  %250 = load i64, ptr %29, align 8, !tbaa !26
  %251 = add i64 %250, 1
  store i64 %251, ptr %29, align 8, !tbaa !26
  br label %234, !llvm.loop !29

252:                                              ; preds = %240
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %17, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  br label %261

256:                                              ; preds = %239
  %257 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %257) #4
  br label %258

258:                                              ; preds = %256, %201
  %259 = load i32, ptr %23, align 4, !tbaa !21
  store i32 %259, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %260

260:                                              ; preds = %258, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %262

261:                                              ; preds = %252, %227, %185, %152, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %264

262:                                              ; preds = %260, %66, %50, %43, %34
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %263 = load i32, ptr %8, align 4
  ret i32 %263

264:                                              ; preds = %261, %35
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %265

265:                                              ; preds = %264
  %266 = load ptr, ptr %17, align 8
  %267 = load i32, ptr %18, align 4
  %268 = insertvalue { ptr, i32 } poison, ptr %266, 0
  %269 = insertvalue { ptr, i32 } %268, i32 %267, 1
  resume { ptr, i32 } %269
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 160}
!10 = !{!"_ZTS14CmStorageProxy", !11, i64 0, !14, i64 104, !14, i64 105, !17, i64 112, !6, i64 152, !6, i64 160}
!11 = !{!"_ZTS8CmLoader", !12, i64 0}
!12 = !{!"_ZTS15CM_PROVIDER_API", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6atomicIbE", !15, i64 0}
!15 = !{!"_ZTSSt13__atomic_baseIbE", !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSSt5mutex", !18, i64 0}
!18 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!19 = !{!20, !6, i64 112}
!20 = !{!"_ZTS13CM_KEY_API_ST", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152}
!21 = !{!13, !13, i64 0}
!22 = !{!10, !6, i64 152}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!27, !27, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = distinct !{!28, !24}
!29 = distinct !{!29, !24}


; 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.std::lock_guard" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK14CmStorageProxy15isOpenedStorageEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

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

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

declare ptr @ba_copy_with_alloc(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

declare void @ba_free(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14CmStorageProxy12keyDhWrapKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_RKSt6vectorIP12ByteArray_stSaISA_EESE_PSC_RSC_(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(24) %6) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::lock_guard", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(40) %11)
  %12 = call noundef zeroext i1 @_ZNK14CmStorageProxy15isOpenedStorageEv(ptr noundef nonnull align 8 dereferenceable(168) %0)
  br i1 %12, label %13, label %102

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 160
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %102, label %16

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %15, i64 112
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %.not78 = icmp eq ptr %18, null
  br i1 %.not78, label %102, label %19

19:                                               ; preds = %16
  %20 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  br i1 %20, label %102, label %21

21:                                               ; preds = %19
  %22 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br i1 %22, label %102, label %23

23:                                               ; preds = %21
  %24 = call noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br i1 %24, label %102, label %25

25:                                               ; preds = %23
  %26 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %27 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %.not79 = icmp eq i64 %26, %27
  br i1 %.not79, label %28, label %102

28:                                               ; preds = %25
  %29 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %30 = trunc i64 %29 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr null, ptr %9, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  store ptr null, ptr %10, align 8, !tbaa !20
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 112
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %0, i64 152
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %37 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %38 = call noundef ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %39 = call noundef ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %40 = icmp ne ptr %5, null
  %. = select i1 %40, ptr %9, ptr null
  %41 = invoke noundef i32 %33(ptr noundef %35, ptr noundef %36, ptr noundef %37, i32 noundef %30, ptr noundef %38, ptr noundef %39, ptr noundef %., ptr noundef nonnull %10)
          to label %42 unwind label %43

42:                                               ; preds = %28
  %.not80 = icmp eq i32 %41, 0
  br i1 %.not80, label %45, label %100

43:                                               ; preds = %75, %.loopexit, %.loopexit90, %28
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %101

45:                                               ; preds = %42
  %46 = load ptr, ptr %9, align 8
  %47 = icmp ne ptr %46, null
  %or.cond = select i1 %40, i1 %47, i1 false
  %48 = and i64 %29, 4294967295
  br i1 %or.cond, label %49, label %.loopexit90

49:                                               ; preds = %45
  invoke void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48)
          to label %.preheader89 unwind label %51

.preheader89:                                     ; preds = %49
  %.not105 = icmp eq i32 %30, 0
  br i1 %.not105, label %.loopexit90, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader89
  %wide.trip.count = and i64 %29, 4294967295
  br label %.lr.ph

50:                                               ; preds = %57
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit90, label %.lr.ph, !llvm.loop !22

51:                                               ; preds = %49
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %101

.lr.ph:                                           ; preds = %.lr.ph.preheader, %50
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %50 ]
  %53 = load ptr, ptr %9, align 8, !tbaa !20
  %54 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  %56 = invoke ptr @ba_copy_with_alloc(ptr noundef %55, i64 noundef 0, i64 noundef 0)
          to label %57 unwind label %61

57:                                               ; preds = %.lr.ph
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  store ptr %56, ptr %58, align 8, !tbaa !20
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #4
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %.not82 = icmp eq ptr %60, null
  br i1 %.not82, label %.loopexit, label %50

61:                                               ; preds = %.lr.ph
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %101

.loopexit90:                                      ; preds = %50, %45, %.preheader89
  invoke void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %48)
          to label %.preheader88 unwind label %43

.preheader88:                                     ; preds = %.loopexit90
  %.not106 = icmp eq i32 %30, 0
  br i1 %.not106, label %.loopexit, label %.lr.ph94.preheader

.lr.ph94.preheader:                               ; preds = %.preheader88
  %wide.trip.count114 = and i64 %29, 4294967295
  br label %.lr.ph94

63:                                               ; preds = %68
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count114
  br i1 %exitcond115.not, label %.loopexit, label %.lr.ph94, !llvm.loop !24

.lr.ph94:                                         ; preds = %.lr.ph94.preheader, %63
  %indvars.iv111 = phi i64 [ 0, %.lr.ph94.preheader ], [ %indvars.iv.next112, %63 ]
  %64 = load ptr, ptr %10, align 8, !tbaa !20
  %65 = getelementptr inbounds ptr, ptr %64, i64 %indvars.iv111
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = invoke ptr @ba_copy_with_alloc(ptr noundef %66, i64 noundef 0, i64 noundef 0)
          to label %68 unwind label %72

68:                                               ; preds = %.lr.ph94
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv111) #4
  store ptr %67, ptr %69, align 8, !tbaa !20
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv111) #4
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %.not83.not = icmp ne ptr %71, null
  br i1 %.not83.not, label %63, label %.loopexit

72:                                               ; preds = %.lr.ph94
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %101

.loopexit:                                        ; preds = %57, %68, %63, %.preheader88
  %.not84 = phi i1 [ true, %.preheader88 ], [ %.not83.not, %63 ], [ %.not83.not, %68 ], [ false, %57 ]
  %.3 = phi i32 [ 0, %.preheader88 ], [ 4097, %68 ], [ 0, %63 ], [ 4097, %57 ]
  %74 = load ptr, ptr %9, align 8, !tbaa !20
  invoke void @_ZN14CmStorageProxy13arrayCmbaFreeEjPP12CM_BYTEARRAY(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %30, ptr noundef %74)
          to label %75 unwind label %43

75:                                               ; preds = %.loopexit
  %76 = load ptr, ptr %10, align 8, !tbaa !20
  invoke void @_ZN14CmStorageProxy13arrayCmbaFreeEjPP12CM_BYTEARRAY(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %30, ptr noundef %76)
          to label %77 unwind label %43

77:                                               ; preds = %75
  br i1 %.not84, label %100, label %78

78:                                               ; preds = %77
  br i1 %40, label %.preheader, label %89

.preheader:                                       ; preds = %78
  %79 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.not107 = icmp eq i64 %79, 0
  br i1 %.not107, label %._crit_edge, label %.lr.ph100

._crit_edge:                                      ; preds = %82, %.preheader
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %89

.lr.ph100:                                        ; preds = %.preheader, %82
  %.06399 = phi i64 [ %84, %82 ], [ 0, %.preheader ]
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.06399) #4
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  invoke void @ba_free(ptr noundef %81)
          to label %82 unwind label %87

82:                                               ; preds = %.lr.ph100
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.06399) #4
  store ptr null, ptr %83, align 8, !tbaa !20
  %84 = add nuw i64 %.06399, 1
  %85 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %86 = icmp ult i64 %84, %85
  br i1 %86, label %.lr.ph100, label %._crit_edge, !llvm.loop !25

87:                                               ; preds = %.lr.ph100
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %101

89:                                               ; preds = %._crit_edge, %78
  %90 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %.not108 = icmp eq i64 %90, 0
  br i1 %.not108, label %._crit_edge104, label %.lr.ph103

._crit_edge104:                                   ; preds = %93, %89
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %100

.lr.ph103:                                        ; preds = %89, %93
  %.0101 = phi i64 [ %95, %93 ], [ 0, %89 ]
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.0101) #4
  %92 = load ptr, ptr %91, align 8, !tbaa !20
  invoke void @ba_free(ptr noundef %92)
          to label %93 unwind label %98

93:                                               ; preds = %.lr.ph103
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.0101) #4
  store ptr null, ptr %94, align 8, !tbaa !20
  %95 = add nuw i64 %.0101, 1
  %96 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %.lr.ph103, label %._crit_edge104, !llvm.loop !26

98:                                               ; preds = %.lr.ph103
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %101

100:                                              ; preds = %77, %._crit_edge104, %42
  %.064 = phi i32 [ %41, %42 ], [ %.3, %._crit_edge104 ], [ 0, %77 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %102

101:                                              ; preds = %51, %61, %98, %87, %72, %43
  %.pn85 = phi { ptr, i32 } [ %88, %87 ], [ %99, %98 ], [ %44, %43 ], [ %73, %72 ], [ %62, %61 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  resume { ptr, i32 } %.pn85

102:                                              ; preds = %19, %21, %23, %25, %16, %13, %7, %100
  %.1 = phi i32 [ %.064, %100 ], [ 4121, %7 ], [ 4108, %13 ], [ 4118, %16 ], [ 4101, %25 ], [ 4101, %23 ], [ 4101, %21 ], [ 4101, %19 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  ret i32 %.1
}

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

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

!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, !12, i64 160}
!6 = !{!"_ZTS14CmStorageProxy", !7, i64 0, !13, i64 104, !13, i64 105, !16, i64 112, !12, i64 152, !12, i64 160}
!7 = !{!"_ZTS8CmLoader", !8, i64 0}
!8 = !{!"_ZTS15CM_PROVIDER_API", !9, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"_ZTSSt6atomicIbE", !14, i64 0}
!14 = !{!"_ZTSSt13__atomic_baseIbE", !15, i64 0}
!15 = !{!"bool", !10, i64 0}
!16 = !{!"_ZTSSt5mutex", !17, i64 0}
!17 = !{!"_ZTSSt12__mutex_base", !10, i64 0}
!18 = !{!19, !12, i64 112}
!19 = !{!"_ZTS13CM_KEY_API_ST", !9, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152}
!20 = !{!12, !12, i64 0}
!21 = !{!6, !12, i64 152}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass