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

; 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.UapkiNS::SmartBA" = type { ptr }
%"class.UapkiNS::Cert::CerItem" = type <{ %"class.std::mutex", %"class.std::__cxx11::basic_string", ptr, ptr, ptr, ptr, %"class.std::__cxx11::basic_string", ptr, ptr, ptr, ptr, ptr, i32, [4 x i8], i64, i64, i32, %"struct.std::atomic", [3 x i8], %"struct.UapkiNS::Cert::CerItem::Uris", i32, [4 x i8], %"class.std::vector.3", %"struct.UapkiNS::Cert::CertStatusInfo", %"struct.UapkiNS::Cert::CertStatusInfo", %"struct.std::atomic", [7 x 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 }
%"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] }
%"struct.UapkiNS::Cert::CerItem::Uris" = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<UapkiNS::AttrCertId *, std::allocator<UapkiNS::AttrCertId *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::AttrCertId *, std::allocator<UapkiNS::AttrCertId *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::AttrCertId *, std::allocator<UapkiNS::AttrCertId *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::AttrCertId *, std::allocator<UapkiNS::AttrCertId *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Cert::CertStatusInfo" = type { i32, %"struct.std::atomic", ptr, i32, i64 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"struct.UapkiNS::OtherHash" = type { %"struct.UapkiNS::AlgorithmIdentifier", ptr }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%"struct.UapkiNS::AttrCertId" = type { %"struct.UapkiNS::OtherHash", %"struct.UapkiNS::AttrCertId::IssuerSerial" }
%"struct.UapkiNS::AttrCertId::IssuerSerial" = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Cert7CerItem17generateEssCertIdERKNS_19AlgorithmIdentifierEPPKNS_10AttrCertIdE(ptr noundef nonnull align 8 dereferenceable(401) %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef %2) #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::lock_guard", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.UapkiNS::SmartBA", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %21 = getelementptr inbounds %"class.UapkiNS::Cert::CerItem", ptr %20, i32 0, i32 0
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(40) %21)
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = invoke noundef zeroext i1 @_ZNK7UapkiNS19AlgorithmIdentifier9isPresentEv(ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %24 unwind label %29

24:                                               ; preds = %3
  br i1 %23, label %25, label %28

25:                                               ; preds = %24
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %33, label %28

28:                                               ; preds = %25, %24
  store i32 4101, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %183

29:                                               ; preds = %3
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %9, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %10, align 4
  br label %185

33:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %34 = getelementptr inbounds %"class.UapkiNS::Cert::CerItem", ptr %20, i32 0, i32 22
  store ptr %34, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = call ptr @_ZNSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #9
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = call ptr @_ZNSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #9
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  br label %41

41:                                               ; preds = %61, %33
  %42 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  br i1 %42, label %44, label %43

43:                                               ; preds = %41
  store i32 2, ptr %11, align 4
  br label %63

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  store ptr %45, ptr %15, align 8, !tbaa !5
  %46 = load ptr, ptr %15, align 8, !tbaa !5
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %50, i32 0, i32 0
  %52 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef nonnull align 8 dereferenceable(32) %51) #9
  br i1 %52, label %53, label %57

53:                                               ; preds = %44
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %55, ptr %56, align 8, !tbaa !5
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %58

57:                                               ; preds = %44
  store i32 0, ptr %11, align 4
  br label %58

58:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  %59 = load i32, ptr %11, align 4
  switch i32 %59, label %63 [
    i32 0, label %60
  ]

60:                                               ; preds = %58
  br label %61

61:                                               ; preds = %60
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %41

63:                                               ; preds = %58, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  %64 = load i32, ptr %11, align 4
  switch i32 %64, label %183 [
    i32 2, label %65
  ]

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %66, i32 0, i32 0
  %68 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %67) #9
  %69 = invoke i32 @hash_from_oid(ptr noundef %68)
          to label %70 unwind label %74

70:                                               ; preds = %65
  store i32 %69, ptr %16, align 4, !tbaa !9
  %71 = load i32, ptr %16, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %78

73:                                               ; preds = %70
  store i32 4110, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %181

74:                                               ; preds = %65
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %9, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %10, align 4
  br label %182

78:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %79 unwind label %91

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %80 = load i32, ptr %16, align 4, !tbaa !9
  %81 = getelementptr inbounds %"class.UapkiNS::Cert::CerItem", ptr %20, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %84 unwind label %95

84:                                               ; preds = %79
  %85 = invoke i32 @hash(i32 noundef %80, ptr noundef %82, ptr noundef %83)
          to label %86 unwind label %95

86:                                               ; preds = %84
  store i32 %85, ptr %18, align 4, !tbaa !35
  %87 = load i32, ptr %18, align 4, !tbaa !35
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %99

89:                                               ; preds = %86
  %90 = load i32, ptr %18, align 4, !tbaa !35
  store i32 %90, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %178

91:                                               ; preds = %78
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %180

95:                                               ; preds = %84, %79
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  br label %179

99:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %100 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #10
          to label %101 unwind label %106

101:                                              ; preds = %99
  call void @llvm.memset.p0.i64(ptr align 16 %100, i8 0, i64 64, i1 false)
  invoke void @_ZN7UapkiNS10AttrCertIdC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %100)
          to label %102 unwind label %110

102:                                              ; preds = %101
  store ptr %100, ptr %19, align 8, !tbaa !5
  %103 = load ptr, ptr %19, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %114, label %105

105:                                              ; preds = %102
  store i32 4097, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %176

106:                                              ; preds = %165, %160, %146, %141, %131, %126, %121, %114, %99
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %9, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %10, align 4
  br label %177

110:                                              ; preds = %101
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %9, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %100, i64 noundef 64) #11
  br label %177

114:                                              ; preds = %102
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = invoke noundef zeroext i1 @_ZN7UapkiNS19AlgorithmIdentifier4copyERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %116, ptr noundef nonnull align 8 dereferenceable(40) %117)
          to label %119 unwind label %106

119:                                              ; preds = %114
  br i1 %118, label %126, label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  store i32 4097, ptr %18, align 4, !tbaa !35
  %122 = load i32, ptr %18, align 4, !tbaa !35
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 260, i32 noundef %122, ptr noundef null)
          to label %123 unwind label %106

123:                                              ; preds = %121
  br label %170

124:                                              ; No predecessors!
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125, %119
  %127 = invoke noundef ptr @_ZN7UapkiNS7SmartBA3popEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %128 unwind label %106

128:                                              ; preds = %126
  %129 = load ptr, ptr %19, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %129, i32 0, i32 1
  store ptr %127, ptr %130, align 8, !tbaa !36
  br label %131

131:                                              ; preds = %128
  %132 = getelementptr inbounds %"class.UapkiNS::Cert::CerItem", ptr %20, i32 0, i32 9
  %133 = load ptr, ptr %132, align 8, !tbaa !39
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.UapkiNS::AttrCertId", ptr %134, i32 0, i32 1
  %136 = getelementptr inbounds %"struct.UapkiNS::AttrCertId::IssuerSerial", ptr %135, i32 0, i32 0
  %137 = invoke noundef i32 @_ZN7UapkiNS4Cert20issuerToGeneralNamesEPK12ByteArray_stPPS1_(ptr noundef %133, ptr noundef %136)
          to label %138 unwind label %106

138:                                              ; preds = %131
  store i32 %137, ptr %18, align 4, !tbaa !35
  %139 = load i32, ptr %18, align 4, !tbaa !35
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %144

141:                                              ; preds = %138
  %142 = load i32, ptr %18, align 4, !tbaa !35
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 263, i32 noundef %142)
          to label %143 unwind label %106

143:                                              ; preds = %141
  br label %170

144:                                              ; preds = %138
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = getelementptr inbounds %"class.UapkiNS::Cert::CerItem", ptr %20, i32 0, i32 7
  %148 = load ptr, ptr %147, align 8, !tbaa !40
  %149 = invoke ptr @ba_copy_with_alloc(ptr noundef %148, i64 noundef 0, i64 noundef 0)
          to label %150 unwind label %106

150:                                              ; preds = %146
  %151 = load ptr, ptr %19, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.UapkiNS::AttrCertId", ptr %151, i32 0, i32 1
  %153 = getelementptr inbounds %"struct.UapkiNS::AttrCertId::IssuerSerial", ptr %152, i32 0, i32 1
  store ptr %149, ptr %153, align 8, !tbaa !41
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.UapkiNS::AttrCertId", ptr %154, i32 0, i32 1
  %156 = getelementptr inbounds %"struct.UapkiNS::AttrCertId::IssuerSerial", ptr %155, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !41
  %158 = icmp ne ptr %157, null
  br i1 %158, label %165, label %159

159:                                              ; preds = %150
  br label %160

160:                                              ; preds = %159
  store i32 4097, ptr %18, align 4, !tbaa !35
  %161 = load i32, ptr %18, align 4, !tbaa !35
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 266, i32 noundef %161, ptr noundef null)
          to label %162 unwind label %106

162:                                              ; preds = %160
  br label %170

163:                                              ; No predecessors!
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164, %150
  %166 = getelementptr inbounds %"class.UapkiNS::Cert::CerItem", ptr %20, i32 0, i32 22
  invoke void @_ZNSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %166, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %167 unwind label %106

167:                                              ; preds = %165
  %168 = load ptr, ptr %19, align 8, !tbaa !5
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %168, ptr %169, align 8, !tbaa !5
  store ptr null, ptr %19, align 8, !tbaa !5
  br label %170

170:                                              ; preds = %167, %162, %143, %123
  %171 = load ptr, ptr %19, align 8, !tbaa !5
  %172 = icmp eq ptr %171, null
  br i1 %172, label %174, label %173

173:                                              ; preds = %170
  call void @_ZN7UapkiNS10AttrCertIdD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %171) #9
  call void @_ZdlPvm(ptr noundef %171, i64 noundef 64) #11
  br label %174

174:                                              ; preds = %173, %170
  %175 = load i32, ptr %18, align 4, !tbaa !35
  store i32 %175, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %176

176:                                              ; preds = %174, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %178

177:                                              ; preds = %110, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %179

178:                                              ; preds = %176, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %181

179:                                              ; preds = %177, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  br label %180

180:                                              ; preds = %179, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %182

181:                                              ; preds = %178, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %183

182:                                              ; preds = %180, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %185

183:                                              ; preds = %181, %63, %28
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  %184 = load i32, ptr %4, align 4
  ret i32 %184

185:                                              ; preds = %182, %29
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %9, align 8
  %188 = load i32, ptr %10, align 4
  %189 = insertvalue { ptr, i32 } poison, ptr %187, 0
  %190 = insertvalue { ptr, i32 } %189, i32 %188, 1
  resume { ptr, i32 } %190
}

; 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 #5 align 2

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

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

declare i32 @hash_from_oid(ptr noundef) #0

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

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

declare i32 @hash(i32 noundef, ptr noundef, ptr noundef) #0

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7UapkiNS10AttrCertIdC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #8 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7UapkiNS19AlgorithmIdentifier4copyERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS4Cert20issuerToGeneralNamesEPK12ByteArray_stPPS1_(ptr noundef, ptr noundef) #5

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #0

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

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

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

attributes #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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 = !{!"_ZTS7HashAlg", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"_ZTSN7UapkiNS4Cert7CerItemE", !13, i64 0, !15, i64 40, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !15, i64 104, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !17, i64 184, !17, i64 192, !18, i64 200, !19, i64 204, !22, i64 208, !27, i64 304, !28, i64 312, !32, i64 336, !32, i64 368, !19, i64 400}
!13 = !{!"_ZTSSt5mutex", !14, i64 0}
!14 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSSt6atomicIbE", !20, i64 0}
!20 = !{!"_ZTSSt13__atomic_baseIbE", !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN7UapkiNS4Cert7CerItem4UrisE", !23, i64 0, !23, i64 24, !23, i64 48, !23, i64 72}
!23 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSN7UapkiNS4Cert12VerifyStatusE", !7, i64 0}
!28 = !{!"_ZTSSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS10AttrCertIdESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS10AttrCertIdESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS10AttrCertIdESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSN7UapkiNS4Cert14CertStatusInfoE", !33, i64 0, !19, i64 4, !6, i64 8, !34, i64 16, !17, i64 24}
!33 = !{!"_ZTSN7UapkiNS4Cert14ValidationTypeE", !7, i64 0}
!34 = !{!"_ZTSN7UapkiNS10CertStatusE", !7, i64 0}
!35 = !{!18, !18, i64 0}
!36 = !{!37, !6, i64 40}
!37 = !{!"_ZTSN7UapkiNS9OtherHashE", !38, i64 0, !6, i64 40}
!38 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !15, i64 0, !6, i64 32}
!39 = !{!12, !6, i64 152}
!40 = !{!12, !6, i64 136}
!41 = !{!42, !6, i64 56}
!42 = !{!"_ZTSN7UapkiNS10AttrCertIdE", !37, i64 0, !43, i64 48}
!43 = !{!"_ZTSN7UapkiNS10AttrCertId12IssuerSerialE", !6, i64 0, !6, i64 8}


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

@.str = external hidden unnamed_addr constant [19 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Cert7CerItem17generateEssCertIdERKNS_19AlgorithmIdentifierEPPKNS_10AttrCertIdE(ptr noundef nonnull align 8 dereferenceable(401) %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef writeonly %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::lock_guard", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.UapkiNS::SmartBA", align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(40) %0)
  %9 = call noundef zeroext i1 @_ZNK7UapkiNS19AlgorithmIdentifier9isPresentEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %10 = icmp ne ptr %2, null
  %or.cond = and i1 %10, %9
  br i1 %or.cond, label %11, label %71

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 312
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %13 = call ptr @_ZNSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  store ptr %13, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %14 = call ptr @_ZNSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  store ptr %14, ptr %6, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11, %.critedge
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  br i1 %18, label %19, label %.critedge

19:                                               ; preds = %.lr.ph
  %20 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %20, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %71

.critedge:                                        ; preds = %.lr.ph
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %22 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS10AttrCertIdESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %22, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.critedge, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  %23 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %24 = invoke i32 @hash_from_oid(ptr noundef %23)
          to label %25 unwind label %27

25:                                               ; preds = %._crit_edge
  %26 = icmp eq i32 %24, 0
  br i1 %26, label %71, label %29

27:                                               ; preds = %._crit_edge
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %70

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %30 = getelementptr inbounds i8, ptr %0, i64 72
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %33 = invoke i32 @hash(i32 noundef %24, ptr noundef %31, ptr noundef %32)
          to label %34 unwind label %35

34:                                               ; preds = %29
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %37, label %68

35:                                               ; preds = %29
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %69

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %38 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #10
          to label %39 unwind label %42

39:                                               ; preds = %37
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %38, i8 0, i64 64, i1 false)
  invoke void @_ZN7UapkiNS10AttrCertIdC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %38)
          to label %40 unwind label %44

40:                                               ; preds = %39
  store ptr %38, ptr %8, align 8, !tbaa !5
  %41 = invoke noundef zeroext i1 @_ZN7UapkiNS19AlgorithmIdentifier4copyERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %38, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %46 unwind label %42

42:                                               ; preds = %.invoke, %63, %56, %55, %47, %40, %37
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %67

44:                                               ; preds = %39
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 64) #11
  br label %67

46:                                               ; preds = %40
  br i1 %41, label %47, label %.invoke

47:                                               ; preds = %46
  %48 = call noundef ptr @_ZN7UapkiNS7SmartBA3popEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %49 = getelementptr inbounds i8, ptr %38, i64 40
  store ptr %48, ptr %49, align 8, !tbaa !34
  %50 = getelementptr inbounds i8, ptr %0, i64 152
  %51 = load ptr, ptr %50, align 8, !tbaa !37
  %52 = getelementptr inbounds i8, ptr %38, i64 48
  %53 = invoke noundef i32 @_ZN7UapkiNS4Cert20issuerToGeneralNamesEPK12ByteArray_stPPS1_(ptr noundef %51, ptr noundef nonnull %52)
          to label %54 unwind label %42

54:                                               ; preds = %47
  %.not42 = icmp eq i32 %53, 0
  br i1 %.not42, label %56, label %55

55:                                               ; preds = %54
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 263, i32 noundef %53)
          to label %65 unwind label %42

56:                                               ; preds = %54
  %57 = getelementptr inbounds i8, ptr %0, i64 136
  %58 = load ptr, ptr %57, align 8, !tbaa !38
  %59 = invoke ptr @ba_copy_with_alloc(ptr noundef %58, i64 noundef 0, i64 noundef 0)
          to label %60 unwind label %42

60:                                               ; preds = %56
  %61 = getelementptr inbounds i8, ptr %38, i64 56
  store ptr %59, ptr %61, align 8, !tbaa !39
  %.not43 = icmp eq ptr %59, null
  br i1 %.not43, label %.invoke, label %63

.invoke:                                          ; preds = %60, %46
  %62 = phi i64 [ 260, %46 ], [ 266, %60 ]
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef %62, i32 noundef 4097, ptr noundef null)
          to label %65 unwind label %42

63:                                               ; preds = %60
  invoke void @_ZNSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %.thread unwind label %42

.thread:                                          ; preds = %63
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %64, ptr %2, align 8, !tbaa !5
  br label %66

65:                                               ; preds = %.invoke, %55
  %.0.ph = phi i32 [ %53, %55 ], [ 4097, %.invoke ]
  call void @_ZN7UapkiNS10AttrCertIdD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %38) #9
  call void @_ZdlPvm(ptr noundef nonnull %38, i64 noundef 64) #11
  br label %66

66:                                               ; preds = %.thread, %65
  %.050 = phi i32 [ 0, %.thread ], [ %.0.ph, %65 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %68

67:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %69

68:                                               ; preds = %34, %66
  %.4 = phi i32 [ %.050, %66 ], [ %33, %34 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %71

69:                                               ; preds = %67, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %67 ], [ %36, %35 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %70

70:                                               ; preds = %69, %27
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %69 ], [ %28, %27 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn.pn.pn

71:                                               ; preds = %19, %68, %25, %3
  %.6 = phi i32 [ 0, %19 ], [ 4101, %3 ], [ %.4, %68 ], [ 4110, %25 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  ret i32 %.6
}

; 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 #5 align 2

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

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

declare i32 @hash_from_oid(ptr noundef) local_unnamed_addr #0

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

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

declare i32 @hash(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7UapkiNS10AttrCertIdC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #8 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7UapkiNS19AlgorithmIdentifier4copyERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS4Cert20issuerToGeneralNamesEPK12ByteArray_stPPS1_(ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

attributes #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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, !6, i64 72}
!10 = !{!"_ZTSN7UapkiNS4Cert7CerItemE", !11, i64 0, !13, i64 40, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !13, i64 104, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !16, i64 176, !15, i64 184, !15, i64 192, !17, i64 200, !18, i64 204, !21, i64 208, !26, i64 304, !27, i64 312, !31, i64 336, !31, i64 368, !18, i64 400}
!11 = !{!"_ZTSSt5mutex", !12, i64 0}
!12 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS7HashAlg", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSSt6atomicIbE", !19, i64 0}
!19 = !{!"_ZTSSt13__atomic_baseIbE", !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSN7UapkiNS4Cert7CerItem4UrisE", !22, i64 0, !22, i64 24, !22, i64 48, !22, i64 72}
!22 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN7UapkiNS4Cert12VerifyStatusE", !7, i64 0}
!27 = !{!"_ZTSSt6vectorIPN7UapkiNS10AttrCertIdESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS10AttrCertIdESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS10AttrCertIdESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS10AttrCertIdESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSN7UapkiNS4Cert14CertStatusInfoE", !32, i64 0, !18, i64 4, !6, i64 8, !33, i64 16, !15, i64 24}
!32 = !{!"_ZTSN7UapkiNS4Cert14ValidationTypeE", !7, i64 0}
!33 = !{!"_ZTSN7UapkiNS10CertStatusE", !7, i64 0}
!34 = !{!35, !6, i64 40}
!35 = !{!"_ZTSN7UapkiNS9OtherHashE", !36, i64 0, !6, i64 40}
!36 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !13, i64 0, !6, i64 32}
!37 = !{!10, !6, i64 152}
!38 = !{!10, !6, i64 136}
!39 = !{!40, !6, i64 56}
!40 = !{!"_ZTSN7UapkiNS10AttrCertIdE", !35, i64 0, !41, i64 48}
!41 = !{!"_ZTSN7UapkiNS10AttrCertId12IssuerSerialE", !6, i64 0, !6, i64 8}


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