; 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::KeyAgreeRecipientInfo" = type { %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase", ptr }
%"class.UapkiNS::Pkcs7::EnvelopedDataBuilder::RecipientInfoBase" = type { i32 }
%struct.RecipientEncryptedKey = type { %struct.KeyAgreeRecipientIdentifier, %struct.OCTET_STRING, %struct.asn_struct_ctx_s }
%struct.KeyAgreeRecipientIdentifier = type { i32, %"union.KeyAgreeRecipientIdentifier::KeyAgreeRecipientIdentifier_u", %struct.asn_struct_ctx_s }
%"union.KeyAgreeRecipientIdentifier::KeyAgreeRecipientIdentifier_u" = type { %struct.IssuerAndSerialNumber }
%struct.IssuerAndSerialNumber = type { %struct.Name, %struct.ASN__PRIMITIVE_TYPE_s, %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.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.RecipientKeyIdentifier = type { %struct.OCTET_STRING, ptr, ptr, %struct.asn_struct_ctx_s }
%struct.KeyAgreeRecipientInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.OriginatorIdentifierOrKey, ptr, %struct.AlgorithmIdentifier, %struct.RecipientEncryptedKeys, %struct.asn_struct_ctx_s }
%struct.OriginatorIdentifierOrKey = type { i32, %"union.OriginatorIdentifierOrKey::OriginatorIdentifierOrKey_u", %struct.asn_struct_ctx_s }
%"union.OriginatorIdentifierOrKey::OriginatorIdentifierOrKey_u" = type { %struct.IssuerAndSerialNumber }
%struct.AlgorithmIdentifier = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.RecipientEncryptedKeys = type { %struct.anon.7, %struct.asn_struct_ctx_s }
%struct.anon.7 = type { ptr, i32, i32, ptr }

@.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 void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #0

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

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) #0

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

declare ptr @get_RecipientEncryptedKey_desc() #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs720EnvelopedDataBuilder21KeyAgreeRecipientInfo40addRecipientEncryptedKeyByRecipientKeyIdEPK12ByteArray_stS5_mS5_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) #3 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  %16 = load ptr, ptr %7, align 8
  %17 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder::KeyAgreeRecipientInfo", ptr %16, i32 0, i32 1
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %26

20:                                               ; preds = %5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %23, %20, %5
  store i32 4101, ptr %6, align 4
  br label %126

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store ptr null, ptr %13, align 8, !tbaa !5
  %28 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 216) #5
  store ptr %28, ptr %13, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %27
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %34

32:                                               ; preds = %29
  store i32 1, ptr %12, align 4, !tbaa !15
  %33 = load i32, ptr %12, align 4, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 501, i32 noundef %33, ptr noundef null)
  br label %121

34:                                               ; preds = %29
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.RecipientEncryptedKey, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.KeyAgreeRecipientIdentifier, ptr %38, i32 0, i32 0
  store i32 2, ptr %39, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.RecipientEncryptedKey, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.KeyAgreeRecipientIdentifier, ptr %41, i32 0, i32 1
  store ptr %42, ptr %14, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %36
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.RecipientKeyIdentifier, ptr %45, i32 0, i32 0
  %47 = call i32 @asn_ba2OCTSTRING(ptr noundef %44, ptr noundef %46)
  store i32 %47, ptr %12, align 4, !tbaa !15
  %48 = load i32, ptr %12, align 4, !tbaa !15
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %52

50:                                               ; preds = %43
  %51 = load i32, ptr %12, align 4, !tbaa !15
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 508, i32 noundef %51)
  store i32 4, ptr %15, align 4
  br label %101

52:                                               ; preds = %43
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = icmp ugt i64 %55, 0
  br i1 %56, label %57, label %84

57:                                               ; preds = %54
  %58 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 40) #5
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.RecipientKeyIdentifier, ptr %59, i32 0, i32 1
  store ptr %58, ptr %60, align 8, !tbaa !24
  br label %61

61:                                               ; preds = %57
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.RecipientKeyIdentifier, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !24
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %68

66:                                               ; preds = %61
  store i32 1, ptr %12, align 4, !tbaa !15
  %67 = load i32, ptr %12, align 4, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 512, i32 noundef %67, ptr noundef null)
  store i32 4, ptr %15, align 4
  br label %101

68:                                               ; preds = %61
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.RecipientKeyIdentifier, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !24
  %75 = load i64, ptr %10, align 8, !tbaa !9
  %76 = call i32 @asn_time2GT(ptr noundef %74, i64 noundef %75, ptr noundef null)
  store i32 %76, ptr %12, align 4, !tbaa !15
  %77 = load i32, ptr %12, align 4, !tbaa !15
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %81

79:                                               ; preds = %71
  %80 = load i32, ptr %12, align 4, !tbaa !15
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 513, i32 noundef %80)
  store i32 4, ptr %15, align 4
  br label %101

81:                                               ; preds = %71
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83, %54
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %100

87:                                               ; preds = %84
  br label %88

88:                                               ; preds = %87
  %89 = call ptr @get_OtherKeyAttribute_desc()
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = call ptr @asn_decode_ba_with_alloc(ptr noundef %89, ptr noundef %90)
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.RecipientKeyIdentifier, ptr %92, i32 0, i32 2
  store ptr %91, ptr %93, align 8, !tbaa !26
  %94 = icmp eq ptr null, %91
  br i1 %94, label %95, label %97

95:                                               ; preds = %88
  store i32 2, ptr %12, align 4, !tbaa !15
  %96 = load i32, ptr %12, align 4, !tbaa !15
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 518, i32 noundef %96)
  store i32 4, ptr %15, align 4
  br label %101

97:                                               ; preds = %88
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99, %84
  store i32 0, ptr %15, align 4
  br label %101

101:                                              ; preds = %100, %95, %79, %66, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %102 = load i32, ptr %15, align 4
  switch i32 %102, label %125 [
    i32 0, label %103
    i32 4, label %121
  ]

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.RecipientEncryptedKey, ptr %106, i32 0, i32 1
  %108 = call i32 @asn_ba2OCTSTRING(ptr noundef %105, ptr noundef %107)
  store i32 %108, ptr %12, align 4, !tbaa !15
  %109 = load i32, ptr %12, align 4, !tbaa !15
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %104
  %112 = load i32, ptr %12, align 4, !tbaa !15
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 523, i32 noundef %112)
  br label %121

113:                                              ; preds = %104
  br label %114

114:                                              ; preds = %113
  br label %115

115:                                              ; preds = %114
  %116 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataBuilder::KeyAgreeRecipientInfo", ptr %16, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %117, i32 0, i32 4
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = call i32 @asn_set_add(ptr noundef %118, ptr noundef %119)
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %115, %111, %101, %32
  %122 = call ptr @get_RecipientEncryptedKey_desc()
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  call void @asn_free(ptr noundef %122, ptr noundef %123)
  %124 = load i32, ptr %12, align 4, !tbaa !15
  store i32 %124, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %125

125:                                              ; preds = %121, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %126

126:                                              ; preds = %125, %26
  %127 = load i32, ptr %6, align 4
  ret i32 %127
}

declare i32 @asn_time2GT(ptr noundef, i64 noundef, ptr noundef) #0

declare ptr @get_OtherKeyAttribute_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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN7UapkiNS5Pkcs720EnvelopedDataBuilder21KeyAgreeRecipientInfoE", !13, i64 0, !6, i64 8}
!13 = !{!"_ZTSN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseE", !14, i64 0}
!14 = !{!"_ZTS16RecipientInfo_PR", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !20, i64 0}
!18 = !{!"_ZTS21RecipientEncryptedKey", !19, i64 0, !23, i64 152, !21, i64 192}
!19 = !{!"_ZTS27KeyAgreeRecipientIdentifier", !20, i64 0, !7, i64 8, !21, i64 128}
!20 = !{!"_ZTS30KeyAgreeRecipientIdentifier_PR", !7, i64 0}
!21 = !{!"_ZTS16asn_struct_ctx_s", !22, i64 0, !22, i64 2, !16, i64 4, !6, i64 8, !10, i64 16}
!22 = !{!"short", !7, i64 0}
!23 = !{!"_ZTS12OCTET_STRING", !6, i64 0, !16, i64 8, !21, i64 16}
!24 = !{!25, !6, i64 40}
!25 = !{!"_ZTS22RecipientKeyIdentifier", !23, i64 0, !6, i64 40, !6, i64 48, !21, i64 56}
!26 = !{!25, !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"

@.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 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

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare ptr @get_RecipientEncryptedKey_desc() local_unnamed_addr #0

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

11:                                               ; preds = %5
  %12 = tail call noalias dereferenceable_or_null(216) ptr @calloc(i64 noundef 1, i64 noundef 216) #3
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %11
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 501, i32 noundef 1, ptr noundef null)
  br label %.thread

15:                                               ; preds = %11
  store i32 2, ptr %12, align 8, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %12, i64 8
  %17 = tail call i32 @asn_ba2OCTSTRING(ptr noundef nonnull %1, ptr noundef nonnull %16)
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %19, label %18

18:                                               ; preds = %15
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 508, i32 noundef %17)
  br label %.thread

19:                                               ; preds = %15
  %.not51 = icmp eq i64 %3, 0
  br i1 %.not51, label %28, label %20

20:                                               ; preds = %19
  %21 = tail call noalias dereferenceable_or_null(40) ptr @calloc(i64 noundef 1, i64 noundef 40) #3
  %22 = getelementptr inbounds i8, ptr %12, i64 48
  store ptr %21, ptr %22, align 8, !tbaa !21
  %23 = icmp eq ptr %21, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %20
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 512, i32 noundef 1, ptr noundef null)
  br label %.thread

25:                                               ; preds = %20
  %26 = tail call i32 @asn_time2GT(ptr noundef nonnull %21, i64 noundef %3, ptr noundef null)
  %.not52 = icmp eq i32 %26, 0
  br i1 %.not52, label %28, label %27

27:                                               ; preds = %25
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 513, i32 noundef %26)
  br label %.thread

28:                                               ; preds = %25, %19
  %.not53 = icmp eq ptr %4, null
  br i1 %.not53, label %35, label %29

29:                                               ; preds = %28
  %30 = tail call ptr @get_OtherKeyAttribute_desc()
  %31 = tail call ptr @asn_decode_ba_with_alloc(ptr noundef %30, ptr noundef nonnull %4)
  %32 = getelementptr inbounds i8, ptr %12, i64 56
  store ptr %31, ptr %32, align 8, !tbaa !23
  %33 = icmp eq ptr %31, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 518, i32 noundef 2)
  br label %.thread

35:                                               ; preds = %29, %28
  %36 = getelementptr inbounds i8, ptr %12, i64 152
  %37 = tail call i32 @asn_ba2OCTSTRING(ptr noundef nonnull %2, ptr noundef nonnull %36)
  %.not54 = icmp eq i32 %37, 0
  br i1 %.not54, label %39, label %38

38:                                               ; preds = %35
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 523, i32 noundef %37)
  br label %.thread

39:                                               ; preds = %35
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 224
  %42 = tail call i32 @asn_set_add(ptr noundef nonnull %41, ptr noundef nonnull %12)
  br label %.thread

.thread:                                          ; preds = %34, %27, %24, %18, %39, %38, %14
  %.2 = phi i32 [ 1, %14 ], [ %37, %38 ], [ 0, %39 ], [ 2, %34 ], [ %26, %27 ], [ 1, %24 ], [ %17, %18 ]
  %.035 = phi ptr [ null, %14 ], [ %12, %38 ], [ null, %39 ], [ %12, %34 ], [ %12, %27 ], [ %12, %24 ], [ %12, %18 ]
  %43 = tail call ptr @get_RecipientEncryptedKey_desc()
  tail call void @asn_free(ptr noundef %43, ptr noundef %.035)
  br label %44

44:                                               ; preds = %5, %.thread
  %.1 = phi i32 [ %.2, %.thread ], [ 4101, %5 ]
  ret i32 %.1
}

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

declare ptr @get_OtherKeyAttribute_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, !11, i64 8}
!6 = !{!"_ZTSN7UapkiNS5Pkcs720EnvelopedDataBuilder21KeyAgreeRecipientInfoE", !7, i64 0, !11, i64 8}
!7 = !{!"_ZTSN7UapkiNS5Pkcs720EnvelopedDataBuilder17RecipientInfoBaseE", !8, i64 0}
!8 = !{!"_ZTS16RecipientInfo_PR", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!13, !15, i64 0}
!13 = !{!"_ZTS21RecipientEncryptedKey", !14, i64 0, !20, i64 152, !16, i64 192}
!14 = !{!"_ZTS27KeyAgreeRecipientIdentifier", !15, i64 0, !9, i64 8, !16, i64 128}
!15 = !{!"_ZTS30KeyAgreeRecipientIdentifier_PR", !9, i64 0}
!16 = !{!"_ZTS16asn_struct_ctx_s", !17, i64 0, !17, i64 2, !18, i64 4, !11, i64 8, !19, i64 16}
!17 = !{!"short", !9, i64 0}
!18 = !{!"int", !9, i64 0}
!19 = !{!"long", !9, i64 0}
!20 = !{!"_ZTS12OCTET_STRING", !11, i64 0, !18, i64 8, !16, i64 16}
!21 = !{!22, !11, i64 40}
!22 = !{!"_ZTS22RecipientKeyIdentifier", !20, i64 0, !11, i64 40, !11, i64 48, !16, i64 56}
!23 = !{!22, !11, i64 48}


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