; 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.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.std::allocator" = type { i8 }
%struct.KeyAgreeRecipientInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.OriginatorIdentifierOrKey, ptr, %struct.AlgorithmIdentifier, %struct.RecipientEncryptedKeys, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.OriginatorIdentifierOrKey = type { i32, %"union.OriginatorIdentifierOrKey::OriginatorIdentifierOrKey_u", %struct.asn_struct_ctx_s }
%"union.OriginatorIdentifierOrKey::OriginatorIdentifierOrKey_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.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 }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo" = type { i32, i32, ptr, ptr, %"struct.UapkiNS::AlgorithmIdentifier", %"class.std::vector.23" }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<UapkiNS::Pkcs7::RecipientEncryptedKey, std::allocator<UapkiNS::Pkcs7::RecipientEncryptedKey>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Pkcs7::RecipientEncryptedKey, std::allocator<UapkiNS::Pkcs7::RecipientEncryptedKey>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Pkcs7::RecipientEncryptedKey, std::allocator<UapkiNS::Pkcs7::RecipientEncryptedKey>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Pkcs7::RecipientEncryptedKey, std::allocator<UapkiNS::Pkcs7::RecipientEncryptedKey>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%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.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%"struct.UapkiNS::Pkcs7::RecipientEncryptedKey" = type { ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

declare i32 @asn_encode_ba(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @get_KeyAgreeRecipientIdentifier_desc() #1

declare i32 @asn_INTEGER2long(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfo5parseERK21KeyAgreeRecipientInfo(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(296) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %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 i64, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %18

18:                                               ; preds = %2
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %19, i32 0, i32 0
  %21 = call i32 @asn_INTEGER2long(ptr noundef %20, ptr noundef %8)
  store i32 %21, ptr %6, align 4, !tbaa !9
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %18
  %25 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 837, i32 noundef %25)
  br label %194

26:                                               ; preds = %18
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = load i64, ptr %8, align 8, !tbaa !11
  %30 = trunc i64 %29 to i32
  %31 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 0
  store i32 %30, ptr %31, align 8, !tbaa !13
  %32 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !13
  %34 = icmp ne i32 %33, 3
  br i1 %34, label %35, label %40

35:                                               ; preds = %28
  br label %36

36:                                               ; preds = %35
  store i32 4146, ptr %6, align 4, !tbaa !9
  %37 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 840, i32 noundef %37, ptr noundef null)
  br label %194

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39, %28
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %41, i32 0, i32 1
  %43 = getelementptr inbounds %struct.OriginatorIdentifierOrKey, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !23
  %45 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 1
  store i32 %44, ptr %45, align 4, !tbaa !32
  br label %46

46:                                               ; preds = %40
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %47, i32 0, i32 1
  %49 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 2
  %50 = call noundef i32 @_ZN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfo15parseOriginatorERK25OriginatorIdentifierOrKeyPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(152) %48, ptr noundef %49)
  store i32 %50, ptr %6, align 4, !tbaa !9
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %46
  %54 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 845, i32 noundef %54)
  br label %194

55:                                               ; preds = %46
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !33
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %76

62:                                               ; preds = %57
  br label %63

63:                                               ; preds = %62
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !33
  %67 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 3
  %68 = call i32 @asn_OCTSTRING2ba(ptr noundef %66, ptr noundef %67)
  store i32 %68, ptr %6, align 4, !tbaa !9
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %63
  %72 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 849, i32 noundef %72)
  br label %194

73:                                               ; preds = %63
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %57
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %78, i32 0, i32 3
  %80 = getelementptr inbounds %struct.AlgorithmIdentifier, ptr %79, i32 0, i32 0
  %81 = call i32 @asn_oid_to_text(ptr noundef %80, ptr noundef %7)
  store i32 %81, ptr %6, align 4, !tbaa !9
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %86

84:                                               ; preds = %77
  %85 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 853, i32 noundef %85)
  br label %194

86:                                               ; preds = %77
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %89, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %90 unwind label %121

90:                                               ; preds = %88
  %91 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 4
  %92 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %91, i32 0, i32 0
  %93 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %92, ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %94, i32 0, i32 3
  %96 = getelementptr inbounds %struct.AlgorithmIdentifier, ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !34
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %131

99:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %100, i32 0, i32 3
  %102 = getelementptr inbounds %struct.AlgorithmIdentifier, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !34
  store ptr %103, ptr %13, align 8, !tbaa !5
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ANY, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !35
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ANY, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !37
  %110 = sext i32 %109 to i64
  %111 = call ptr @ba_alloc_from_uint8(ptr noundef %106, i64 noundef %110)
  %112 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 4
  %113 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %112, i32 0, i32 1
  store ptr %111, ptr %113, align 8, !tbaa !38
  %114 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 4
  %115 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !38
  %117 = icmp ne ptr %116, null
  br i1 %117, label %127, label %118

118:                                              ; preds = %99
  br label %119

119:                                              ; preds = %118
  store i32 4097, ptr %6, align 4, !tbaa !9
  %120 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 859, i32 noundef %120, ptr noundef null)
  store i32 4, ptr %14, align 4
  br label %128

121:                                              ; preds = %88
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %11, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %199

125:                                              ; No predecessors!
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126, %99
  store i32 0, ptr %14, align 4
  br label %128

128:                                              ; preds = %127, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %129 = load i32, ptr %14, align 4
  switch i32 %129, label %197 [
    i32 0, label %130
    i32 4, label %194
  ]

130:                                              ; preds = %128
  br label %131

131:                                              ; preds = %130, %90
  %132 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 5
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %133, i32 0, i32 4
  %135 = getelementptr inbounds %struct.RecipientEncryptedKeys, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct.anon.7, ptr %135, i32 0, i32 1
  %137 = load i32, ptr %136, align 8, !tbaa !39
  %138 = sext i32 %137 to i64
  call void @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %138)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %139

139:                                              ; preds = %188, %131
  %140 = load i64, ptr %15, align 8, !tbaa !11
  %141 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 5
  %142 = call noundef i64 @_ZNKSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %141) #5
  %143 = icmp ult i64 %140, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %139
  store i32 15, ptr %14, align 4
  br label %191

145:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.KeyAgreeRecipientInfo, ptr %146, i32 0, i32 4
  %148 = getelementptr inbounds %struct.RecipientEncryptedKeys, ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds %struct.anon.7, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !40
  %151 = load i64, ptr %15, align 8, !tbaa !11
  %152 = getelementptr inbounds ptr, ptr %150, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  store ptr %153, ptr %16, align 8, !tbaa !5
  br label %154

154:                                              ; preds = %145
  %155 = call ptr @get_KeyAgreeRecipientIdentifier_desc()
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.RecipientEncryptedKey, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 5
  %159 = load i64, ptr %15, align 8, !tbaa !11
  %160 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %159) #5
  %161 = getelementptr inbounds %"struct.UapkiNS::Pkcs7::RecipientEncryptedKey", ptr %160, i32 0, i32 0
  %162 = call i32 @asn_encode_ba(ptr noundef %155, ptr noundef %157, ptr noundef %161)
  store i32 %162, ptr %6, align 4, !tbaa !9
  %163 = load i32, ptr %6, align 4, !tbaa !9
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %167

165:                                              ; preds = %154
  %166 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 867, i32 noundef %166)
  store i32 4, ptr %14, align 4
  br label %185

167:                                              ; preds = %154
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %16, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.RecipientEncryptedKey, ptr %171, i32 0, i32 1
  %173 = getelementptr inbounds %"class.UapkiNS::Pkcs7::EnvelopedDataParser::KeyAgreeRecipientInfo", ptr %17, i32 0, i32 5
  %174 = load i64, ptr %15, align 8, !tbaa !11
  %175 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %174) #5
  %176 = getelementptr inbounds %"struct.UapkiNS::Pkcs7::RecipientEncryptedKey", ptr %175, i32 0, i32 1
  %177 = call i32 @asn_OCTSTRING2ba(ptr noundef %172, ptr noundef %176)
  store i32 %177, ptr %6, align 4, !tbaa !9
  %178 = load i32, ptr %6, align 4, !tbaa !9
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %182

180:                                              ; preds = %170
  %181 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 868, i32 noundef %181)
  store i32 4, ptr %14, align 4
  br label %185

182:                                              ; preds = %170
  br label %183

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183
  store i32 0, ptr %14, align 4
  br label %185

185:                                              ; preds = %184, %180, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %186 = load i32, ptr %14, align 4
  switch i32 %186, label %191 [
    i32 0, label %187
  ]

187:                                              ; preds = %185
  br label %188

188:                                              ; preds = %187
  %189 = load i64, ptr %15, align 8, !tbaa !11
  %190 = add i64 %189, 1
  store i64 %190, ptr %15, align 8, !tbaa !11
  br label %139, !llvm.loop !41

191:                                              ; preds = %185, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %192 = load i32, ptr %14, align 4
  switch i32 %192, label %197 [
    i32 15, label %193
    i32 4, label %194
  ]

193:                                              ; preds = %191
  br label %194

194:                                              ; preds = %193, %191, %128, %84, %71, %53, %36, %24
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %195) #5
  %196 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %196, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %197

197:                                              ; preds = %194, %191, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %198 = load i32, ptr %3, align 4
  ret i32 %198

199:                                              ; preds = %121
  %200 = load ptr, ptr %11, align 8
  %201 = load i32, ptr %12, align 4
  %202 = insertvalue { ptr, i32 } poison, ptr %200, 0
  %203 = insertvalue { ptr, i32 } %202, i32 %201, 1
  resume { ptr, i32 } %203
}

declare i32 @asn_oid_to_text(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare ptr @ba_alloc_from_uint8(ptr noundef, i64 noundef) #1

declare i32 @asn_OCTSTRING2ba(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfo15parseOriginatorERK25OriginatorIdentifierOrKeyPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfoE", !10, i64 0, !15, i64 4, !6, i64 8, !6, i64 16, !16, i64 24, !19, i64 64}
!15 = !{!"_ZTS28OriginatorIdentifierOrKey_PR", !7, i64 0}
!16 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !17, i64 0, !6, i64 32}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !12, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"_ZTSSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!24, !15, i64 16}
!24 = !{!"_ZTS21KeyAgreeRecipientInfo", !25, i64 0, !26, i64 16, !6, i64 168, !29, i64 176, !30, i64 224, !27, i64 272}
!25 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!26 = !{!"_ZTS25OriginatorIdentifierOrKey", !15, i64 0, !7, i64 8, !27, i64 128}
!27 = !{!"_ZTS16asn_struct_ctx_s", !28, i64 0, !28, i64 2, !10, i64 4, !6, i64 8, !12, i64 16}
!28 = !{!"short", !7, i64 0}
!29 = !{!"_ZTS19AlgorithmIdentifier", !25, i64 0, !6, i64 16, !27, i64 24}
!30 = !{!"_ZTS22RecipientEncryptedKeys", !31, i64 0, !27, i64 24}
!31 = !{!"_ZTSN22RecipientEncryptedKeysUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!32 = !{!14, !15, i64 4}
!33 = !{!24, !6, i64 168}
!34 = !{!24, !6, i64 192}
!35 = !{!36, !6, i64 0}
!36 = !{!"_ZTS3ANY", !6, i64 0, !10, i64 8, !27, i64 16}
!37 = !{!36, !10, i64 8}
!38 = !{!14, !6, i64 56}
!39 = !{!24, !10, i64 232}
!40 = !{!24, !6, i64 224}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__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.std::allocator" = type { i8 }

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

declare i32 @asn_encode_ba(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @get_KeyAgreeRecipientIdentifier_desc() local_unnamed_addr #1

declare i32 @asn_INTEGER2long(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfo5parseERK21KeyAgreeRecipientInfo(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(296) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %4, align 8, !tbaa !9
  %7 = call i32 @asn_INTEGER2long(ptr noundef nonnull %1, ptr noundef nonnull %4)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %9, label %8

8:                                                ; preds = %2
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 837, i32 noundef %7)
  br label %.thread68

9:                                                ; preds = %2
  %10 = load i64, ptr %4, align 8, !tbaa !9
  %11 = trunc i64 %10 to i32
  store i32 %11, ptr %0, align 8, !tbaa !11
  %.not55 = icmp eq i32 %11, 3
  br i1 %.not55, label %13, label %12

12:                                               ; preds = %9
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 840, i32 noundef 4146, ptr noundef null)
  br label %.thread68

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  %15 = load i32, ptr %14, align 8, !tbaa !22
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %15, ptr %16, align 4, !tbaa !31
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = call noundef i32 @_ZN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfo15parseOriginatorERK25OriginatorIdentifierOrKeyPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(152) %14, ptr noundef nonnull %17)
  %.not56 = icmp eq i32 %18, 0
  br i1 %.not56, label %20, label %19

19:                                               ; preds = %13
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 845, i32 noundef %18)
  br label %.thread68

20:                                               ; preds = %13
  %21 = getelementptr inbounds i8, ptr %1, i64 168
  %22 = load ptr, ptr %21, align 8, !tbaa !32
  %.not57 = icmp eq ptr %22, null
  br i1 %.not57, label %27, label %23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = call i32 @asn_OCTSTRING2ba(ptr noundef nonnull %22, ptr noundef nonnull %24)
  %.not58 = icmp eq i32 %25, 0
  br i1 %.not58, label %27, label %26

26:                                               ; preds = %23
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 849, i32 noundef %25)
  br label %.thread68

27:                                               ; preds = %20, %23
  %28 = getelementptr inbounds i8, ptr %1, i64 176
  %29 = call i32 @asn_oid_to_text(ptr noundef nonnull %28, ptr noundef nonnull %3)
  %.not59 = icmp eq i32 %29, 0
  br i1 %.not59, label %31, label %30

30:                                               ; preds = %27
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 853, i32 noundef %29)
  br label %.thread68

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %32, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %33 unwind label %45

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %0, i64 24
  %35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  %36 = getelementptr inbounds i8, ptr %1, i64 192
  %37 = load ptr, ptr %36, align 8, !tbaa !33
  %.not60 = icmp eq ptr %37, null
  br i1 %.not60, label %.thread, label %38

38:                                               ; preds = %33
  %39 = load ptr, ptr %37, align 8, !tbaa !34
  %40 = getelementptr inbounds i8, ptr %37, i64 8
  %41 = load i32, ptr %40, align 8, !tbaa !36
  %42 = sext i32 %41 to i64
  %43 = call ptr @ba_alloc_from_uint8(ptr noundef %39, i64 noundef %42)
  %44 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %43, ptr %44, align 8, !tbaa !37
  %.not61 = icmp eq ptr %43, null
  br i1 %.not61, label %47, label %.thread

45:                                               ; preds = %31
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %46

47:                                               ; preds = %38
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 859, i32 noundef 4097, ptr noundef null)
  br label %.thread68

.thread:                                          ; preds = %38, %33
  %48 = getelementptr inbounds i8, ptr %0, i64 64
  %49 = getelementptr inbounds i8, ptr %1, i64 224
  %50 = getelementptr inbounds i8, ptr %1, i64 232
  %51 = load i32, ptr %50, align 8, !tbaa !38
  %52 = sext i32 %51 to i64
  call void @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %52)
  %53 = call noundef i64 @_ZNKSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  %.not74 = icmp eq i64 %53, 0
  br i1 %.not74, label %.thread68, label %.lr.ph

54:                                               ; preds = %65
  %55 = add nuw i64 %.04073, 1
  %56 = call noundef i64 @_ZNKSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %.lr.ph, label %.thread68, !llvm.loop !39

.lr.ph:                                           ; preds = %.thread, %54
  %.04073 = phi i64 [ %55, %54 ], [ 0, %.thread ]
  %58 = load ptr, ptr %49, align 8, !tbaa !41
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.04073
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = call ptr @get_KeyAgreeRecipientIdentifier_desc()
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %.04073) #5
  %63 = call i32 @asn_encode_ba(ptr noundef %61, ptr noundef %60, ptr noundef nonnull %62)
  %.not62 = icmp eq i32 %63, 0
  br i1 %.not62, label %65, label %64

64:                                               ; preds = %.lr.ph
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 867, i32 noundef %63)
  br label %.thread68

65:                                               ; preds = %.lr.ph
  %66 = getelementptr inbounds i8, ptr %60, i64 152
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %.04073) #5
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = call i32 @asn_OCTSTRING2ba(ptr noundef nonnull %66, ptr noundef nonnull %68)
  %.not63 = icmp eq i32 %69, 0
  br i1 %.not63, label %54, label %70

70:                                               ; preds = %65
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 868, i32 noundef %69)
  br label %.thread68

.thread68:                                        ; preds = %54, %.thread, %70, %64, %47, %30, %26, %19, %12, %8
  %.5 = phi i32 [ %7, %8 ], [ 4146, %12 ], [ %18, %19 ], [ %25, %26 ], [ %29, %30 ], [ 4097, %47 ], [ %69, %70 ], [ %63, %64 ], [ 0, %.thread ], [ 0, %54 ]
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %71) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 %.5
}

declare i32 @asn_oid_to_text(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare ptr @ba_alloc_from_uint8(ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @asn_OCTSTRING2ba(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfo15parseOriginatorERK25OriginatorIdentifierOrKeyPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN7UapkiNS5Pkcs719EnvelopedDataParser21KeyAgreeRecipientInfoE", !13, i64 0, !14, i64 4, !6, i64 8, !6, i64 16, !15, i64 24, !18, i64 64}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS28OriginatorIdentifierOrKey_PR", !7, i64 0}
!15 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !16, i64 0, !6, i64 32}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !10, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"_ZTSSt6vectorIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS5Pkcs721RecipientEncryptedKeyESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!23, !14, i64 16}
!23 = !{!"_ZTS21KeyAgreeRecipientInfo", !24, i64 0, !25, i64 16, !6, i64 168, !28, i64 176, !29, i64 224, !26, i64 272}
!24 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !13, i64 8}
!25 = !{!"_ZTS25OriginatorIdentifierOrKey", !14, i64 0, !7, i64 8, !26, i64 128}
!26 = !{!"_ZTS16asn_struct_ctx_s", !27, i64 0, !27, i64 2, !13, i64 4, !6, i64 8, !10, i64 16}
!27 = !{!"short", !7, i64 0}
!28 = !{!"_ZTS19AlgorithmIdentifier", !24, i64 0, !6, i64 16, !26, i64 24}
!29 = !{!"_ZTS22RecipientEncryptedKeys", !30, i64 0, !26, i64 24}
!30 = !{!"_ZTSN22RecipientEncryptedKeysUt_E", !6, i64 0, !13, i64 8, !13, i64 12, !6, i64 16}
!31 = !{!12, !14, i64 4}
!32 = !{!23, !6, i64 168}
!33 = !{!23, !6, i64 192}
!34 = !{!35, !6, i64 0}
!35 = !{!"_ZTS3ANY", !6, i64 0, !13, i64 8, !26, i64 16}
!36 = !{!35, !13, i64 8}
!37 = !{!12, !6, i64 56}
!38 = !{!23, !13, i64 232}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!23, !6, i64 224}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass