; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src (doc-verify)

; 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::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = 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 }
%"class.__gnu_cxx::__normal_iterator.49" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.50" = type { ptr }
%"class.UapkiNS::Doc::Verify::VerifiedSignerInfo" = type { %"class.UapkiNS::CertValidator::CertValidator", i8, i32, %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr, i32, i32, i32, i64, %"class.std::vector.13", i32, %"class.std::__cxx11::basic_string", %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", %"struct.UapkiNS::Doc::Verify::CadesXlInfo", %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", %"class.UapkiNS::Pkcs7::ArchiveTs3Helper", i32, i8, i8, i64, %"class.std::vector.44", %"struct.UapkiNS::Doc::Verify::VerifiedSignerInfo::ListAddedCerts" }
%"class.UapkiNS::CertValidator::CertValidator" = type { ptr, ptr, ptr, %"class.std::vector.34", %"class.std::vector.39", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA" }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.UapkiNS::SmartBA" = type { ptr }
%"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo" = type { ptr, i32, i64, %"class.UapkiNS::SmartBA", %"struct.UapkiNS::AlgorithmIdentifier", %"class.std::vector.8", %"struct.UapkiNS::AlgorithmIdentifier", %"class.UapkiNS::SmartBA", %"class.std::vector.8", %"class.UapkiNS::SmartBA", %"struct.UapkiNS::Pkcs7::SignedDataParser::SignerInfo::MandatoryAttrs" }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Pkcs7::SignedDataParser::SignerInfo::MandatoryAttrs" = type { %"class.std::__cxx11::basic_string", %"class.UapkiNS::SmartBA" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = 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 }
%"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::Doc::Verify::CadesXlInfo" = type { i8, i8, i8, i8, %"class.std::vector.13", %"class.UapkiNS::VectorBA", %"class.UapkiNS::AttributeHelper::RevocationRefsParser", %"class.UapkiNS::AttributeHelper::RevocationValuesParser", %"class.UapkiNS::VectorBA", i32, %"class.std::vector.18" }
%"class.UapkiNS::AttributeHelper::RevocationRefsParser" = type { ptr, i64 }
%"class.UapkiNS::AttributeHelper::RevocationValuesParser" = type { %"class.UapkiNS::VectorBA", %"class.UapkiNS::VectorBA", %"struct.UapkiNS::Attribute" }
%"struct.UapkiNS::Attribute" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.UapkiNS::VectorBA" = type { %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl" }
%"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<UapkiNS::VerifyStatus, std::allocator<UapkiNS::VerifyStatus>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::VerifyStatus, std::allocator<UapkiNS::VerifyStatus>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::VerifyStatus, std::allocator<UapkiNS::VerifyStatus>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::VerifyStatus, std::allocator<UapkiNS::VerifyStatus>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Doc::Verify::AttrTimeStamp" = type { %"class.UapkiNS::Tsp::TsTokenParser", %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.UapkiNS::SmartBA", i64, ptr, i32, i32 }
%"class.UapkiNS::Tsp::TsTokenParser" = type { %"class.UapkiNS::Pkcs7::SignedDataParser", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, ptr, i64, i8, i8, ptr }
%"class.UapkiNS::Pkcs7::SignedDataParser" = type { ptr, i32, %"class.std::vector", %"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo", %"class.UapkiNS::VectorBA", %"class.UapkiNS::VectorBA", i64 }
%"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 }
%"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.UapkiNS::Pkcs7::ArchiveTs3Helper" = type { ptr, i32, %"struct.UapkiNS::Pkcs7::ArchiveTs3Helper::ATSHashIndex", %struct.anon, %"class.UapkiNS::SmartBA" }
%"struct.UapkiNS::Pkcs7::ArchiveTs3Helper::ATSHashIndex" = type { %"class.UapkiNS::VectorBA", %"class.UapkiNS::VectorBA", %"class.UapkiNS::VectorBA" }
%struct.anon = type { %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA" }
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::CertChainItem *, std::allocator<UapkiNS::CertValidator::CertChainItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::CertChainItem *, std::allocator<UapkiNS::CertValidator::CertChainItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::CertChainItem *, std::allocator<UapkiNS::CertValidator::CertChainItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::CertChainItem *, std::allocator<UapkiNS::CertValidator::CertChainItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Doc::Verify::VerifiedSignerInfo::ListAddedCerts" = type { %"class.std::vector.24", %"class.std::vector.24", %"class.std::vector.24", %"class.std::vector.24", %"class.std::vector.24" }
%"struct.UapkiNS::CertValidator::ResultValidationByCrl" = type { i32, ptr, ptr, %"struct.UapkiNS::Crl::RevokedCertItem" }
%"struct.UapkiNS::Crl::RevokedCertItem" = type { i64, i32, i64 }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify18VerifiedSignerInfo18addCrlCertsToChainEm(ptr noundef nonnull align 8 dereferenceable(2568) %0, i64 noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector.24", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.49", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.49", align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::vector.24", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %23 = getelementptr inbounds %"class.UapkiNS::Doc::Verify::VerifiedSignerInfo", ptr %22, i32 0, i32 21
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator13CertChainItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  %26 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.49", ptr %8, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator13CertChainItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.49", ptr %9, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  br label %30

30:                                               ; preds = %43, %2
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br i1 %31, label %33, label %32

32:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %49

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  store ptr %34, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN7UapkiNS13CertValidator13CertChainItem24getResultValidationByCrlEv(ptr noundef nonnull align 8 dereferenceable(280) %36)
          to label %38 unwind label %45

38:                                               ; preds = %33
  %39 = getelementptr inbounds %"struct.UapkiNS::CertValidator::ResultValidationByCrl", ptr %37, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = invoke noundef zeroext i1 @_ZN7UapkiNS4Cert15addCertIfUniqueERSt6vectorIPNS0_7CerItemESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef %40)
          to label %42 unwind label %45

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %43

43:                                               ; preds = %42
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %30

45:                                               ; preds = %38, %33
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %11, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %119

49:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr %6, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = call ptr @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #5
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.50", ptr %14, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = call ptr @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #5
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.50", ptr %15, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  br label %56

56:                                               ; preds = %111, %49
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %57, label %59, label %58

58:                                               ; preds = %56
  store i32 4, ptr %16, align 4
  br label %114

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  store ptr %60, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = invoke noundef i32 @_ZN7UapkiNS3Doc6Verify18VerifiedSignerInfo16addCertChainItemENS_13CertValidator10CertEntityEPNS_4Cert7CerItemEPPNS3_13CertChainItemERb(ptr noundef nonnull align 8 dereferenceable(2568) %22, i32 noundef 5, ptr noundef %62, ptr noundef %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %64 unwind label %69

64:                                               ; preds = %59
  store i32 %63, ptr %20, align 4, !tbaa !16
  %65 = load i32, ptr %20, align 4, !tbaa !16
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %64
  %68 = load i32, ptr %20, align 4, !tbaa !16
  store i32 %68, ptr %3, align 4
  store i32 1, ptr %16, align 4
  br label %105

69:                                               ; preds = %59
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %11, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %12, align 4
  br label %113

73:                                               ; preds = %64
  %74 = load i8, ptr %19, align 1, !tbaa !18, !range !20, !noundef !21
  %75 = trunc i8 %74 to i1
  br i1 %75, label %76, label %104

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  %78 = load i64, ptr %5, align 8, !tbaa !9
  %79 = invoke noundef zeroext i1 @_ZN7UapkiNS13CertValidator13CertChainItem17checkValidityTimeEm(ptr noundef nonnull align 8 dereferenceable(280) %77, i64 noundef %78)
          to label %80 unwind label %99

80:                                               ; preds = %76
  %81 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN7UapkiNS13CertValidator13CertChainItem17setValidationTypeENS_4Cert14ValidationTypeE(ptr noundef nonnull align 8 dereferenceable(280) %81, i32 noundef 1)
          to label %82 unwind label %99

82:                                               ; preds = %80
  %83 = invoke noundef ptr @_ZNK7UapkiNS13CertValidator13CertValidator11getCerStoreEv(ptr noundef nonnull align 8 dereferenceable(88) %22)
          to label %84 unwind label %99

84:                                               ; preds = %82
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = invoke noundef ptr @_ZNK7UapkiNS13CertValidator13CertChainItem10getSubjectEv(ptr noundef nonnull align 8 dereferenceable(280) %85)
          to label %87 unwind label %99

87:                                               ; preds = %84
  %88 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore13getChainCertsEPKNS0_7CerItemERSt6vectorIPS2_SaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %83, ptr noundef %86, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %89 unwind label %99

89:                                               ; preds = %87
  store i32 %88, ptr %20, align 4, !tbaa !16
  %90 = load i32, ptr %20, align 4, !tbaa !16
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %103

92:                                               ; preds = %89
  %93 = call noundef zeroext i1 @_ZNKSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  br i1 %93, label %103, label %94

94:                                               ; preds = %92
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 0) #5
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  invoke void @_ZN7UapkiNS13CertValidator13CertChainItem9setIssuerEPNS_4Cert7CerItemE(ptr noundef nonnull align 8 dereferenceable(280) %95, ptr noundef %97)
          to label %98 unwind label %99

98:                                               ; preds = %94
  br label %103

99:                                               ; preds = %94, %87, %84, %82, %80, %76
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %11, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %12, align 4
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  br label %113

103:                                              ; preds = %98, %92, %89
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  br label %104

104:                                              ; preds = %103, %73
  store i32 0, ptr %16, align 4
  br label %105

105:                                              ; preds = %104, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %106 = load i32, ptr %16, align 4
  switch i32 %106, label %108 [
    i32 0, label %107
  ]

107:                                              ; preds = %105
  store i32 0, ptr %16, align 4
  br label %108

108:                                              ; preds = %107, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %109 = load i32, ptr %16, align 4
  switch i32 %109, label %114 [
    i32 0, label %110
  ]

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %56

113:                                              ; preds = %99, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %119

114:                                              ; preds = %108, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %115 = load i32, ptr %16, align 4
  switch i32 %115, label %117 [
    i32 4, label %116
  ]

116:                                              ; preds = %114
  store i32 0, ptr %3, align 4
  store i32 1, ptr %16, align 4
  br label %117

117:                                              ; preds = %116, %114
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  %118 = load i32, ptr %3, align 4
  ret i32 %118

119:                                              ; preds = %113, %45
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %11, align 8
  %122 = load i32, ptr %12, align 4
  %123 = insertvalue { ptr, i32 } poison, ptr %121, 0
  %124 = insertvalue { ptr, i32 } %123, i32 %122, 1
  resume { ptr, i32 } %124
}

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

declare noundef zeroext i1 @_ZN7UapkiNS4Cert15addCertIfUniqueERSt6vectorIPNS0_7CerItemESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #4

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

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

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

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

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

declare noundef zeroext i1 @_ZN7UapkiNS13CertValidator13CertChainItem17checkValidityTimeEm(ptr noundef nonnull align 8 dereferenceable(280), i64 noundef) #4

declare void @_ZN7UapkiNS13CertValidator13CertChainItem17setValidationTypeENS_4Cert14ValidationTypeE(ptr noundef nonnull align 8 dereferenceable(280), i32 noundef) #4

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore13getChainCertsEPKNS0_7CerItemERSt6vectorIPS2_SaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) #4

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

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

declare void @_ZN7UapkiNS13CertValidator13CertChainItem9setIssuerEPNS_4Cert7CerItemE(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef) #4

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTSN7UapkiNS13CertValidator21ResultValidationByCrlE", !13, i64 0, !6, i64 8, !6, i64 16, !14, i64 24}
!13 = !{!"_ZTSN7UapkiNS10CertStatusE", !7, i64 0}
!14 = !{!"_ZTSN7UapkiNS3Crl15RevokedCertItemE", !10, i64 0, !15, i64 8, !10, i64 16}
!15 = !{!"_ZTSN7UapkiNS9CrlReasonE", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!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::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = 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 }
%"class.__gnu_cxx::__normal_iterator.49" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.50" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify18VerifiedSignerInfo16addCertChainItemENS_13CertValidator10CertEntityEPNS_4Cert7CerItemEPPNS3_13CertChainItemERb(ptr noundef nonnull align 8 dereferenceable(2568), i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify18VerifiedSignerInfo18addCrlCertsToChainEm(ptr noundef nonnull align 8 dereferenceable(2568) %0, i64 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.24", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.49", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.49", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::vector.24", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 2424
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %12 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator13CertChainItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  store ptr %12, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %13 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator13CertChainItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  store ptr %13, ptr %5, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %24, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %15 = call ptr @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %15, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %16 = call ptr @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %16, ptr %7, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %17, label %.lr.ph32, label %.loopexit

.lr.ph:                                           ; preds = %2, %24
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7UapkiNS13CertValidator13CertChainItem24getResultValidationByCrlEv(ptr noundef nonnull align 8 dereferenceable(280) %19)
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = invoke noundef zeroext i1 @_ZN7UapkiNS4Cert15addCertIfUniqueERSt6vectorIPNS0_7CerItemESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef %22)
          to label %24 unwind label %27

24:                                               ; preds = %.lr.ph
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator13CertChainItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %26, label %.lr.ph, label %._crit_edge

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %64

.lr.ph32:                                         ; preds = %._crit_edge, %60
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = invoke noundef i32 @_ZN7UapkiNS3Doc6Verify18VerifiedSignerInfo16addCertChainItemENS_13CertValidator10CertEntityEPNS_4Cert7CerItemEPPNS3_13CertChainItemERb(ptr noundef nonnull align 8 dereferenceable(2568) %0, i32 noundef 5, ptr noundef %30, ptr noundef nonnull %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %32 unwind label %33

32:                                               ; preds = %.lr.ph32
  %.not = icmp eq i32 %31, 0
  br i1 %.not, label %35, label %59

33:                                               ; preds = %.lr.ph32
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %63

35:                                               ; preds = %32
  %36 = load i8, ptr %9, align 1, !tbaa !15, !range !17, !noundef !18
  %37 = trunc nuw i8 %36 to i1
  br i1 %37, label %38, label %60

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = invoke noundef zeroext i1 @_ZN7UapkiNS13CertValidator13CertChainItem17checkValidityTimeEm(ptr noundef nonnull align 8 dereferenceable(280) %39, i64 noundef %1)
          to label %41 unwind label %56

41:                                               ; preds = %38
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN7UapkiNS13CertValidator13CertChainItem17setValidationTypeENS_4Cert14ValidationTypeE(ptr noundef nonnull align 8 dereferenceable(280) %42, i32 noundef 1)
          to label %43 unwind label %56

43:                                               ; preds = %41
  %44 = call noundef ptr @_ZNK7UapkiNS13CertValidator13CertValidator11getCerStoreEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = call noundef ptr @_ZNK7UapkiNS13CertValidator13CertChainItem10getSubjectEv(ptr noundef nonnull align 8 dereferenceable(280) %45)
  %47 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore13getChainCertsEPKNS0_7CerItemERSt6vectorIPS2_SaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %44, ptr noundef %46, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %48 unwind label %56

48:                                               ; preds = %43
  %49 = icmp eq i32 %47, 0
  br i1 %49, label %50, label %58

50:                                               ; preds = %48
  %51 = call noundef zeroext i1 @_ZNKSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br i1 %51, label %58, label %52

52:                                               ; preds = %50
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  invoke void @_ZN7UapkiNS13CertValidator13CertChainItem9setIssuerEPNS_4Cert7CerItemE(ptr noundef nonnull align 8 dereferenceable(280) %53, ptr noundef %55)
          to label %58 unwind label %56

56:                                               ; preds = %52, %43, %41, %38
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %63

58:                                               ; preds = %52, %50, %48
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %60

59:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %.loopexit

60:                                               ; preds = %35, %58
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS4Cert7CerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %62, label %.lr.ph32, label %.loopexit

63:                                               ; preds = %56, %33
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %64

.loopexit:                                        ; preds = %60, %._crit_edge, %59
  %spec.select = phi i32 [ %31, %59 ], [ 0, %._crit_edge ], [ 0, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret i32 %spec.select

64:                                               ; preds = %63, %27
  %.pn26 = phi { ptr, i32 } [ %28, %27 ], [ %.pn, %63 ]
  call void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn26
}

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

declare noundef zeroext i1 @_ZN7UapkiNS4Cert15addCertIfUniqueERSt6vectorIPNS0_7CerItemESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #4

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

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

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

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

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

declare noundef zeroext i1 @_ZN7UapkiNS13CertValidator13CertChainItem17checkValidityTimeEm(ptr noundef nonnull align 8 dereferenceable(280), i64 noundef) local_unnamed_addr #4

declare void @_ZN7UapkiNS13CertValidator13CertChainItem17setValidationTypeENS_4Cert14ValidationTypeE(ptr noundef nonnull align 8 dereferenceable(280), i32 noundef) local_unnamed_addr #4

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore13getChainCertsEPKNS0_7CerItemERSt6vectorIPS2_SaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

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

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

declare void @_ZN7UapkiNS13CertValidator13CertChainItem9setIssuerEPNS_4Cert7CerItemE(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef) local_unnamed_addr #4

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

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

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

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

!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 16}
!10 = !{!"_ZTSN7UapkiNS13CertValidator21ResultValidationByCrlE", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24}
!11 = !{!"_ZTSN7UapkiNS10CertStatusE", !7, i64 0}
!12 = !{!"_ZTSN7UapkiNS3Crl15RevokedCertItemE", !13, i64 0, !14, i64 8, !13, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN7UapkiNS9CrlReasonE", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}


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