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

; 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.UapkiNS::AttributeHelper::RevocationValuesBuilder" = type { ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.UapkiNS::Doc::Sign::SigningDoc" = type { ptr, %"class.UapkiNS::Pkcs7::SignedDataBuilder", ptr, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, %"class.UapkiNS::ContentHasher", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.std::__cxx11::basic_string", %"class.UapkiNS::Pkcs7::ArchiveTs3Helper", %"class.std::vector.3", %"class.std::vector.18", %"class.std::vector.18" }
%"class.UapkiNS::Pkcs7::SignedDataBuilder" = type { ptr, %"class.std::vector.8", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *, std::allocator<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *, std::allocator<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *, std::allocator<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *, std::allocator<UapkiNS::Pkcs7::SignedDataBuilder::SignerInfo *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.UapkiNS::ContentHasher" = type { i32, i32, ptr, i8, %"class.std::__cxx11::basic_string", ptr, i64, %"class.UapkiNS::SmartBA" }
%"class.UapkiNS::SmartBA" = type { 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" }
%"class.UapkiNS::VectorBA" = type { %"class.std::vector.13" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = 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 }
%struct.anon = type { %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *, std::allocator<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *, std::allocator<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *, std::allocator<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *, std::allocator<UapkiNS::Doc::Sign::SigningDoc::CerDataItem *>>::_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::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::Doc::Sign::SigningDoc::SignParams" = type { i32, i8, i8, i32, i32, %"struct.UapkiNS::AlgorithmIdentifier", %"struct.UapkiNS::AlgorithmIdentifier", %"struct.UapkiNS::Doc::Sign::SigningDoc::CerDataItem", %"class.UapkiNS::SmartBA", i8, i8, i8, i8, i8, i8, %"struct.UapkiNS::LibraryConfig::OcspParams", %"struct.UapkiNS::LibraryConfig::TspParams", %"struct.UapkiNS::Attribute", %"struct.UapkiNS::Attribute", %"class.std::vector.3" }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%"struct.UapkiNS::Doc::Sign::SigningDoc::CerDataItem" = type { ptr, ptr, i8, %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA", ptr, ptr }
%"struct.UapkiNS::LibraryConfig::OcspParams" = type { i64 }
%"struct.UapkiNS::LibraryConfig::TspParams" = type { i8, i8, i64, %"class.std::__cxx11::basic_string", %"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 }
%"struct.UapkiNS::Attribute" = type { %"class.std::__cxx11::basic_string", ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(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_iteratorIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc4Sign10SigningDoc22encodeRevocationValuesERNS_9AttributeE(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.UapkiNS::AttributeHelper::RevocationValuesBuilder", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %19 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::SignParams", ptr %20, i32 0, i32 7
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  call void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
  br label %22

22:                                               ; preds = %2
  %23 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder4initEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %24 unwind label %30

24:                                               ; preds = %22
  store i32 %23, ptr %6, align 4, !tbaa !9
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %34

27:                                               ; preds = %24
  %28 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 623, i32 noundef %28)
          to label %29 unwind label %30

29:                                               ; preds = %27
  br label %119

30:                                               ; preds = %111, %104, %99, %51, %46, %42, %27, %22
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %9, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %10, align 4
  br label %127

34:                                               ; preds = %24
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %18, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::SignParams", ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !42
  switch i32 %40, label %97 [
    i32 6, label %41
    i32 7, label %41
  ]

41:                                               ; preds = %36, %36
  br label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::CerDataItem", ptr %43, i32 0, i32 3
  %45 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %46 unwind label %30

46:                                               ; preds = %42
  %47 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder12addOcspValueEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %45)
          to label %48 unwind label %30

48:                                               ; preds = %46
  store i32 %47, ptr %6, align 4, !tbaa !9
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %54

51:                                               ; preds = %48
  %52 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 629, i32 noundef %52)
          to label %53 unwind label %30

53:                                               ; preds = %51
  br label %119

54:                                               ; preds = %48
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %57 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %18, i32 0, i32 12
  store ptr %57, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = call ptr @_ZNSt6vectorIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #6
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = call ptr @_ZNSt6vectorIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  br label %64

64:                                               ; preds = %92, %56
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %65, label %67, label %66

66:                                               ; preds = %64
  store i32 8, ptr %14, align 4
  br label %94

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  store ptr %68, ptr %15, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %67
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::CerDataItem", ptr %71, i32 0, i32 3
  %73 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %74 unwind label %82

74:                                               ; preds = %69
  %75 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder12addOcspValueEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %73)
          to label %76 unwind label %82

76:                                               ; preds = %74
  store i32 %75, ptr %6, align 4, !tbaa !9
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %86

79:                                               ; preds = %76
  %80 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 632, i32 noundef %80)
          to label %81 unwind label %82

81:                                               ; preds = %79
  store i32 4, ptr %14, align 4
  br label %89

82:                                               ; preds = %79, %74, %69
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %127

86:                                               ; preds = %76
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  store i32 0, ptr %14, align 4
  br label %89

89:                                               ; preds = %88, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %90 = load i32, ptr %14, align 4
  switch i32 %90, label %94 [
    i32 0, label %91
  ]

91:                                               ; preds = %89
  br label %92

92:                                               ; preds = %91
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %64

94:                                               ; preds = %89, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %95 = load i32, ptr %14, align 4
  switch i32 %95, label %125 [
    i32 8, label %96
    i32 4, label %119
  ]

96:                                               ; preds = %94
  br label %98

97:                                               ; preds = %36
  br label %98

98:                                               ; preds = %97, %96
  br label %99

99:                                               ; preds = %98
  %100 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder6encodeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %101 unwind label %30

101:                                              ; preds = %99
  store i32 %100, ptr %6, align 4, !tbaa !9
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %107

104:                                              ; preds = %101
  %105 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 639, i32 noundef %105)
          to label %106 unwind label %30

106:                                              ; preds = %104
  br label %119

107:                                              ; preds = %101
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %110 = load ptr, ptr @OID_PKCS9_REVOCATION_VALUES, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef %110, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %111 unwind label %121

111:                                              ; preds = %109
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.UapkiNS::Attribute", ptr %112, i32 0, i32 0
  %114 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %113, ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  %115 = invoke noundef ptr @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder10getEncodedEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext true)
          to label %116 unwind label %30

116:                                              ; preds = %111
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.UapkiNS::Attribute", ptr %117, i32 0, i32 1
  store ptr %115, ptr %118, align 8, !tbaa !54
  br label %119

119:                                              ; preds = %116, %106, %94, %53, %29
  %120 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %120, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %125

121:                                              ; preds = %109
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %9, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %127

125:                                              ; preds = %119, %94
  call void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %126 = load i32, ptr %3, align 4
  ret i32 %126

127:                                              ; preds = %121, %82, %30
  call void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %9, align 8
  %130 = load i32, ptr %10, align 4
  %131 = insertvalue { ptr, i32 } poison, ptr %129, 0
  %132 = insertvalue { ptr, i32 } %131, i32 %130, 1
  resume { ptr, i32 } %132
}

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

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

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

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

declare void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder4initEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

declare noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder12addOcspValueEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #3

declare noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder6encodeEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

declare noundef ptr @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder10getEncodedEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #3

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN7UapkiNS3Doc4Sign10SigningDocE", !6, i64 0, !13, i64 8, !6, i64 48, !18, i64 56, !18, i64 88, !21, i64 120, !22, i64 128, !25, i64 208, !25, i64 216, !25, i64 224, !18, i64 232, !26, i64 264, !34, i64 392, !38, i64 416, !38, i64 440}
!13 = !{!"_ZTSN7UapkiNS5Pkcs717SignedDataBuilderE", !6, i64 0, !14, i64 8, !6, i64 32}
!14 = !{!"_ZTSSt6vectorIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN7UapkiNS13ContentHasherE", !23, i64 0, !24, i64 4, !6, i64 8, !21, i64 16, !18, i64 24, !6, i64 56, !20, i64 64, !25, i64 72}
!23 = !{!"_ZTSN7UapkiNS13ContentHasher10SourceTypeE", !7, i64 0}
!24 = !{!"_ZTS7HashAlg", !7, i64 0}
!25 = !{!"_ZTSN7UapkiNS7SmartBAE", !6, i64 0}
!26 = !{!"_ZTSN7UapkiNS5Pkcs716ArchiveTs3HelperE", !6, i64 0, !24, i64 8, !27, i64 16, !33, i64 88, !25, i64 120}
!27 = !{!"_ZTSN7UapkiNS5Pkcs716ArchiveTs3Helper12ATSHashIndexE", !28, i64 0, !28, i64 24, !28, i64 48}
!28 = !{!"_ZTSN7UapkiNS8VectorBAE", !29, i64 0}
!29 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSN7UapkiNS5Pkcs716ArchiveTs3HelperUt_E", !25, i64 0, !25, i64 8, !25, i64 16, !25, i64 24}
!34 = !{!"_ZTSSt6vectorIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSSt6vectorIPN7UapkiNS9AttributeESaIS2_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS9AttributeESaIS2_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9AttributeESaIS2_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9AttributeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!43, !44, i64 0}
!43 = !{!"_ZTSN7UapkiNS3Doc4Sign10SigningDoc10SignParamsE", !44, i64 0, !21, i64 4, !21, i64 5, !24, i64 8, !24, i64 12, !45, i64 16, !45, i64 56, !46, i64 96, !25, i64 160, !21, i64 168, !21, i64 169, !21, i64 170, !21, i64 171, !21, i64 172, !21, i64 173, !47, i64 176, !48, i64 184, !53, i64 256, !53, i64 296, !34, i64 336}
!44 = !{!"_ZTSN7UapkiNS15SignatureFormatE", !7, i64 0}
!45 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !18, i64 0, !6, i64 32}
!46 = !{!"_ZTSN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemE", !6, i64 0, !6, i64 8, !21, i64 16, !25, i64 24, !25, i64 32, !25, i64 40, !6, i64 48, !6, i64 56}
!47 = !{!"_ZTSN7UapkiNS13LibraryConfig10OcspParamsE", !20, i64 0}
!48 = !{!"_ZTSN7UapkiNS13LibraryConfig9TspParamsE", !21, i64 0, !21, i64 1, !20, i64 8, !18, i64 16, !49, i64 48}
!49 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!53 = !{!"_ZTSN7UapkiNS9AttributeE", !18, i64 0, !6, i64 32}
!54 = !{!53, !6, i64 32}


; 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.UapkiNS::AttributeHelper::RevocationValuesBuilder" = type { ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@OID_PKCS9_REVOCATION_VALUES = external local_unnamed_addr global ptr, align 8

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc4Sign10SigningDoc22encodeRevocationValuesERNS_9AttributeE(ptr noundef nonnull align 8 dereferenceable(464) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.UapkiNS::AttributeHelper::RevocationValuesBuilder", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %9 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder4initEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %10 unwind label %12

10:                                               ; preds = %2
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %14, label %11

11:                                               ; preds = %10
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 623, i32 noundef %9)
          to label %54 unwind label %12

12:                                               ; preds = %47, %44, %41, %23, %18, %11, %2
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %55

14:                                               ; preds = %10
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = load i32, ptr %15, align 8, !tbaa !39
  %17 = and i32 %16, -2
  %switch = icmp eq i32 %17, 6
  br i1 %switch, label %18, label %41

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %8, i64 120
  %20 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %21 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder12addOcspValueEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %20)
          to label %22 unwind label %12

22:                                               ; preds = %18
  %.not31 = icmp eq i32 %21, 0
  br i1 %.not31, label %24, label %23

23:                                               ; preds = %22
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 629, i32 noundef %21)
          to label %54 unwind label %12

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %0, i64 392
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %26 = call ptr @_ZNSt6vectorIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  store ptr %26, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %27 = call ptr @_ZNSt6vectorIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  store ptr %27, ptr %5, align 8
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %28, label %.lr.ph, label %.thread36

.thread36:                                        ; preds = %37, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %41

.lr.ph:                                           ; preds = %24, %37
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %30 = load ptr, ptr %29, align 8, !tbaa !51
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  %32 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %31)
  %33 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder12addOcspValueEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %32)
          to label %34 unwind label %.loopexit

34:                                               ; preds = %.lr.ph
  %.not32 = icmp eq i32 %33, 0
  br i1 %.not32, label %37, label %35

35:                                               ; preds = %34
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 632, i32 noundef %33)
          to label %40 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %36

.loopexit.split-lp:                               ; preds = %35
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %36

36:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %55

37:                                               ; preds = %34
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br i1 %39, label %.lr.ph, label %.thread36

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %54

41:                                               ; preds = %.thread36, %14
  %42 = invoke noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder6encodeEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %43 unwind label %12

43:                                               ; preds = %41
  %.not33 = icmp eq i32 %42, 0
  br i1 %.not33, label %45, label %44

44:                                               ; preds = %43
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 639, i32 noundef %42)
          to label %54 unwind label %12

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %46 = load ptr, ptr @OID_PKCS9_REVOCATION_VALUES, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %46, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %47 unwind label %52

47:                                               ; preds = %45
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %49 = invoke noundef ptr @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder10getEncodedEb(ptr noundef nonnull align 8 dereferenceable(16) %3, i1 noundef zeroext true)
          to label %50 unwind label %12

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %1, i64 32
  store ptr %49, ptr %51, align 8, !tbaa !52
  br label %54

52:                                               ; preds = %45
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %55

54:                                               ; preds = %40, %50, %11, %23, %44
  %.0 = phi i32 [ %9, %11 ], [ %42, %44 ], [ 0, %50 ], [ %21, %23 ], [ %33, %40 ]
  call void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  ret i32 %.0

55:                                               ; preds = %52, %36, %12
  %.pn = phi { ptr, i32 } [ %13, %12 ], [ %53, %52 ], [ %lpad.phi, %36 ]
  call void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

declare void @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilderC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder4initEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder12addOcspValueEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder6encodeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

declare noundef ptr @_ZN7UapkiNS15AttributeHelper23RevocationValuesBuilder10getEncodedEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #3

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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, !7, i64 0}
!6 = !{!"_ZTSN7UapkiNS3Doc4Sign10SigningDocE", !7, i64 0, !10, i64 8, !7, i64 48, !15, i64 56, !15, i64 88, !18, i64 120, !19, i64 128, !22, i64 208, !22, i64 216, !22, i64 224, !15, i64 232, !23, i64 264, !31, i64 392, !35, i64 416, !35, i64 440}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7UapkiNS5Pkcs717SignedDataBuilderE", !7, i64 0, !11, i64 8, !7, i64 32}
!11 = !{!"_ZTSSt6vectorIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfoESaIS4_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !8, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"_ZTSN7UapkiNS13ContentHasherE", !20, i64 0, !21, i64 4, !7, i64 8, !18, i64 16, !15, i64 24, !7, i64 56, !17, i64 64, !22, i64 72}
!20 = !{!"_ZTSN7UapkiNS13ContentHasher10SourceTypeE", !8, i64 0}
!21 = !{!"_ZTS7HashAlg", !8, i64 0}
!22 = !{!"_ZTSN7UapkiNS7SmartBAE", !7, i64 0}
!23 = !{!"_ZTSN7UapkiNS5Pkcs716ArchiveTs3HelperE", !7, i64 0, !21, i64 8, !24, i64 16, !30, i64 88, !22, i64 120}
!24 = !{!"_ZTSN7UapkiNS5Pkcs716ArchiveTs3Helper12ATSHashIndexE", !25, i64 0, !25, i64 24, !25, i64 48}
!25 = !{!"_ZTSN7UapkiNS8VectorBAE", !26, i64 0}
!26 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!30 = !{!"_ZTSN7UapkiNS5Pkcs716ArchiveTs3HelperUt_E", !22, i64 0, !22, i64 8, !22, i64 16, !22, i64 24}
!31 = !{!"_ZTSSt6vectorIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemESaIS5_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!35 = !{!"_ZTSSt6vectorIPN7UapkiNS9AttributeESaIS2_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS9AttributeESaIS2_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9AttributeESaIS2_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9AttributeESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!39 = !{!40, !41, i64 0}
!40 = !{!"_ZTSN7UapkiNS3Doc4Sign10SigningDoc10SignParamsE", !41, i64 0, !18, i64 4, !18, i64 5, !21, i64 8, !21, i64 12, !42, i64 16, !42, i64 56, !43, i64 96, !22, i64 160, !18, i64 168, !18, i64 169, !18, i64 170, !18, i64 171, !18, i64 172, !18, i64 173, !44, i64 176, !45, i64 184, !50, i64 256, !50, i64 296, !31, i64 336}
!41 = !{!"_ZTSN7UapkiNS15SignatureFormatE", !8, i64 0}
!42 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !15, i64 0, !7, i64 32}
!43 = !{!"_ZTSN7UapkiNS3Doc4Sign10SigningDoc11CerDataItemE", !7, i64 0, !7, i64 8, !18, i64 16, !22, i64 24, !22, i64 32, !22, i64 40, !7, i64 48, !7, i64 56}
!44 = !{!"_ZTSN7UapkiNS13LibraryConfig10OcspParamsE", !17, i64 0}
!45 = !{!"_ZTSN7UapkiNS13LibraryConfig9TspParamsE", !18, i64 0, !18, i64 1, !17, i64 8, !15, i64 16, !46, i64 48}
!46 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!50 = !{!"_ZTSN7UapkiNS9AttributeE", !15, i64 0, !7, i64 32}
!51 = !{!7, !7, i64 0}
!52 = !{!50, !7, i64 32}


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