; 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.UapkiNS::SmartBA" = type { ptr }
%"struct.UapkiNS::Doc::Verify::AttrTimeStamp" = type { %"class.UapkiNS::Tsp::TsTokenParser", %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.UapkiNS::SmartBA", i64, ptr, i32, i32 }
%"class.UapkiNS::Tsp::TsTokenParser" = type { %"class.UapkiNS::Pkcs7::SignedDataParser", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", ptr, ptr, i64, i8, i8, ptr }
%"class.UapkiNS::Pkcs7::SignedDataParser" = type { ptr, i32, %"class.std::vector", %"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo", %"class.UapkiNS::VectorBA", %"class.UapkiNS::VectorBA", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.UapkiNS::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.UapkiNS::Pkcs7::SignedDataParser::SignerInfo" = type { ptr, i32, i64, %"class.UapkiNS::SmartBA", %"struct.UapkiNS::AlgorithmIdentifier", %"class.std::vector.8", %"struct.UapkiNS::AlgorithmIdentifier", %"class.UapkiNS::SmartBA", %"class.std::vector.8", %"class.UapkiNS::SmartBA", %"struct.UapkiNS::Pkcs7::SignedDataParser::SignerInfo::MandatoryAttrs" }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Pkcs7::SignedDataParser::SignerInfo::MandatoryAttrs" = type { %"class.std::__cxx11::basic_string", %"class.UapkiNS::SmartBA" }
%"class.std::__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] }

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #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 dso_local noundef nonnull align 8 dereferenceable(136) ptr @_ZN7UapkiNS3Tsp13TsTokenParser19getSignedDataParserEv(ptr noundef nonnull align 8 dereferenceable(240)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser10SignerInfo18getDigestAlgorithmEv(ptr noundef nonnull align 8 dereferenceable(216)) #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 uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify13AttrTimeStamp12verifyDigestERNS_13ContentHasherEb(ptr noundef nonnull align 8 dereferenceable(552) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, i1 noundef zeroext %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca %"class.UapkiNS::SmartBA", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  %14 = zext i1 %2 to i8
  store i8 %14, ptr %7, align 1, !tbaa !9
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %16 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 1
  %17 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser10SignerInfo18getDigestAlgorithmEv(ptr noundef nonnull align 8 dereferenceable(216) %16)
          to label %18 unwind label %27

18:                                               ; preds = %3
  %19 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %17, i32 0, i32 0
  %20 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  %21 = invoke i32 @hash_from_oid(ptr noundef %20)
          to label %22 unwind label %27

22:                                               ; preds = %18
  store i32 %21, ptr %10, align 4, !tbaa !13
  %23 = load i32, ptr %10, align 4, !tbaa !13
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %22
  %26 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 3, ptr %26, align 8, !tbaa !15
  store i32 4110, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

27:                                               ; preds = %107, %104, %101, %94, %91, %88, %78, %69, %60, %54, %52, %49, %41, %37, %35, %31, %18, %3
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %11, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %122

31:                                               ; preds = %22
  %32 = load i32, ptr %10, align 4, !tbaa !13
  %33 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 0
  %34 = invoke noundef nonnull align 8 dereferenceable(136) ptr @_ZN7UapkiNS3Tsp13TsTokenParser19getSignedDataParserEv(ptr noundef nonnull align 8 dereferenceable(240) %33)
          to label %35 unwind label %27

35:                                               ; preds = %31
  %36 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser19getEncapContentInfoEv(ptr noundef nonnull align 8 dereferenceable(136) %34)
          to label %37 unwind label %27

37:                                               ; preds = %35
  %38 = getelementptr inbounds %"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo", ptr %36, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !42
  %40 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %41 unwind label %27

41:                                               ; preds = %37
  %42 = invoke i32 @hash(i32 noundef %32, ptr noundef %39, ptr noundef %40)
          to label %43 unwind label %27

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

46:                                               ; preds = %43
  %47 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 3, ptr %47, align 8, !tbaa !15
  %48 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %48, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

49:                                               ; preds = %43
  %50 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 1
  %51 = invoke noundef ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser10SignerInfo16getMessageDigestEv(ptr noundef nonnull align 8 dereferenceable(216) %50)
          to label %52 unwind label %27

52:                                               ; preds = %49
  %53 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %54 unwind label %27

54:                                               ; preds = %52
  %55 = invoke i32 @ba_cmp(ptr noundef %51, ptr noundef %53)
          to label %56 unwind label %27

56:                                               ; preds = %54
  %57 = icmp ne i32 %55, 0
  br i1 %57, label %58, label %60

58:                                               ; preds = %56
  %59 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 4, ptr %59, align 8, !tbaa !15
  store i32 4153, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

60:                                               ; preds = %56
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = invoke noundef zeroext i1 @_ZNK7UapkiNS13ContentHasher9isPresentEv(ptr noundef nonnull align 8 dereferenceable(80) %61)
          to label %63 unwind label %27

63:                                               ; preds = %60
  br i1 %62, label %66, label %64

64:                                               ; preds = %63
  %65 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 2, ptr %65, align 8, !tbaa !15
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

66:                                               ; preds = %63
  %67 = load i8, ptr %7, align 1, !tbaa !9, !range !43, !noundef !44
  %68 = trunc i8 %67 to i1
  br i1 %68, label %101, label %69

69:                                               ; preds = %66
  %70 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 3
  %71 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %70) #4
  %72 = invoke i32 @hash_from_oid(ptr noundef %71)
          to label %73 unwind label %27

73:                                               ; preds = %69
  store i32 %72, ptr %10, align 4, !tbaa !13
  %74 = load i32, ptr %10, align 4, !tbaa !13
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %73
  %77 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 3, ptr %77, align 8, !tbaa !15
  store i32 4110, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

78:                                               ; preds = %73
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = load i32, ptr %10, align 4, !tbaa !13
  %81 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher6digestE7HashAlg(ptr noundef nonnull align 8 dereferenceable(80) %79, i32 noundef %80)
          to label %82 unwind label %27

82:                                               ; preds = %78
  store i32 %81, ptr %8, align 4, !tbaa !11
  %83 = load i32, ptr %8, align 4, !tbaa !11
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %88

85:                                               ; preds = %82
  %86 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 3, ptr %86, align 8, !tbaa !15
  %87 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %87, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

88:                                               ; preds = %82
  %89 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 4
  %90 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %91 unwind label %27

91:                                               ; preds = %88
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = invoke noundef ptr @_ZNK7UapkiNS13ContentHasher12getHashValueEv(ptr noundef nonnull align 8 dereferenceable(80) %92)
          to label %94 unwind label %27

94:                                               ; preds = %91
  %95 = invoke i32 @ba_cmp(ptr noundef %90, ptr noundef %93)
          to label %96 unwind label %27

96:                                               ; preds = %94
  %97 = icmp eq i32 %95, 0
  %98 = zext i1 %97 to i64
  %99 = select i1 %97, i32 5, i32 4
  %100 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 %99, ptr %100, align 8, !tbaa !15
  br label %114

101:                                              ; preds = %66
  %102 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 4
  %103 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %104 unwind label %27

104:                                              ; preds = %101
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = invoke noundef ptr @_ZNK7UapkiNS13ContentHasher15getContentBytesEv(ptr noundef nonnull align 8 dereferenceable(80) %105)
          to label %107 unwind label %27

107:                                              ; preds = %104
  %108 = invoke i32 @ba_cmp(ptr noundef %103, ptr noundef %106)
          to label %109 unwind label %27

109:                                              ; preds = %107
  %110 = icmp eq i32 %108, 0
  %111 = zext i1 %110 to i64
  %112 = select i1 %110, i32 5, i32 4
  %113 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  store i32 %112, ptr %113, align 8, !tbaa !15
  br label %114

114:                                              ; preds = %109, %96
  %115 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::AttrTimeStamp", ptr %15, i32 0, i32 7
  %116 = load i32, ptr %115, align 8, !tbaa !15
  %117 = icmp eq i32 %116, 5
  %118 = zext i1 %117 to i64
  %119 = select i1 %117, i32 0, i32 4153
  store i32 %119, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %120

120:                                              ; preds = %114, %85, %76, %64, %58, %46, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %121 = load i32, ptr %4, align 4
  ret i32 %121

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

declare i32 @hash_from_oid(ptr noundef) #3

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

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

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

declare i32 @ba_cmp(ptr noundef, ptr noundef) #3

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

declare noundef i32 @_ZN7UapkiNS13ContentHasher6digestE7HashAlg(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS13ContentHasher15getContentBytesEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 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 = { 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 #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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS7HashAlg", !7, i64 0}
!15 = !{!16, !41, i64 544}
!16 = !{!"_ZTSN7UapkiNS3Doc6Verify13AttrTimeStampE", !17, i64 0, !32, i64 240, !24, i64 456, !24, i64 488, !34, i64 520, !26, i64 528, !6, i64 536, !41, i64 544, !41, i64 548}
!17 = !{!"_ZTSN7UapkiNS3Tsp13TsTokenParserE", !18, i64 0, !24, i64 136, !24, i64 168, !6, i64 200, !6, i64 208, !26, i64 216, !10, i64 224, !10, i64 225, !6, i64 232}
!18 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParserE", !6, i64 0, !12, i64 8, !19, i64 16, !23, i64 40, !27, i64 80, !27, i64 104, !26, i64 128}
!19 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSN7UapkiNS5Pkcs723EncapsulatedContentInfoE", !24, i64 0, !6, i64 32}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !26, i64 8, !7, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSN7UapkiNS8VectorBAE", !28, i64 0}
!28 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfoE", !6, i64 0, !12, i64 8, !33, i64 16, !34, i64 24, !35, i64 32, !36, i64 72, !35, i64 96, !34, i64 136, !36, i64 144, !34, i64 168, !40, i64 176}
!33 = !{!"_ZTSN7UapkiNS5Pkcs720SignerIdentifierTypeE", !7, i64 0}
!34 = !{!"_ZTSN7UapkiNS7SmartBAE", !6, i64 0}
!35 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !24, i64 0, !6, i64 32}
!36 = !{!"_ZTSSt6vectorIN7UapkiNS9AttributeESaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfo14MandatoryAttrsE", !24, i64 0, !34, i64 32}
!41 = !{!"_ZTSN7UapkiNS12VerifyStatusE", !7, i64 0}
!42 = !{!23, !6, i64 32}
!43 = !{i8 0, i8 2}
!44 = !{}


; 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 }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser10SignerInfo18getDigestAlgorithmEv(ptr noundef nonnull align 8 dereferenceable(216)) local_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 uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Doc6Verify13AttrTimeStamp12verifyDigestERNS_13ContentHasherEb(ptr noundef nonnull align 8 dereferenceable(552) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, i1 noundef zeroext %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.UapkiNS::SmartBA", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 240
  %6 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser10SignerInfo18getDigestAlgorithmEv(ptr noundef nonnull align 8 dereferenceable(216) %5)
  %7 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  %8 = invoke i32 @hash_from_oid(ptr noundef %7)
          to label %9 unwind label %13

9:                                                ; preds = %3
  %10 = icmp eq i32 %8, 0
  br i1 %10, label %11, label %15

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 3, ptr %12, align 8, !tbaa !5
  br label %67

13:                                               ; preds = %.invoke, %46, %38, %27, %25, %15, %3
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %14

15:                                               ; preds = %9
  %16 = call noundef nonnull align 8 dereferenceable(136) ptr @_ZN7UapkiNS3Tsp13TsTokenParser19getSignedDataParserEv(ptr noundef nonnull align 8 dereferenceable(240) %0)
  %17 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser19getEncapContentInfoEv(ptr noundef nonnull align 8 dereferenceable(136) %16)
  %18 = getelementptr inbounds i8, ptr %17, i64 32
  %19 = load ptr, ptr %18, align 8, !tbaa !37
  %20 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %21 = invoke i32 @hash(i32 noundef %8, ptr noundef %19, ptr noundef %20)
          to label %22 unwind label %13

22:                                               ; preds = %15
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %25, label %23

23:                                               ; preds = %22
  %24 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 3, ptr %24, align 8, !tbaa !5
  br label %67

25:                                               ; preds = %22
  %26 = invoke noundef ptr @_ZNK7UapkiNS5Pkcs716SignedDataParser10SignerInfo16getMessageDigestEv(ptr noundef nonnull align 8 dereferenceable(216) %5)
          to label %27 unwind label %13

27:                                               ; preds = %25
  %28 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %29 = invoke i32 @ba_cmp(ptr noundef %26, ptr noundef %28)
          to label %30 unwind label %13

30:                                               ; preds = %27
  %.not20 = icmp eq i32 %29, 0
  br i1 %.not20, label %33, label %31

31:                                               ; preds = %30
  %32 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 4, ptr %32, align 8, !tbaa !5
  br label %67

33:                                               ; preds = %30
  %34 = call noundef zeroext i1 @_ZNK7UapkiNS13ContentHasher9isPresentEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br i1 %34, label %37, label %35

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 2, ptr %36, align 8, !tbaa !5
  br label %67

37:                                               ; preds = %33
  br i1 %2, label %55, label %38

38:                                               ; preds = %37
  %39 = getelementptr inbounds i8, ptr %0, i64 488
  %40 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %39) #4
  %41 = invoke i32 @hash_from_oid(ptr noundef %40)
          to label %42 unwind label %13

42:                                               ; preds = %38
  %43 = icmp eq i32 %41, 0
  br i1 %43, label %44, label %46

44:                                               ; preds = %42
  %45 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 3, ptr %45, align 8, !tbaa !5
  br label %67

46:                                               ; preds = %42
  %47 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher6digestE7HashAlg(ptr noundef nonnull align 8 dereferenceable(80) %1, i32 noundef %41)
          to label %48 unwind label %13

48:                                               ; preds = %46
  %.not21 = icmp eq i32 %47, 0
  br i1 %.not21, label %51, label %49

49:                                               ; preds = %48
  %50 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 3, ptr %50, align 8, !tbaa !5
  br label %67

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %0, i64 520
  %53 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %52)
  %54 = call noundef ptr @_ZNK7UapkiNS13ContentHasher12getHashValueEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %.invoke

55:                                               ; preds = %37
  %56 = getelementptr inbounds i8, ptr %0, i64 520
  %57 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %56)
  %58 = call noundef ptr @_ZNK7UapkiNS13ContentHasher15getContentBytesEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %.invoke

.invoke:                                          ; preds = %51, %55
  %59 = phi ptr [ %57, %55 ], [ %53, %51 ]
  %60 = phi ptr [ %58, %55 ], [ %54, %51 ]
  %61 = invoke i32 @ba_cmp(ptr noundef %59, ptr noundef %60)
          to label %62 unwind label %13

62:                                               ; preds = %.invoke
  %63 = icmp eq i32 %61, 0
  %64 = select i1 %63, i32 5, i32 4
  %65 = getelementptr inbounds i8, ptr %0, i64 544
  store i32 %64, ptr %65, align 8, !tbaa !5
  %66 = select i1 %63, i32 0, i32 4153
  br label %67

67:                                               ; preds = %62, %49, %44, %35, %31, %23, %11
  %.0 = phi i32 [ 4110, %11 ], [ %21, %23 ], [ 4153, %31 ], [ %66, %62 ], [ 4110, %44 ], [ %47, %49 ], [ 0, %35 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret i32 %.0
}

declare i32 @hash_from_oid(ptr noundef) local_unnamed_addr #3

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

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

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

declare i32 @ba_cmp(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare noundef i32 @_ZN7UapkiNS13ContentHasher6digestE7HashAlg(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS13ContentHasher15getContentBytesEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 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 = { 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 #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 = { 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, !36, i64 544}
!6 = !{!"_ZTSN7UapkiNS3Doc6Verify13AttrTimeStampE", !7, i64 0, !27, i64 240, !18, i64 456, !18, i64 488, !29, i64 520, !20, i64 528, !9, i64 536, !36, i64 544, !36, i64 548}
!7 = !{!"_ZTSN7UapkiNS3Tsp13TsTokenParserE", !8, i64 0, !18, i64 136, !18, i64 168, !9, i64 200, !9, i64 208, !20, i64 216, !26, i64 224, !26, i64 225, !9, i64 232}
!8 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParserE", !9, i64 0, !12, i64 8, !13, i64 16, !17, i64 40, !21, i64 80, !21, i64 104, !20, i64 128}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, 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", !9, i64 0, !9, i64 8, !9, i64 16}
!17 = !{!"_ZTSN7UapkiNS5Pkcs723EncapsulatedContentInfoE", !18, i64 0, !9, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !10, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!20 = !{!"long", !10, i64 0}
!21 = !{!"_ZTSN7UapkiNS8VectorBAE", !22, i64 0}
!22 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!26 = !{!"bool", !10, i64 0}
!27 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfoE", !9, i64 0, !12, i64 8, !28, i64 16, !29, i64 24, !30, i64 32, !31, i64 72, !30, i64 96, !29, i64 136, !31, i64 144, !29, i64 168, !35, i64 176}
!28 = !{!"_ZTSN7UapkiNS5Pkcs720SignerIdentifierTypeE", !10, i64 0}
!29 = !{!"_ZTSN7UapkiNS7SmartBAE", !9, i64 0}
!30 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !18, i64 0, !9, i64 32}
!31 = !{!"_ZTSSt6vectorIN7UapkiNS9AttributeESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!35 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfo14MandatoryAttrsE", !18, i64 0, !29, i64 32}
!36 = !{!"_ZTSN7UapkiNS12VerifyStatusE", !10, i64 0}
!37 = !{!17, !9, i64 32}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass