; 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.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.56" = type { ptr }
%"struct.UapkiNS::Doc::Verify::VerifySignedDoc" = type { ptr, ptr, ptr, i64, ptr, %"class.UapkiNS::Pkcs7::SignedDataParser", ptr, %"class.std::vector.24", %"class.std::vector.65", %"class.std::vector.83" }
%"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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.UapkiNS::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.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.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<UapkiNS::Crl::CrlItem *, std::allocator<UapkiNS::Crl::CrlItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Crl::CrlItem *, std::allocator<UapkiNS::Crl::CrlItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Crl::CrlItem *, std::allocator<UapkiNS::Crl::CrlItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Crl::CrlItem *, std::allocator<UapkiNS::Crl::CrlItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.83" = type { %"struct.std::_Vector_base.84" }
%"struct.std::_Vector_base.84" = type { %"struct.std::_Vector_base<UapkiNS::Doc::Verify::VerifiedSignerInfo, std::allocator<UapkiNS::Doc::Verify::VerifiedSignerInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Doc::Verify::VerifiedSignerInfo, std::allocator<UapkiNS::Doc::Verify::VerifiedSignerInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Doc::Verify::VerifiedSignerInfo, std::allocator<UapkiNS::Doc::Verify::VerifiedSignerInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Doc::Verify::VerifiedSignerInfo, std::allocator<UapkiNS::Doc::Verify::VerifiedSignerInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Cert::CerStore::AddedCerItem" = type <{ i32, [4 x i8], ptr, i8, [7 x i8] }>

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

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

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

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore8addCertsEbbRKNS_8VectorBAERSt6vectorINS1_12AddedCerItemESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96), i1 noundef zeroext, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify15VerifySignedDoc15addCertsToStoreEv(ptr noundef nonnull align 8 dereferenceable(256) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector.51", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  call void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %12

12:                                               ; preds = %1
  %13 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::VerifySignedDoc", ptr %11, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::VerifySignedDoc", ptr %11, i32 0, i32 5
  %16 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7UapkiNS5Pkcs716SignedDataParser8getCertsEv(ptr noundef nonnull align 8 dereferenceable(136) %15)
          to label %17 unwind label %25

17:                                               ; preds = %12
  %18 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore8addCertsEbbRKNS_8VectorBAERSt6vectorINS1_12AddedCerItemESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %14, i1 noundef zeroext false, i1 noundef zeroext false, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %19 unwind label %25

19:                                               ; preds = %17
  store i32 %18, ptr %3, align 4, !tbaa !9
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %29

22:                                               ; preds = %19
  %23 = load i32, ptr %3, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 1269, i32 noundef %23)
          to label %24 unwind label %25

24:                                               ; preds = %22
  br label %60

25:                                               ; preds = %22, %17, %12
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %5, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %6, align 4
  br label %62

29:                                               ; preds = %19
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr %4, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.56", ptr %8, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #5
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.56", ptr %9, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %57, %31
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_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 %39, label %41, label %40

40:                                               ; preds = %38
  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 %59

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %42 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  store ptr %42, ptr %10, align 8, !tbaa !5
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !39
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %56

47:                                               ; preds = %41
  %48 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::VerifySignedDoc", ptr %11, i32 0, i32 7
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.UapkiNS::Cert::CerStore::AddedCerItem", ptr %49, i32 0, i32 2
  invoke void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %51 unwind label %52

51:                                               ; preds = %47
  br label %56

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, 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 %62

56:                                               ; preds = %51, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %57

57:                                               ; preds = %56
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %38

59:                                               ; preds = %40
  br label %60

60:                                               ; preds = %59, %24
  %61 = load i32, ptr %3, align 4, !tbaa !9
  call void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret i32 %61

62:                                               ; preds = %52, %25
  call void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %63

63:                                               ; preds = %62
  %64 = load ptr, ptr %5, align 8
  %65 = load i32, ptr %6, align 4
  %66 = insertvalue { ptr, i32 } poison, ptr %64, 0
  %67 = insertvalue { ptr, i32 } %66, i32 %65, 1
  resume { ptr, i32 } %67
}

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

!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 8}
!12 = !{!"_ZTSN7UapkiNS3Doc6Verify15VerifySignedDocE", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !14, i64 40, !6, i64 176, !27, i64 184, !31, i64 208, !35, i64 232}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParserE", !6, i64 0, !10, i64 8, !15, i64 16, !19, i64 40, !22, i64 80, !22, i64 104, !13, i64 128}
!15 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSN7UapkiNS5Pkcs723EncapsulatedContentInfoE", !20, i64 0, !6, i64 32}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !13, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"_ZTSN7UapkiNS8VectorBAE", !23, i64 0}
!23 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS4Cert7CerItemESaIS3_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS4Cert7CerItemESaIS3_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS4Cert7CerItemESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt6vectorIPN7UapkiNS3Crl7CrlItemESaIS3_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS3Crl7CrlItemESaIS3_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Crl7CrlItemESaIS3_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Crl7CrlItemESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTSSt6vectorIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!40, !6, i64 8}
!40 = !{!"_ZTSN7UapkiNS4Cert8CerStore12AddedCerItemE", !10, i64 0, !6, i64 8, !41, i64 16}
!41 = !{!"bool", !7, i64 0}


; 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.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Cert::CerStore::AddedCerItem, std::allocator<UapkiNS::Cert::CerStore::AddedCerItem>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.56" = type { ptr }

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

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

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

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore8addCertsEbbRKNS_8VectorBAERSt6vectorINS1_12AddedCerItemESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96), i1 noundef zeroext, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify15VerifySignedDoc15addCertsToStoreEv(ptr noundef nonnull align 8 dereferenceable(256) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.51", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.56", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7UapkiNS5Pkcs716SignedDataParser8getCertsEv(ptr noundef nonnull align 8 dereferenceable(136) %7)
  %9 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore8addCertsEbbRKNS_8VectorBAERSt6vectorINS1_12AddedCerItemESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %6, i1 noundef zeroext false, i1 noundef zeroext false, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %10 unwind label %12

10:                                               ; preds = %1
  %.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 1269, i32 noundef %9)
          to label %29 unwind label %12

12:                                               ; preds = %11, %1
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %30

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %15 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  store ptr %15, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %16 = call ptr @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  store ptr %16, ptr %4, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 184
  br label %19

._crit_edge:                                      ; preds = %26, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %29

19:                                               ; preds = %.lr.ph, %26
  %20 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !37
  %.not11 = icmp eq ptr %22, null
  br i1 %.not11, label %26, label %23

23:                                               ; preds = %19
  invoke void @_ZNSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %26 unwind label %24

24:                                               ; preds = %23
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %30

26:                                               ; preds = %23, %19
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7UapkiNS4Cert8CerStore12AddedCerItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br i1 %28, label %19, label %._crit_edge

29:                                               ; preds = %11, %._crit_edge
  call void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  ret i32 %9

30:                                               ; preds = %24, %12
  %.pn = phi { ptr, i32 } [ %13, %12 ], [ %25, %24 ]
  call void @_ZNSt6vectorIN7UapkiNS4Cert8CerStore12AddedCerItemESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn
}

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

!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 8}
!6 = !{!"_ZTSN7UapkiNS3Doc6Verify15VerifySignedDocE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !11, i64 40, !7, i64 176, !25, i64 184, !29, i64 208, !33, i64 232}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParserE", !7, i64 0, !12, i64 8, !13, i64 16, !17, i64 40, !20, i64 80, !20, i64 104, !10, i64 128}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!"_ZTSN7UapkiNS5Pkcs723EncapsulatedContentInfoE", !18, i64 0, !7, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !10, i64 8, !8, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!20 = !{!"_ZTSN7UapkiNS8VectorBAE", !21, i64 0}
!21 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!25 = !{!"_ZTSSt6vectorIPN7UapkiNS4Cert7CerItemESaIS3_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS4Cert7CerItemESaIS3_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS4Cert7CerItemESaIS3_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS4Cert7CerItemESaIS3_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!29 = !{!"_ZTSSt6vectorIPN7UapkiNS3Crl7CrlItemESaIS3_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS3Crl7CrlItemESaIS3_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Crl7CrlItemESaIS3_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS3Crl7CrlItemESaIS3_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!33 = !{!"_ZTSSt6vectorIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Doc6Verify18VerifiedSignerInfoESaIS3_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!37 = !{!38, !7, i64 8}
!38 = !{!"_ZTSN7UapkiNS4Cert8CerStore12AddedCerItemE", !12, i64 0, !7, i64 8, !39, i64 16}
!39 = !{!"bool", !8, i64 0}


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