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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc4Sign10SigningDoc21setupSignerIdentifierEv(ptr noundef nonnull align 8 dereferenceable(464) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.UapkiNS::SmartBA", align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  %9 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %8, i32 0, i32 0
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::SignParams", ptr %10, i32 0, i32 14
  %12 = load i8, ptr %11, align 1, !tbaa !42, !range !54, !noundef !55
  %13 = trunc i8 %12 to i1
  br i1 %13, label %52, label %14

14:                                               ; preds = %1
  br label %15

15:                                               ; preds = %14
  %16 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %8, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::SignParams", ptr %17, i32 0, i32 7
  %19 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::CerDataItem", ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !56
  %21 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %22 unwind label %30

22:                                               ; preds = %15
  %23 = invoke noundef i32 @_ZNK7UapkiNS4Cert7CerItem14getIssuerAndSNEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(401) %20, ptr noundef %21)
          to label %24 unwind label %30

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

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

29:                                               ; preds = %27
  br label %86

30:                                               ; preds = %80, %72, %65, %60, %53, %46, %41, %37, %27, %22, %15
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %88

34:                                               ; preds = %24
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  %38 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %8, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !57
  %40 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %41 unwind label %30

41:                                               ; preds = %37
  %42 = invoke noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo6setSidENS0_20SignerIdentifierTypeEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(80) %39, i64 noundef 1, ptr noundef %40)
          to label %43 unwind label %30

43:                                               ; preds = %41
  store i32 %42, ptr %3, align 4, !tbaa !9
  %44 = load i32, ptr %3, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %49

46:                                               ; preds = %43
  %47 = load i32, ptr %3, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 447, i32 noundef %47)
          to label %48 unwind label %30

48:                                               ; preds = %46
  br label %86

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %71

52:                                               ; preds = %1
  br label %53

53:                                               ; preds = %52
  %54 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %8, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !57
  %56 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %8, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds %"struct.UapkiNS::Doc::Sign::SigningDoc::SignParams", ptr %57, i32 0, i32 8
  %59 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %60 unwind label %30

60:                                               ; preds = %53
  %61 = invoke noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo6setSidENS0_20SignerIdentifierTypeEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(80) %55, i64 noundef 2, ptr noundef %59)
          to label %62 unwind label %30

62:                                               ; preds = %60
  store i32 %61, ptr %3, align 4, !tbaa !9
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %62
  %66 = load i32, ptr %3, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 452, i32 noundef %66)
          to label %67 unwind label %30

67:                                               ; preds = %65
  br label %86

68:                                               ; preds = %62
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  store i32 3, ptr %5, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %70, %51
  br label %72

72:                                               ; preds = %71
  %73 = getelementptr inbounds %"class.UapkiNS::Doc::Sign::SigningDoc", ptr %8, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !57
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = invoke noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo10setVersionEj(ptr noundef nonnull align 8 dereferenceable(80) %74, i32 noundef %75)
          to label %77 unwind label %30

77:                                               ; preds = %72
  store i32 %76, ptr %3, align 4, !tbaa !9
  %78 = load i32, ptr %3, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %83

80:                                               ; preds = %77
  %81 = load i32, ptr %3, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 456, i32 noundef %81)
          to label %82 unwind label %30

82:                                               ; preds = %80
  br label %86

83:                                               ; preds = %77
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85, %82, %67, %48, %29
  %87 = load i32, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret i32 %87

88:                                               ; preds = %30
  %89 = load ptr, ptr %6, align 8
  %90 = load i32, ptr %7, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

declare noundef i32 @_ZNK7UapkiNS4Cert7CerItem14getIssuerAndSNEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(401), ptr noundef) #2

declare noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo6setSidENS0_20SignerIdentifierTypeEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef, ptr noundef) #2

declare noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo10setVersionEj(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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, !21, i64 173}
!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 = !{i8 0, i8 2}
!55 = !{}
!56 = !{!43, !6, i64 96}
!57 = !{!12, !6, i64 48}


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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc4Sign10SigningDoc21setupSignerIdentifierEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(464) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.UapkiNS::SmartBA", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 173
  %5 = load i8, ptr %4, align 1, !tbaa !39, !range !51, !noundef !52
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %23, label %7

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %3, i64 96
  %9 = load ptr, ptr %8, align 8, !tbaa !53
  %10 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %11 = invoke noundef i32 @_ZNK7UapkiNS4Cert7CerItem14getIssuerAndSNEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(401) %9, ptr noundef %10)
          to label %12 unwind label %14

12:                                               ; preds = %7
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %16, label %13

13:                                               ; preds = %12
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 446, i32 noundef %11)
          to label %37 unwind label %14

14:                                               ; preds = %36, %31, %30, %23, %22, %16, %13, %7
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  resume { ptr, i32 } %15

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 48
  %18 = load ptr, ptr %17, align 8, !tbaa !54
  %19 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %20 = invoke noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo6setSidENS0_20SignerIdentifierTypeEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(80) %18, i64 noundef 1, ptr noundef %19)
          to label %21 unwind label %14

21:                                               ; preds = %16
  %.not17 = icmp eq i32 %20, 0
  br i1 %.not17, label %31, label %22

22:                                               ; preds = %21
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 447, i32 noundef %20)
          to label %37 unwind label %14

23:                                               ; preds = %1
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  %25 = load ptr, ptr %24, align 8, !tbaa !54
  %26 = getelementptr inbounds i8, ptr %3, i64 160
  %27 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = invoke noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo6setSidENS0_20SignerIdentifierTypeEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(80) %25, i64 noundef 2, ptr noundef %27)
          to label %29 unwind label %14

29:                                               ; preds = %23
  %.not18 = icmp eq i32 %28, 0
  br i1 %.not18, label %31, label %30

30:                                               ; preds = %29
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 452, i32 noundef %28)
          to label %37 unwind label %14

31:                                               ; preds = %29, %21
  %.012 = phi i32 [ 1, %21 ], [ 3, %29 ]
  %32 = getelementptr inbounds i8, ptr %0, i64 48
  %33 = load ptr, ptr %32, align 8, !tbaa !54
  %34 = invoke noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo10setVersionEj(ptr noundef nonnull align 8 dereferenceable(80) %33, i32 noundef %.012)
          to label %35 unwind label %14

35:                                               ; preds = %31
  %.not19 = icmp eq i32 %34, 0
  br i1 %.not19, label %37, label %36

36:                                               ; preds = %35
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 456, i32 noundef %34)
          to label %37 unwind label %14

37:                                               ; preds = %35, %36, %30, %22, %13
  %.0 = phi i32 [ %28, %30 ], [ %34, %36 ], [ 0, %35 ], [ %11, %13 ], [ %20, %22 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  ret i32 %.0
}

declare noundef i32 @_ZNK7UapkiNS4Cert7CerItem14getIssuerAndSNEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(401), ptr noundef) local_unnamed_addr #2

declare noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo6setSidENS0_20SignerIdentifierTypeEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef i32 @_ZN7UapkiNS5Pkcs717SignedDataBuilder10SignerInfo10setVersionEj(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #2

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass