; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (envelopeddata-helper)

; 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::Pkcs7::EnvelopedDataBuilder" = type { %"struct.UapkiNS::Pkcs7::EncryptedContentInfo", ptr, %"class.std::vector", ptr }
%"struct.UapkiNS::Pkcs7::EncryptedContentInfo" = type { %"class.std::__cxx11::basic_string", %"struct.UapkiNS::AlgorithmIdentifier", ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *, std::allocator<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *, std::allocator<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *, std::allocator<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *, std::allocator<UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.EnvelopedData = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.RecipientInfos, %struct.EncryptedContentInfo, ptr, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.RecipientInfos = type { %struct.anon, %struct.asn_struct_ctx_s }
%struct.anon = type { ptr, i32, i32, ptr }
%struct.EncryptedContentInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.AlgorithmIdentifier, ptr, %struct.asn_struct_ctx_s }
%struct.AlgorithmIdentifier = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.OriginatorInfo = type { ptr, ptr, %struct.asn_struct_ctx_s }
%struct.RevocationInfoChoice = type { i32, %"union.RevocationInfoChoice::RevocationInfoChoice_u", %struct.asn_struct_ctx_s }
%"union.RevocationInfoChoice::RevocationInfoChoice_u" = type { %struct.CertificateList }
%struct.CertificateList = type { %struct.TBSCertList, %struct.AlgorithmIdentifier, %struct.BIT_STRING_s, %struct.asn_struct_ctx_s }
%struct.TBSCertList = type { ptr, %struct.AlgorithmIdentifier, %struct.Name, %struct.PKIXTime, %struct.PKIXTime, ptr, ptr, %struct.asn_struct_ctx_s }
%struct.Name = type { i32, %"union.Name::Name_u", %struct.asn_struct_ctx_s }
%"union.Name::Name_u" = type { %struct.RDNSequence }
%struct.RDNSequence = type { %struct.anon.3, %struct.asn_struct_ctx_s }
%struct.anon.3 = type { ptr, i32, i32, ptr }
%struct.PKIXTime = type { i32, %"union.PKIXTime::PKIXTime_u", %struct.asn_struct_ctx_s }
%"union.PKIXTime::PKIXTime_u" = type { %struct.OCTET_STRING }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.BIT_STRING_s = type { ptr, i32, i32, %struct.asn_struct_ctx_s }

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

declare void @asn_free(ptr noundef, ptr noundef) #0

; 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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #0

declare i32 @asn_decode_ba(ptr noundef, ptr noundef, ptr noundef) #0

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

declare i32 @asn_set_add(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs720EnvelopedDataBuilder16addOriginatorCrlEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store ptr null, ptr %7, align 8, !tbaa !5
  %10 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %16

13:                                               ; preds = %2
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %17, label %16

16:                                               ; preds = %13, %2
  store i32 4101, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %104

17:                                               ; preds = %13
  %18 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.EnvelopedData, ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !22
  %22 = icmp ne ptr %21, null
  br i1 %22, label %39, label %23

23:                                               ; preds = %17
  %24 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 40) #5
  %25 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds %struct.EnvelopedData, ptr %26, i32 0, i32 1
  store ptr %24, ptr %27, align 8, !tbaa !22
  br label %28

28:                                               ; preds = %23
  %29 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.EnvelopedData, ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !22
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %36

34:                                               ; preds = %28
  store i32 1, ptr %6, align 4, !tbaa !9
  %35 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 127, i32 noundef %35, ptr noundef null)
  br label %100

36:                                               ; preds = %28
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38, %17
  %40 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.EnvelopedData, ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  %44 = getelementptr inbounds %struct.OriginatorInfo, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !31
  %46 = icmp ne ptr %45, null
  br i1 %46, label %67, label %47

47:                                               ; preds = %39
  %48 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 48) #5
  %49 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.EnvelopedData, ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = getelementptr inbounds %struct.OriginatorInfo, ptr %52, i32 0, i32 1
  store ptr %48, ptr %53, align 8, !tbaa !31
  br label %54

54:                                               ; preds = %47
  %55 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct.EnvelopedData, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !22
  %59 = getelementptr inbounds %struct.OriginatorInfo, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !31
  %61 = icmp eq ptr %60, null
  br i1 %61, label %62, label %64

62:                                               ; preds = %54
  store i32 1, ptr %6, align 4, !tbaa !9
  %63 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 130, i32 noundef %63, ptr noundef null)
  br label %100

64:                                               ; preds = %54
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66, %39
  %68 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 464) #5
  store ptr %68, ptr %7, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %67
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %74

72:                                               ; preds = %69
  store i32 1, ptr %6, align 4, !tbaa !9
  %73 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 133, i32 noundef %73, ptr noundef null)
  br label %100

74:                                               ; preds = %69
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.RevocationInfoChoice, ptr %77, i32 0, i32 0
  store i32 1, ptr %78, align 8, !tbaa !33
  br label %79

79:                                               ; preds = %76
  %80 = call ptr @get_CertificateList_desc()
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.RevocationInfoChoice, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = call i32 @asn_decode_ba(ptr noundef %80, ptr noundef %82, ptr noundef %83)
  store i32 %84, ptr %6, align 4, !tbaa !9
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %79
  %88 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 135, i32 noundef %88)
  br label %100

89:                                               ; preds = %79
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder", ptr %9, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds %struct.EnvelopedData, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = getelementptr inbounds %struct.OriginatorInfo, ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !31
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = call i32 @asn_set_add(ptr noundef %97, ptr noundef %98)
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %91, %87, %72, %62, %34
  %101 = call ptr @get_RevocationInfoChoice_desc()
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  call void @asn_free(ptr noundef %101, ptr noundef %102)
  %103 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %103, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %104

104:                                              ; preds = %100, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %105 = load i32, ptr %3, align 4
  ret i32 %105
}

declare ptr @get_CertificateList_desc() #0

declare ptr @get_RevocationInfoChoice_desc() #0

attributes #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 = { nounwind allocsize(0,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 #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 }
attributes #5 = { nounwind allocsize(0,1) }

!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 80}
!12 = !{!"_ZTSN7UapkiNS5Pkcs720EnvelopedDataBuilderE", !13, i64 0, !6, i64 80, !18, i64 88, !6, i64 112}
!13 = !{!"_ZTSN7UapkiNS5Pkcs720EncryptedContentInfoE", !14, i64 0, !17, i64 32, !6, i64 72}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !14, i64 0, !6, i64 32}
!18 = !{!"_ZTSSt6vectorIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!23, !6, i64 16}
!23 = !{!"_ZTS13EnvelopedData", !24, i64 0, !6, i64 16, !25, i64 24, !29, i64 72, !6, i64 168, !27, i64 176}
!24 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!25 = !{!"_ZTS14RecipientInfos", !26, i64 0, !27, i64 24}
!26 = !{!"_ZTSN14RecipientInfosUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!27 = !{!"_ZTS16asn_struct_ctx_s", !28, i64 0, !28, i64 2, !10, i64 4, !6, i64 8, !16, i64 16}
!28 = !{!"short", !7, i64 0}
!29 = !{!"_ZTS20EncryptedContentInfo", !24, i64 0, !30, i64 16, !6, i64 64, !27, i64 72}
!30 = !{!"_ZTS19AlgorithmIdentifier", !24, i64 0, !6, i64 16, !27, i64 24}
!31 = !{!32, !6, i64 8}
!32 = !{!"_ZTS14OriginatorInfo", !6, i64 0, !6, i64 8, !27, i64 16}
!33 = !{!34, !35, i64 0}
!34 = !{!"_ZTS20RevocationInfoChoice", !35, i64 0, !7, i64 8, !27, i64 440}
!35 = !{!"_ZTS23RevocationInfoChoice_PR", !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"

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

declare void @asn_free(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @asn_decode_ba(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare i32 @asn_set_add(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs720EnvelopedDataBuilder16addOriginatorCrlEPK12ByteArray_st(ptr nocapture noundef nonnull readonly align 8 dereferenceable(120) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 80
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = icmp ne ptr %4, null
  %6 = icmp ne ptr %1, null
  %or.cond = and i1 %6, %5
  br i1 %or.cond, label %7, label %40

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %4, i64 16
  %9 = load ptr, ptr %8, align 8, !tbaa !19
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %10, label %14

10:                                               ; preds = %7
  %11 = tail call noalias dereferenceable_or_null(40) ptr @calloc(i64 noundef 1, i64 noundef 40) #3
  store ptr %11, ptr %8, align 8, !tbaa !19
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %10
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 127, i32 noundef 1, ptr noundef null)
  br label %38

14:                                               ; preds = %10, %7
  %15 = phi ptr [ %11, %10 ], [ %9, %7 ]
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !29
  %.not22 = icmp eq ptr %17, null
  br i1 %.not22, label %18, label %22

18:                                               ; preds = %14
  %19 = tail call noalias dereferenceable_or_null(48) ptr @calloc(i64 noundef 1, i64 noundef 48) #3
  store ptr %19, ptr %16, align 8, !tbaa !29
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 130, i32 noundef 1, ptr noundef null)
  br label %38

22:                                               ; preds = %18, %14
  %23 = tail call noalias dereferenceable_or_null(464) ptr @calloc(i64 noundef 1, i64 noundef 464) #3
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 133, i32 noundef 1, ptr noundef null)
  br label %38

26:                                               ; preds = %22
  store i32 1, ptr %23, align 8, !tbaa !31
  %27 = tail call ptr @get_CertificateList_desc()
  %28 = getelementptr inbounds i8, ptr %23, i64 8
  %29 = tail call i32 @asn_decode_ba(ptr noundef %27, ptr noundef nonnull %28, ptr noundef nonnull %1)
  %.not23 = icmp eq i32 %29, 0
  br i1 %.not23, label %31, label %30

30:                                               ; preds = %26
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 135, i32 noundef %29)
  br label %38

31:                                               ; preds = %26
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !29
  %37 = tail call i32 @asn_set_add(ptr noundef %36, ptr noundef nonnull %23)
  br label %38

38:                                               ; preds = %31, %30, %25, %21, %13
  %.015 = phi i32 [ 1, %25 ], [ %29, %30 ], [ 0, %31 ], [ 1, %21 ], [ 1, %13 ]
  %.0 = phi ptr [ null, %25 ], [ %23, %30 ], [ null, %31 ], [ null, %21 ], [ null, %13 ]
  %39 = tail call ptr @get_RevocationInfoChoice_desc()
  tail call void @asn_free(ptr noundef %39, ptr noundef %.0)
  br label %40

40:                                               ; preds = %2, %38
  %.016 = phi i32 [ %.015, %38 ], [ 4101, %2 ]
  ret i32 %.016
}

declare ptr @get_CertificateList_desc() local_unnamed_addr #0

declare ptr @get_RevocationInfoChoice_desc() local_unnamed_addr #0

attributes #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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 = { nounwind allocsize(0,1) }

!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, !10, i64 80}
!6 = !{!"_ZTSN7UapkiNS5Pkcs720EnvelopedDataBuilderE", !7, i64 0, !10, i64 80, !15, i64 88, !10, i64 112}
!7 = !{!"_ZTSN7UapkiNS5Pkcs720EncryptedContentInfoE", !8, i64 0, !14, i64 32, !10, i64 72}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !8, i64 0, !10, i64 32}
!15 = !{!"_ZTSSt6vectorIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseESaIS4_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!20, !10, i64 16}
!20 = !{!"_ZTS13EnvelopedData", !21, i64 0, !10, i64 16, !23, i64 24, !27, i64 72, !10, i64 168, !25, i64 176}
!21 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !10, i64 0, !22, i64 8}
!22 = !{!"int", !11, i64 0}
!23 = !{!"_ZTS14RecipientInfos", !24, i64 0, !25, i64 24}
!24 = !{!"_ZTSN14RecipientInfosUt_E", !10, i64 0, !22, i64 8, !22, i64 12, !10, i64 16}
!25 = !{!"_ZTS16asn_struct_ctx_s", !26, i64 0, !26, i64 2, !22, i64 4, !10, i64 8, !13, i64 16}
!26 = !{!"short", !11, i64 0}
!27 = !{!"_ZTS20EncryptedContentInfo", !21, i64 0, !28, i64 16, !10, i64 64, !25, i64 72}
!28 = !{!"_ZTS19AlgorithmIdentifier", !21, i64 0, !10, i64 16, !25, i64 24}
!29 = !{!30, !10, i64 8}
!30 = !{!"_ZTS14OriginatorInfo", !10, i64 0, !10, i64 8, !25, i64 16}
!31 = !{!32, !33, i64 0}
!32 = !{!"_ZTS20RevocationInfoChoice", !33, i64 0, !11, i64 8, !25, i64 440}
!33 = !{!"_ZTS23RevocationInfoChoice_PR", !11, i64 0}


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