; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (signeddata-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"

%struct.ContentInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.ANY, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%"class.UapkiNS::Pkcs7::SignedDataParser" = type { ptr, i32, %"class.std::vector.20", %"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo", %"class.UapkiNS::VectorBA", %"class.UapkiNS::VectorBA", i64 }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Pkcs7::EncapsulatedContentInfo" = type { %"class.std::__cxx11::basic_string", ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.UapkiNS::VectorBA" = type { %"class.std::vector.25" }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl" }
%"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ByteArray_st *, std::allocator<ByteArray_st *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.SignedData = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.DigestAlgorithmIdentifiers, %struct.EncapsulatedContentInfo, ptr, ptr, %struct.SignerInfos, %struct.asn_struct_ctx_s }
%struct.DigestAlgorithmIdentifiers = type { %struct.anon, %struct.asn_struct_ctx_s }
%struct.anon = type { ptr, i32, i32, ptr }
%struct.EncapsulatedContentInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.SignerInfos = type { %struct.anon.3, %struct.asn_struct_ctx_s }
%struct.anon.3 = type { ptr, i32, i32, ptr }
%struct.CertificateSet = type { %struct.anon.30, %struct.asn_struct_ctx_s }
%struct.anon.30 = type { ptr, i32, i32, ptr }
%struct.RevocationInfoChoices = type { %struct.anon.31, %struct.asn_struct_ctx_s }
%struct.anon.31 = type { ptr, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [34 x i8], align 1
@OID_PKCS7_SIGNED_DATA = external global ptr, align 8

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

declare ptr @get_SignedData_desc() #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

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

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

declare ptr @get_CertificateChoices_desc() #0

declare ptr @get_RevocationInfoChoice_desc() #0

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

declare ptr @get_ContentInfo_desc() #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser5parseEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1) #2 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 i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %15

15:                                               ; preds = %2
  %16 = call ptr @get_ContentInfo_desc()
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call ptr @asn_decode_ba_with_alloc(ptr noundef %16, ptr noundef %17)
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = icmp eq ptr null, %18
  br i1 %19, label %20, label %22

20:                                               ; preds = %15
  store i32 2, ptr %6, align 4, !tbaa !9
  %21 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 583, i32 noundef %21)
  br label %251

22:                                               ; preds = %15
  br label %23

23:                                               ; preds = %22
  br label %24

24:                                               ; preds = %23
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.ContentInfo, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr @OID_PKCS7_SIGNED_DATA, align 8, !tbaa !5
  %28 = call zeroext i1 @OID_is_equal_oid(ptr noundef %26, ptr noundef %27)
  br i1 %28, label %34, label %29

29:                                               ; preds = %24
  br label %30

30:                                               ; preds = %29
  store i32 4144, ptr %6, align 4, !tbaa !9
  %31 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 586, i32 noundef %31, ptr noundef null)
  br label %251

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33, %24
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ContentInfo, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.ANY, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %46

40:                                               ; preds = %34
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ContentInfo, ptr %41, i32 0, i32 1
  %43 = getelementptr inbounds %struct.ANY, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 8, !tbaa !19
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %51, label %46

46:                                               ; preds = %40, %34
  br label %47

47:                                               ; preds = %46
  store i32 4144, ptr %6, align 4, !tbaa !9
  %48 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 590, i32 noundef %48, ptr noundef null)
  br label %251

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50, %40
  br label %52

52:                                               ; preds = %51
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ContentInfo, ptr %53, i32 0, i32 1
  %55 = call ptr @get_SignedData_desc()
  %56 = call ptr @asn_any2type(ptr noundef %54, ptr noundef %55)
  %57 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  store ptr %56, ptr %57, align 8, !tbaa !20
  %58 = icmp eq ptr null, %56
  br i1 %58, label %59, label %61

59:                                               ; preds = %52
  store i32 2, ptr %6, align 4, !tbaa !9
  %60 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 593, i32 noundef %60)
  br label %251

61:                                               ; preds = %52
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = getelementptr inbounds %struct.SignedData, ptr %66, i32 0, i32 0
  %68 = call i32 @asn_INTEGER2long(ptr noundef %67, ptr noundef %8)
  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 = %64
  %72 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 596, i32 noundef %72)
  br label %251

73:                                               ; preds = %64
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load i64, ptr %8, align 8, !tbaa !11
  %77 = trunc i64 %76 to i32
  %78 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 1
  store i32 %77, ptr %78, align 8, !tbaa !34
  %79 = load i64, ptr %8, align 8, !tbaa !11
  %80 = icmp slt i64 %79, 1
  br i1 %80, label %87, label %81

81:                                               ; preds = %75
  %82 = load i64, ptr %8, align 8, !tbaa !11
  %83 = icmp sgt i64 %82, 5
  br i1 %83, label %87, label %84

84:                                               ; preds = %81
  %85 = load i64, ptr %8, align 8, !tbaa !11
  %86 = icmp eq i64 %85, 2
  br i1 %86, label %87, label %92

87:                                               ; preds = %84, %81, %75
  br label %88

88:                                               ; preds = %87
  store i32 4146, ptr %6, align 4, !tbaa !9
  %89 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 599, i32 noundef %89, ptr noundef null)
  br label %251

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91, %84
  br label %93

93:                                               ; preds = %92
  %94 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = getelementptr inbounds %struct.SignedData, ptr %95, i32 0, i32 1
  %97 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 2
  %98 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser22decodeDigestAlgorithmsERK26DigestAlgorithmIdentifiersRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE(ptr noundef nonnull align 8 dereferenceable(48) %96, ptr noundef nonnull align 8 dereferenceable(24) %97)
  store i32 %98, ptr %6, align 4, !tbaa !9
  %99 = load i32, ptr %6, align 4, !tbaa !9
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %93
  %102 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 603, i32 noundef %102)
  br label %251

103:                                              ; preds = %93
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !20
  %109 = getelementptr inbounds %struct.SignedData, ptr %108, i32 0, i32 2
  %110 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 3
  %111 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser22decodeEncapContentInfoERK23EncapsulatedContentInfoRNS0_23EncapsulatedContentInfoE(ptr noundef nonnull align 8 dereferenceable(48) %109, ptr noundef nonnull align 8 dereferenceable(40) %110)
  store i32 %111, ptr %6, align 4, !tbaa !9
  %112 = load i32, ptr %6, align 4, !tbaa !9
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %106
  %115 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 606, i32 noundef %115)
  br label %251

116:                                              ; preds = %106
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  %119 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !20
  %121 = getelementptr inbounds %struct.SignedData, ptr %120, i32 0, i32 3
  %122 = load ptr, ptr %121, align 8, !tbaa !35
  %123 = icmp ne ptr %122, null
  br i1 %123, label %124, label %180

124:                                              ; preds = %118
  %125 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !20
  %127 = getelementptr inbounds %struct.SignedData, ptr %126, i32 0, i32 3
  %128 = load ptr, ptr %127, align 8, !tbaa !35
  %129 = getelementptr inbounds %struct.CertificateSet, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.anon.30, ptr %129, i32 0, i32 1
  %131 = load i32, ptr %130, align 8, !tbaa !42
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %133, label %180

133:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %134 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !20
  %136 = getelementptr inbounds %struct.SignedData, ptr %135, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !35
  store ptr %137, ptr %9, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 4
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.CertificateSet, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %struct.anon.30, ptr %140, i32 0, i32 1
  %142 = load i32, ptr %141, align 8, !tbaa !42
  %143 = sext i32 %142 to i64
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %143)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %144

144:                                              ; preds = %171, %133
  %145 = load i64, ptr %10, align 8, !tbaa !11
  %146 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 4
  %147 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %146) #4
  %148 = icmp ult i64 %145, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %144
  store i32 19, ptr %11, align 4
  br label %174

150:                                              ; preds = %144
  br label %151

151:                                              ; preds = %150
  %152 = call ptr @get_CertificateChoices_desc()
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.CertificateSet, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds %struct.anon.30, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !45
  %157 = load i64, ptr %10, align 8, !tbaa !11
  %158 = getelementptr inbounds ptr, ptr %156, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !5
  %160 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 4
  %161 = load i64, ptr %10, align 8, !tbaa !11
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %161) #4
  %163 = call i32 @asn_encode_ba(ptr noundef %152, ptr noundef %159, ptr noundef %162)
  store i32 %163, ptr %6, align 4, !tbaa !9
  %164 = load i32, ptr %6, align 4, !tbaa !9
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %168

166:                                              ; preds = %151
  %167 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 613, i32 noundef %167)
  store i32 4, ptr %11, align 4
  br label %174

168:                                              ; preds = %151
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170
  %172 = load i64, ptr %10, align 8, !tbaa !11
  %173 = add i64 %172, 1
  store i64 %173, ptr %10, align 8, !tbaa !11
  br label %144, !llvm.loop !46

174:                                              ; preds = %166, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %175 = load i32, ptr %11, align 4
  switch i32 %175, label %177 [
    i32 19, label %176
  ]

176:                                              ; preds = %174
  store i32 0, ptr %11, align 4
  br label %177

177:                                              ; preds = %176, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %178 = load i32, ptr %11, align 4
  switch i32 %178, label %255 [
    i32 0, label %179
    i32 4, label %251
  ]

179:                                              ; preds = %177
  br label %180

180:                                              ; preds = %179, %124, %118
  %181 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !20
  %183 = getelementptr inbounds %struct.SignedData, ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !48
  %185 = icmp ne ptr %184, null
  br i1 %185, label %186, label %242

186:                                              ; preds = %180
  %187 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !20
  %189 = getelementptr inbounds %struct.SignedData, ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !48
  %191 = getelementptr inbounds %struct.RevocationInfoChoices, ptr %190, i32 0, i32 0
  %192 = getelementptr inbounds %struct.anon.31, ptr %191, i32 0, i32 1
  %193 = load i32, ptr %192, align 8, !tbaa !49
  %194 = icmp sgt i32 %193, 0
  br i1 %194, label %195, label %242

195:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %196 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !20
  %198 = getelementptr inbounds %struct.SignedData, ptr %197, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !48
  store ptr %199, ptr %12, align 8, !tbaa !5
  %200 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 5
  %201 = load ptr, ptr %12, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.RevocationInfoChoices, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds %struct.anon.31, ptr %202, i32 0, i32 1
  %204 = load i32, ptr %203, align 8, !tbaa !49
  %205 = sext i32 %204 to i64
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %200, i64 noundef %205)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !11
  br label %206

206:                                              ; preds = %233, %195
  %207 = load i64, ptr %13, align 8, !tbaa !11
  %208 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 5
  %209 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %208) #4
  %210 = icmp ult i64 %207, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %206
  store i32 24, ptr %11, align 4
  br label %236

212:                                              ; preds = %206
  br label %213

213:                                              ; preds = %212
  %214 = call ptr @get_RevocationInfoChoice_desc()
  %215 = load ptr, ptr %12, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.RevocationInfoChoices, ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds %struct.anon.31, ptr %216, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8, !tbaa !52
  %219 = load i64, ptr %13, align 8, !tbaa !11
  %220 = getelementptr inbounds ptr, ptr %218, i64 %219
  %221 = load ptr, ptr %220, align 8, !tbaa !5
  %222 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 5
  %223 = load i64, ptr %13, align 8, !tbaa !11
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %222, i64 noundef %223) #4
  %225 = call i32 @asn_encode_ba(ptr noundef %214, ptr noundef %221, ptr noundef %224)
  store i32 %225, ptr %6, align 4, !tbaa !9
  %226 = load i32, ptr %6, align 4, !tbaa !9
  %227 = icmp ne i32 %226, 0
  br i1 %227, label %228, label %230

228:                                              ; preds = %213
  %229 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 622, i32 noundef %229)
  store i32 4, ptr %11, align 4
  br label %236

230:                                              ; preds = %213
  br label %231

231:                                              ; preds = %230
  br label %232

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232
  %234 = load i64, ptr %13, align 8, !tbaa !11
  %235 = add i64 %234, 1
  store i64 %235, ptr %13, align 8, !tbaa !11
  br label %206, !llvm.loop !53

236:                                              ; preds = %228, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %237 = load i32, ptr %11, align 4
  switch i32 %237, label %239 [
    i32 24, label %238
  ]

238:                                              ; preds = %236
  store i32 0, ptr %11, align 4
  br label %239

239:                                              ; preds = %238, %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %240 = load i32, ptr %11, align 4
  switch i32 %240, label %255 [
    i32 0, label %241
    i32 4, label %251
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241, %186, %180
  %243 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !20
  %245 = getelementptr inbounds %struct.SignedData, ptr %244, i32 0, i32 5
  %246 = getelementptr inbounds %struct.SignerInfos, ptr %245, i32 0, i32 0
  %247 = getelementptr inbounds %struct.anon.3, ptr %246, i32 0, i32 1
  %248 = load i32, ptr %247, align 8, !tbaa !54
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser", ptr %14, i32 0, i32 6
  store i64 %249, ptr %250, align 8, !tbaa !55
  br label %251

251:                                              ; preds = %242, %239, %177, %114, %101, %88, %71, %59, %47, %30, %20
  %252 = call ptr @get_ContentInfo_desc()
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  call void @asn_free(ptr noundef %252, ptr noundef %253)
  %254 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %254, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %255

255:                                              ; preds = %251, %239, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %256 = load i32, ptr %3, align 4
  ret i32 %256
}

declare zeroext i1 @OID_is_equal_oid(ptr noundef, ptr noundef) #0

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

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

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

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

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

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

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

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 = { 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 }

!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, !6, i64 16}
!14 = !{!"_ZTS11ContentInfo", !15, i64 0, !16, i64 16, !17, i64 56}
!15 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!16 = !{!"_ZTS3ANY", !6, i64 0, !10, i64 8, !17, i64 16}
!17 = !{!"_ZTS16asn_struct_ctx_s", !18, i64 0, !18, i64 2, !10, i64 4, !6, i64 8, !12, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!14, !10, i64 24}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParserE", !6, i64 0, !10, i64 8, !22, i64 16, !26, i64 40, !29, i64 80, !29, i64 104, !12, i64 128}
!22 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN7UapkiNS5Pkcs723EncapsulatedContentInfoE", !27, i64 0, !6, i64 32}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !28, i64 0, !12, i64 8, !7, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!29 = !{!"_ZTSN7UapkiNS8VectorBAE", !30, i64 0}
!30 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!21, !10, i64 8}
!35 = !{!36, !6, i64 112}
!36 = !{!"_ZTS10SignedData", !15, i64 0, !37, i64 16, !39, i64 64, !6, i64 112, !6, i64 120, !40, i64 128, !17, i64 176}
!37 = !{!"_ZTS26DigestAlgorithmIdentifiers", !38, i64 0, !17, i64 24}
!38 = !{!"_ZTSN26DigestAlgorithmIdentifiersUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!39 = !{!"_ZTS23EncapsulatedContentInfo", !15, i64 0, !6, i64 16, !17, i64 24}
!40 = !{!"_ZTS11SignerInfos", !41, i64 0, !17, i64 24}
!41 = !{!"_ZTSN11SignerInfosUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!42 = !{!43, !10, i64 8}
!43 = !{!"_ZTS14CertificateSet", !44, i64 0, !17, i64 24}
!44 = !{!"_ZTSN14CertificateSetUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!45 = !{!43, !6, i64 0}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}
!48 = !{!36, !6, i64 120}
!49 = !{!50, !10, i64 8}
!50 = !{!"_ZTS21RevocationInfoChoices", !51, i64 0, !17, i64 24}
!51 = !{!"_ZTSN21RevocationInfoChoicesUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!52 = !{!50, !6, i64 0}
!53 = distinct !{!53, !47}
!54 = !{!36, !10, i64 136}
!55 = !{!21, !12, i64 128}


; 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 [34 x i8], align 1
@OID_PKCS7_SIGNED_DATA = external local_unnamed_addr global ptr, align 8

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

declare ptr @get_SignedData_desc() local_unnamed_addr #0

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

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

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

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

declare ptr @get_CertificateChoices_desc() local_unnamed_addr #0

declare ptr @get_RevocationInfoChoice_desc() local_unnamed_addr #0

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

declare ptr @get_ContentInfo_desc() local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser5parseEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store i64 0, ptr %3, align 8, !tbaa !5
  %4 = tail call ptr @get_ContentInfo_desc()
  %5 = tail call ptr @asn_decode_ba_with_alloc(ptr noundef %4, ptr noundef %1)
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %2
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 583, i32 noundef 2)
  br label %94

8:                                                ; preds = %2
  %9 = load ptr, ptr @OID_PKCS7_SIGNED_DATA, align 8, !tbaa !9
  %10 = tail call zeroext i1 @OID_is_equal_oid(ptr noundef nonnull %5, ptr noundef %9)
  br i1 %10, label %12, label %11

11:                                               ; preds = %8
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 586, i32 noundef 4144, ptr noundef null)
  br label %94

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %5, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %18, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %5, i64 24
  %17 = load i32, ptr %16, align 8, !tbaa !18
  %.not63 = icmp eq i32 %17, 0
  br i1 %.not63, label %18, label %19

18:                                               ; preds = %12, %15
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 590, i32 noundef 4144, ptr noundef null)
  br label %94

19:                                               ; preds = %15
  %20 = tail call ptr @get_SignedData_desc()
  %21 = tail call ptr @asn_any2type(ptr noundef nonnull %13, ptr noundef %20)
  store ptr %21, ptr %0, align 8, !tbaa !19
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %19
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 593, i32 noundef 2)
  br label %94

24:                                               ; preds = %19
  %25 = call i32 @asn_INTEGER2long(ptr noundef nonnull %21, ptr noundef nonnull %3)
  %.not64 = icmp eq i32 %25, 0
  br i1 %.not64, label %27, label %26

26:                                               ; preds = %24
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 596, i32 noundef %25)
  br label %94

27:                                               ; preds = %24
  %28 = load i64, ptr %3, align 8
  %29 = trunc i64 %28 to i32
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %29, ptr %30, align 8, !tbaa !33
  %31 = add i64 %28, -6
  %or.cond = icmp ult i64 %31, -5
  %32 = icmp eq i64 %28, 2
  %or.cond4 = or i1 %32, %or.cond
  br i1 %or.cond4, label %33, label %34

33:                                               ; preds = %27
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 599, i32 noundef 4146, ptr noundef null)
  br label %94

34:                                               ; preds = %27
  %35 = load ptr, ptr %0, align 8, !tbaa !19
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %37 = getelementptr inbounds i8, ptr %0, i64 16
  %38 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser22decodeDigestAlgorithmsERK26DigestAlgorithmIdentifiersRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EE(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(24) %37)
  %.not65 = icmp eq i32 %38, 0
  br i1 %.not65, label %40, label %39

39:                                               ; preds = %34
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 603, i32 noundef %38)
  br label %94

40:                                               ; preds = %34
  %41 = load ptr, ptr %0, align 8, !tbaa !19
  %42 = getelementptr inbounds i8, ptr %41, i64 64
  %43 = getelementptr inbounds i8, ptr %0, i64 40
  %44 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser22decodeEncapContentInfoERK23EncapsulatedContentInfoRNS0_23EncapsulatedContentInfoE(ptr noundef nonnull align 8 dereferenceable(48) %42, ptr noundef nonnull align 8 dereferenceable(40) %43)
  %.not66 = icmp eq i32 %44, 0
  br i1 %.not66, label %46, label %45

45:                                               ; preds = %40
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 606, i32 noundef %44)
  br label %94

46:                                               ; preds = %40
  %47 = load ptr, ptr %0, align 8, !tbaa !19
  %48 = getelementptr inbounds i8, ptr %47, i64 112
  %49 = load ptr, ptr %48, align 8, !tbaa !34
  %.not67 = icmp eq ptr %49, null
  br i1 %.not67, label %.thread, label %50

50:                                               ; preds = %46
  %51 = getelementptr inbounds i8, ptr %49, i64 8
  %52 = load i32, ptr %51, align 8, !tbaa !41
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %54, label %.thread

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %0, i64 80
  %56 = zext nneg i32 %52 to i64
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56)
  %57 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #4
  %.not6985.not = icmp eq i64 %57, 0
  br i1 %.not6985.not, label %.thread, label %.lr.ph

58:                                               ; preds = %.lr.ph
  %59 = add nuw i64 %.04686, 1
  %60 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #4
  %.not69 = icmp ult i64 %59, %60
  br i1 %.not69, label %.lr.ph, label %.thread, !llvm.loop !44

.lr.ph:                                           ; preds = %54, %58
  %.04686 = phi i64 [ %59, %58 ], [ 0, %54 ]
  %61 = call ptr @get_CertificateChoices_desc()
  %62 = load ptr, ptr %49, align 8, !tbaa !46
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.04686
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %.04686) #4
  %66 = call i32 @asn_encode_ba(ptr noundef %61, ptr noundef %64, ptr noundef nonnull %65)
  %.not68 = icmp eq i32 %66, 0
  br i1 %.not68, label %58, label %67

67:                                               ; preds = %.lr.ph
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 613, i32 noundef %66)
  br label %94

.thread:                                          ; preds = %58, %54, %50, %46
  %68 = load ptr, ptr %0, align 8, !tbaa !19
  %69 = getelementptr inbounds i8, ptr %68, i64 120
  %70 = load ptr, ptr %69, align 8, !tbaa !47
  %.not70 = icmp eq ptr %70, null
  br i1 %.not70, label %.thread80, label %71

71:                                               ; preds = %.thread
  %72 = getelementptr inbounds i8, ptr %70, i64 8
  %73 = load i32, ptr %72, align 8, !tbaa !48
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %75, label %.thread80

75:                                               ; preds = %71
  %76 = getelementptr inbounds i8, ptr %0, i64 104
  %77 = zext nneg i32 %73 to i64
  call void @_ZNSt6vectorIP12ByteArray_stSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %77)
  %78 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #4
  %.not7287.not = icmp eq i64 %78, 0
  br i1 %.not7287.not, label %.thread80, label %.lr.ph89

79:                                               ; preds = %.lr.ph89
  %80 = add nuw i64 %.088, 1
  %81 = call noundef i64 @_ZNKSt6vectorIP12ByteArray_stSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #4
  %.not72 = icmp ult i64 %80, %81
  br i1 %.not72, label %.lr.ph89, label %.thread80, !llvm.loop !51

.lr.ph89:                                         ; preds = %75, %79
  %.088 = phi i64 [ %80, %79 ], [ 0, %75 ]
  %82 = call ptr @get_RevocationInfoChoice_desc()
  %83 = load ptr, ptr %70, align 8, !tbaa !52
  %84 = getelementptr inbounds ptr, ptr %83, i64 %.088
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %.088) #4
  %87 = call i32 @asn_encode_ba(ptr noundef %82, ptr noundef %85, ptr noundef nonnull %86)
  %.not71 = icmp eq i32 %87, 0
  br i1 %.not71, label %79, label %88

88:                                               ; preds = %.lr.ph89
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 622, i32 noundef %87)
  br label %94

.thread80:                                        ; preds = %79, %75, %71, %.thread
  %89 = load ptr, ptr %0, align 8, !tbaa !19
  %90 = getelementptr inbounds i8, ptr %89, i64 136
  %91 = load i32, ptr %90, align 8, !tbaa !53
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %92, ptr %93, align 8, !tbaa !54
  br label %94

94:                                               ; preds = %88, %67, %.thread80, %45, %39, %33, %26, %23, %18, %11, %7
  %.6 = phi i32 [ 2, %7 ], [ 2, %23 ], [ %25, %26 ], [ 4146, %33 ], [ %38, %39 ], [ %44, %45 ], [ %66, %67 ], [ %87, %88 ], [ 0, %.thread80 ], [ 4144, %18 ], [ 4144, %11 ]
  %95 = call ptr @get_ContentInfo_desc()
  call void @asn_free(ptr noundef %95, ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 %.6
}

declare zeroext i1 @OID_is_equal_oid(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP12ByteArray_stSaIS1_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 @_ZNKSt6vectorIP12ByteArray_stSaIS1_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(8) ptr @_ZNSt6vectorIP12ByteArray_stSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTS11ContentInfo", !13, i64 0, !15, i64 16, !16, i64 56}
!13 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !10, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS3ANY", !10, i64 0, !14, i64 8, !16, i64 16}
!16 = !{!"_ZTS16asn_struct_ctx_s", !17, i64 0, !17, i64 2, !14, i64 4, !10, i64 8, !6, i64 16}
!17 = !{!"short", !7, i64 0}
!18 = !{!12, !14, i64 24}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParserE", !10, i64 0, !14, i64 8, !21, i64 16, !25, i64 40, !28, i64 80, !28, i64 104, !6, i64 128}
!21 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!25 = !{!"_ZTSN7UapkiNS5Pkcs723EncapsulatedContentInfoE", !26, i64 0, !10, i64 32}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !27, i64 0, !6, i64 8, !7, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!28 = !{!"_ZTSN7UapkiNS8VectorBAE", !29, i64 0}
!29 = !{!"_ZTSSt6vectorIP12ByteArray_stSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIP12ByteArray_stSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP12ByteArray_stSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!33 = !{!20, !14, i64 8}
!34 = !{!35, !10, i64 112}
!35 = !{!"_ZTS10SignedData", !13, i64 0, !36, i64 16, !38, i64 64, !10, i64 112, !10, i64 120, !39, i64 128, !16, i64 176}
!36 = !{!"_ZTS26DigestAlgorithmIdentifiers", !37, i64 0, !16, i64 24}
!37 = !{!"_ZTSN26DigestAlgorithmIdentifiersUt_E", !10, i64 0, !14, i64 8, !14, i64 12, !10, i64 16}
!38 = !{!"_ZTS23EncapsulatedContentInfo", !13, i64 0, !10, i64 16, !16, i64 24}
!39 = !{!"_ZTS11SignerInfos", !40, i64 0, !16, i64 24}
!40 = !{!"_ZTSN11SignerInfosUt_E", !10, i64 0, !14, i64 8, !14, i64 12, !10, i64 16}
!41 = !{!42, !14, i64 8}
!42 = !{!"_ZTS14CertificateSet", !43, i64 0, !16, i64 24}
!43 = !{!"_ZTSN14CertificateSetUt_E", !10, i64 0, !14, i64 8, !14, i64 12, !10, i64 16}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!42, !10, i64 0}
!47 = !{!35, !10, i64 120}
!48 = !{!49, !14, i64 8}
!49 = !{!"_ZTS21RevocationInfoChoices", !50, i64 0, !16, i64 24}
!50 = !{!"_ZTSN21RevocationInfoChoicesUt_E", !10, i64 0, !14, i64 8, !14, i64 12, !10, i64 16}
!51 = distinct !{!51, !45}
!52 = !{!49, !10, i64 0}
!53 = !{!35, !14, i64 136}
!54 = !{!20, !6, i64 128}


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