; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src (cer-store)

; 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.__gnu_cxx::__normal_iterator" = 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.UapkiNS::Cert::CerStore" = type { %"class.std::mutex", %"class.std::__cxx11::basic_string", %"class.std::vector" }
%"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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<UapkiNS::Cert::CerItem *, std::allocator<UapkiNS::Cert::CerItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Cert::CerItem *, std::allocator<UapkiNS::Cert::CerItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Cert::CerItem *, std::allocator<UapkiNS::Cert::CerItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Cert::CerItem *, std::allocator<UapkiNS::Cert::CerItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Cert::CerStore::AddedCerItem" = type <{ i32, [4 x i8], ptr, i8, [7 x i8] }>

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Cert8CerStore8addCertsEbbRKNS_8VectorBAERSt6vectorINS1_12AddedCerItemESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %0, i1 noundef zeroext %1, i1 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::lock_guard", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  %30 = zext i1 %1 to i8
  store i8 %30, ptr %8, align 1, !tbaa !9
  %31 = zext i1 %2 to i8
  store i8 %31, ptr %9, align 1, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %32 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %33 = getelementptr inbounds %"class.UapkiNS::Cert::CerStore", ptr %32, i32 0, i32 0
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(40) %33)
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #7
  br i1 %35, label %36, label %37

36:                                               ; preds = %5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %227

37:                                               ; preds = %5
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  invoke void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40)
          to label %41 unwind label %48

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %42

42:                                               ; preds = %66, %41
  %43 = load i64, ptr %16, align 8, !tbaa !11
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  %46 = icmp ult i64 %43, %45
  br i1 %46, label %52, label %47

47:                                               ; preds = %42
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %73

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %14, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %15, align 4
  br label %229

52:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = load i64, ptr %16, align 8, !tbaa !11
  %55 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54) #7
  store ptr %55, ptr %17, align 8, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load i64, ptr %16, align 8, !tbaa !11
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %57) #7
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %60, i32 0, i32 2
  %62 = invoke noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef %59, ptr noundef %61)
          to label %63 unwind label %69

63:                                               ; preds = %52
  %64 = load ptr, ptr %17, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %64, i32 0, i32 0
  store i32 %62, ptr %65, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %66

66:                                               ; preds = %63
  %67 = load i64, ptr %16, align 8, !tbaa !11
  %68 = add i64 %67, 1
  store i64 %68, ptr %16, align 8, !tbaa !11
  br label %42, !llvm.loop !16

69:                                               ; preds = %52
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %14, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %229

73:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %74, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %75 = load ptr, ptr %18, align 8, !tbaa !5
  %76 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #7
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %78 = load ptr, ptr %18, align 8, !tbaa !5
  %79 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #7
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %79, ptr %80, align 8
  br label %81

81:                                               ; preds = %146, %73
  %82 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br i1 %82, label %84, label %83

83:                                               ; preds = %81
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %148

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %85 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  store ptr %85, ptr %21, align 8, !tbaa !5
  %86 = load ptr, ptr %21, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !13
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %84
  store i32 6, ptr %13, align 4
  br label %143

91:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !18
  %95 = invoke noundef ptr @_ZN7UapkiNS4Cert8CerStore7addItemEPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %32, ptr noundef %94)
          to label %96 unwind label %128

96:                                               ; preds = %91
  store ptr %95, ptr %22, align 8, !tbaa !5
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = load ptr, ptr %22, align 8, !tbaa !5
  %101 = icmp eq ptr %99, %100
  %102 = load ptr, ptr %21, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %102, i32 0, i32 3
  %104 = zext i1 %101 to i8
  store i8 %104, ptr %103, align 8, !tbaa !19
  %105 = load ptr, ptr %21, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %105, i32 0, i32 3
  %107 = load i8, ptr %106, align 8, !tbaa !19, !range !20, !noundef !21
  %108 = trunc i8 %107 to i1
  br i1 %108, label %109, label %132

109:                                              ; preds = %96
  %110 = load ptr, ptr %21, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %110, i32 0, i32 2
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = load i8, ptr %8, align 1, !tbaa !9, !range !20, !noundef !21
  %114 = trunc i8 %113 to i1
  invoke void @_ZN7UapkiNS4Cert7CerItem10setTrustedEb(ptr noundef nonnull align 8 dereferenceable(401) %112, i1 noundef zeroext %114)
          to label %115 unwind label %128

115:                                              ; preds = %109
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %116, i32 0, i32 2
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = load i8, ptr %8, align 1, !tbaa !9, !range !20, !noundef !21
  %120 = trunc i8 %119 to i1
  br i1 %120, label %125, label %121

121:                                              ; preds = %115
  %122 = load i8, ptr %9, align 1, !tbaa !9, !range !20, !noundef !21
  %123 = trunc i8 %122 to i1
  %124 = xor i1 %123, true
  br label %125

125:                                              ; preds = %121, %115
  %126 = phi i1 [ false, %115 ], [ %124, %121 ]
  invoke void @_ZN7UapkiNS4Cert7CerItem12markToRemoveEb(ptr noundef nonnull align 8 dereferenceable(401) %118, i1 noundef zeroext %126)
          to label %127 unwind label %128

127:                                              ; preds = %125
  br label %142

128:                                              ; preds = %125, %109, %91
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %14, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %229

132:                                              ; preds = %96
  %133 = load ptr, ptr %21, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !18
  %136 = icmp eq ptr %135, null
  br i1 %136, label %138, label %137

137:                                              ; preds = %132
  call void @_ZN7UapkiNS4Cert7CerItemD1Ev(ptr noundef nonnull align 8 dereferenceable(401) %135) #7
  call void @_ZdlPvm(ptr noundef %135, i64 noundef 408) #8
  br label %138

138:                                              ; preds = %137, %132
  %139 = load ptr, ptr %22, align 8, !tbaa !5
  %140 = load ptr, ptr %21, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %140, i32 0, i32 2
  store ptr %139, ptr %141, align 8, !tbaa !18
  br label %142

142:                                              ; preds = %138, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  store i32 0, ptr %13, align 4
  br label %143

143:                                              ; preds = %142, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  %144 = load i32, ptr %13, align 4
  switch i32 %144, label %235 [
    i32 0, label %145
    i32 6, label %146
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %143
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %81

148:                                              ; preds = %83
  %149 = load i8, ptr %9, align 1, !tbaa !9, !range !20, !noundef !21
  %150 = trunc i8 %149 to i1
  br i1 %150, label %151, label %226

151:                                              ; preds = %148
  %152 = getelementptr inbounds %"class.UapkiNS::Cert::CerStore", ptr %32, i32 0, i32 1
  %153 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %152) #7
  br i1 %153, label %226, label %154

154:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %155, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %156 = load ptr, ptr %23, align 8, !tbaa !5
  %157 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %156) #7
  %158 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %159 = load ptr, ptr %23, align 8, !tbaa !5
  %160 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %159) #7
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %160, ptr %161, align 8
  br label %162

162:                                              ; preds = %223, %154
  %163 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  br i1 %163, label %165, label %164

164:                                              ; preds = %162
  store i32 7, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %225

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %166 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  store ptr %166, ptr %26, align 8, !tbaa !5
  %167 = load ptr, ptr %26, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 8, !tbaa !13
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %222

171:                                              ; preds = %165
  %172 = load ptr, ptr %26, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %172, i32 0, i32 3
  %174 = load i8, ptr %173, align 8, !tbaa !19, !range !20, !noundef !21
  %175 = trunc i8 %174 to i1
  br i1 %175, label %176, label %222

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %177 = load ptr, ptr %26, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !18
  store ptr %179, ptr %27, align 8, !tbaa !5
  %180 = load ptr, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #7
  %181 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZNK7UapkiNS4Cert7CerItem16generateFileNameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, ptr noundef nonnull align 8 dereferenceable(401) %181)
          to label %182 unwind label %199

182:                                              ; preds = %176
  %183 = invoke noundef zeroext i1 @_ZN7UapkiNS4Cert7CerItem11setFileNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(401) %180, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %184 unwind label %203

184:                                              ; preds = %182
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  br i1 %183, label %185, label %217

185:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #7
  %186 = getelementptr inbounds %"class.UapkiNS::Cert::CerStore", ptr %32, i32 0, i32 1
  %187 = load ptr, ptr %27, align 8, !tbaa !5
  %188 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7UapkiNS4Cert7CerItem11getFileNameB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(401) %187)
          to label %189 unwind label %208

189:                                              ; preds = %185
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %29, ptr noundef nonnull align 8 dereferenceable(32) %186, ptr noundef nonnull align 8 dereferenceable(32) %188)
          to label %190 unwind label %208

190:                                              ; preds = %189
  %191 = load ptr, ptr %27, align 8, !tbaa !5
  %192 = invoke noundef ptr @_ZNK7UapkiNS4Cert7CerItem10getEncodedEv(ptr noundef nonnull align 8 dereferenceable(401) %191)
          to label %193 unwind label %212

193:                                              ; preds = %190
  %194 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  %195 = invoke i32 @ba_to_file(ptr noundef %192, ptr noundef %194)
          to label %196 unwind label %212

196:                                              ; preds = %193
  %197 = load ptr, ptr %26, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %197, i32 0, i32 0
  store i32 %195, ptr %198, align 8, !tbaa !13
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #7
  br label %220

199:                                              ; preds = %176
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %14, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %15, align 4
  br label %207

203:                                              ; preds = %182
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %14, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  br label %207

207:                                              ; preds = %203, %199
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  br label %221

208:                                              ; preds = %189, %185
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %14, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %15, align 4
  br label %216

212:                                              ; preds = %193, %190
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %14, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  br label %216

216:                                              ; preds = %212, %208
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #7
  br label %221

217:                                              ; preds = %184
  %218 = load ptr, ptr %26, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %218, i32 0, i32 0
  store i32 4097, ptr %219, align 8, !tbaa !13
  br label %220

220:                                              ; preds = %217, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %222

221:                                              ; preds = %216, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %229

222:                                              ; preds = %220, %171, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %223

223:                                              ; preds = %222
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br label %162

225:                                              ; preds = %164
  br label %226

226:                                              ; preds = %225, %151, %148
  store i32 0, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %227

227:                                              ; preds = %226, %36
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %228 = load i32, ptr %6, align 4
  ret i32 %228

229:                                              ; preds = %221, %128, %69, %48
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %230

230:                                              ; preds = %229
  %231 = load ptr, ptr %14, align 8
  %232 = load i32, ptr %15, align 4
  %233 = insertvalue { ptr, i32 } poison, ptr %231, 0
  %234 = insertvalue { ptr, i32 } %233, i32 %232, 1
  resume { ptr, i32 } %234

235:                                              ; preds = %143
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 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 nonnull align 8 dereferenceable(17) ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 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 dso_local ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

declare void @_ZN7UapkiNS4Cert7CerItem10setTrustedEb(ptr noundef nonnull align 8 dereferenceable(401), i1 noundef zeroext) #3

declare void @_ZN7UapkiNS4Cert7CerItem12markToRemoveEb(ptr noundef nonnull align 8 dereferenceable(401), i1 noundef zeroext) #3

; Function Attrs: nounwind
declare void @_ZN7UapkiNS4Cert7CerItemD1Ev(ptr noundef nonnull align 8 dereferenceable(401)) unnamed_addr #5

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

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

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

declare noundef zeroext i1 @_ZN7UapkiNS4Cert7CerItem11setFileNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(401), ptr noundef nonnull align 8 dereferenceable(32)) #3

declare void @_ZNK7UapkiNS4Cert7CerItem16generateFileNameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(401)) #3

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

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

declare i32 @ba_to_file(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS4Cert7CerItem10getEncodedEv(ptr noundef nonnull align 8 dereferenceable(401)) #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 nounwind uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { 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 = { inlinehint 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 #5 = { 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 #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin nounwind }

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

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


; 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 }
%"class.__gnu_cxx::__normal_iterator" = 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] }

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Cert8CerStore8addCertsEbbRKNS_8VectorBAERSt6vectorINS1_12AddedCerItemESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %0, i1 noundef zeroext %1, i1 noundef zeroext %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::lock_guard", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %0)
  %13 = call noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br i1 %13, label %100, label %14

14:                                               ; preds = %5
  %15 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  invoke void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %15)
          to label %.preheader unwind label %21

.preheader:                                       ; preds = %14
  %16 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not65 = icmp eq i64 %16, 0
  br i1 %.not65, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %28, %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %17 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %17, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %18 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %18, ptr %8, align 8
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %19, label %.lr.ph60, label %._crit_edge61

.lr.ph60:                                         ; preds = %._crit_edge
  %.demorgan = or i1 %1, %2
  %20 = xor i1 %.demorgan, true
  br label %34

21:                                               ; preds = %14
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %101

.lr.ph:                                           ; preds = %.preheader, %28
  %.05058 = phi i64 [ %29, %28 ], [ 0, %.preheader ]
  %23 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.05058) #7
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.05058) #7
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %23, i64 8
  %27 = invoke noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef %25, ptr noundef nonnull %26)
          to label %28 unwind label %32

28:                                               ; preds = %.lr.ph
  store i32 %27, ptr %23, align 8, !tbaa !9
  %29 = add nuw i64 %.05058, 1
  %30 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %31 = icmp ult i64 %29, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !13

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

._crit_edge61:                                    ; preds = %55, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br i1 %2, label %58, label %100

34:                                               ; preds = %.lr.ph60, %55
  %35 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %36 = load i32, ptr %35, align 8, !tbaa !9
  %.not = icmp eq i32 %36, 0
  br i1 %.not, label %37, label %55

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %35, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = invoke noundef ptr @_ZN7UapkiNS4Cert8CerStore7addItemEPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %39)
          to label %41 unwind label %49

41:                                               ; preds = %37
  %42 = load ptr, ptr %38, align 8, !tbaa !15
  %43 = icmp eq ptr %42, %40
  %44 = getelementptr inbounds i8, ptr %35, i64 16
  %45 = zext i1 %43 to i8
  store i8 %45, ptr %44, align 8, !tbaa !16
  br i1 %43, label %46, label %51

46:                                               ; preds = %41
  invoke void @_ZN7UapkiNS4Cert7CerItem10setTrustedEb(ptr noundef nonnull align 8 dereferenceable(401) %42, i1 noundef zeroext %1)
          to label %47 unwind label %49

47:                                               ; preds = %46
  %48 = load ptr, ptr %38, align 8, !tbaa !15
  invoke void @_ZN7UapkiNS4Cert7CerItem12markToRemoveEb(ptr noundef nonnull align 8 dereferenceable(401) %48, i1 noundef zeroext %20)
          to label %55 unwind label %49

49:                                               ; preds = %47, %46, %37
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %101

51:                                               ; preds = %41
  %52 = icmp eq ptr %42, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %51
  call void @_ZN7UapkiNS4Cert7CerItemD1Ev(ptr noundef nonnull align 8 dereferenceable(401) %42) #7
  call void @_ZdlPvm(ptr noundef nonnull %42, i64 noundef 408) #8
  br label %54

54:                                               ; preds = %53, %51
  store ptr %40, ptr %38, align 8, !tbaa !15
  br label %55

55:                                               ; preds = %54, %47, %34
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %57, label %34, label %._crit_edge61

58:                                               ; preds = %._crit_edge61
  %59 = getelementptr inbounds i8, ptr %0, i64 40
  %60 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %59) #7
  br i1 %60, label %100, label %61

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %62 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %62, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %63 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %63, ptr %10, align 8
  %64 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %64, label %.lr.ph63, label %._crit_edge64

._crit_edge64:                                    ; preds = %97, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %100

.lr.ph63:                                         ; preds = %61, %97
  %65 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %66 = load i32, ptr %65, align 8, !tbaa !9
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %97

68:                                               ; preds = %.lr.ph63
  %69 = getelementptr inbounds i8, ptr %65, i64 16
  %70 = load i8, ptr %69, align 8, !tbaa !16, !range !17, !noundef !18
  %71 = trunc nuw i8 %70 to i1
  br i1 %71, label %72, label %97

72:                                               ; preds = %68
  %73 = getelementptr inbounds i8, ptr %65, i64 8
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  invoke void @_ZNK7UapkiNS4Cert7CerItem16generateFileNameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(401) %74)
          to label %75 unwind label %85

75:                                               ; preds = %72
  %76 = invoke noundef zeroext i1 @_ZN7UapkiNS4Cert7CerItem11setFileNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(401) %74, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %77 unwind label %87

77:                                               ; preds = %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br i1 %76, label %78, label %95

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  %79 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7UapkiNS4Cert7CerItem11getFileNameB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(401) %74)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef nonnull align 8 dereferenceable(32) %79)
          to label %80 unwind label %90

80:                                               ; preds = %78
  %81 = call noundef ptr @_ZNK7UapkiNS4Cert7CerItem10getEncodedEv(ptr noundef nonnull align 8 dereferenceable(401) %74)
  %82 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  %83 = invoke i32 @ba_to_file(ptr noundef %81, ptr noundef %82)
          to label %84 unwind label %92

84:                                               ; preds = %80
  store i32 %83, ptr %65, align 8, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %97

85:                                               ; preds = %72
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %89

87:                                               ; preds = %75
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %89

89:                                               ; preds = %87, %85
  %.pn = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %96

90:                                               ; preds = %78
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %94

92:                                               ; preds = %80
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %94

94:                                               ; preds = %92, %90
  %.pn53 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %96

95:                                               ; preds = %77
  store i32 4097, ptr %65, align 8, !tbaa !9
  br label %97

96:                                               ; preds = %94, %89
  %.pn53.pn = phi { ptr, i32 } [ %.pn53, %94 ], [ %.pn, %89 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %101

97:                                               ; preds = %84, %95, %68, %.lr.ph63
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %99, label %.lr.ph63, label %._crit_edge64

100:                                              ; preds = %._crit_edge61, %58, %._crit_edge64, %5
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  ret i32 0

101:                                              ; preds = %96, %49, %32, %21
  %.pn56 = phi { ptr, i32 } [ %33, %32 ], [ %50, %49 ], [ %.pn53.pn, %96 ], [ %22, %21 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn56
}

; 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 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 noundef zeroext i1 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE6resizeEm(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 @_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 nonnull align 8 dereferenceable(17) ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 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 dso_local ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

declare void @_ZN7UapkiNS4Cert7CerItem10setTrustedEb(ptr noundef nonnull align 8 dereferenceable(401), i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN7UapkiNS4Cert7CerItem12markToRemoveEb(ptr noundef nonnull align 8 dereferenceable(401), i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN7UapkiNS4Cert7CerItemD1Ev(ptr noundef nonnull align 8 dereferenceable(401)) unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 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

declare noundef zeroext i1 @_ZN7UapkiNS4Cert7CerItem11setFileNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(401), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare void @_ZNK7UapkiNS4Cert7CerItem16generateFileNameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(401)) local_unnamed_addr #3

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

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

declare i32 @ba_to_file(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS4Cert7CerItem10getEncodedEv(ptr noundef nonnull align 8 dereferenceable(401)) 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 nounwind uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { inlinehint 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 #5 = { 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 #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass