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

%"class.UapkiNS::SmartBA" = type { ptr }
%struct.SignerInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.ANY, %struct.AlgorithmIdentifier, %struct.ANY, %struct.AlgorithmIdentifier, %struct.OCTET_STRING, ptr, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.AlgorithmIdentifier = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo" = type { ptr, i32, i64, %"class.UapkiNS::SmartBA", %"struct.UapkiNS::AlgorithmIdentifier", %"class.std::vector.14", %"struct.UapkiNS::AlgorithmIdentifier", %"class.UapkiNS::SmartBA", %"class.std::vector.14", %"class.UapkiNS::SmartBA", %"struct.UapkiNS::Pkcs7::SignedDataParser::SignerInfo::MandatoryAttrs" }
%"struct.UapkiNS::AlgorithmIdentifier" = 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.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Attribute, std::allocator<UapkiNS::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Pkcs7::SignedDataParser::SignerInfo::MandatoryAttrs" = type { %"class.std::__cxx11::basic_string", %"class.UapkiNS::SmartBA" }

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

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

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) #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 @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) #0

declare ptr @get_Attributes_desc() #0

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

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

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

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

declare i32 @ba_set_byte(ptr noundef, i64 noundef, i8 noundef zeroext) #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo5parseEPK10SignerInfo(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1) #3 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 i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.UapkiNS::SmartBA", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  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 i64 0, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %2
  store i32 4101, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %326

18:                                               ; preds = %2
  br label %19

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

25:                                               ; preds = %19
  %26 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 711, i32 noundef %26)
  br label %320

27:                                               ; preds = %19
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load i64, ptr %7, align 8, !tbaa !11
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 1
  store i32 %31, ptr %32, align 8, !tbaa !13
  %33 = load i64, ptr %7, align 8, !tbaa !11
  %34 = icmp ne i64 %33, 1
  br i1 %34, label %35, label %43

35:                                               ; preds = %29
  %36 = load i64, ptr %7, align 8, !tbaa !11
  %37 = icmp ne i64 %36, 3
  br i1 %37, label %38, label %43

38:                                               ; preds = %35
  br label %39

39:                                               ; preds = %38
  store i32 4146, ptr %6, align 4, !tbaa !9
  %40 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 714, i32 noundef %40, ptr noundef null)
  br label %320

41:                                               ; No predecessors!
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42, %35, %29
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.SignerInfo, ptr %44, i32 0, i32 1
  %46 = getelementptr inbounds %struct.ANY, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !25
  %48 = icmp slt i32 %47, 7
  br i1 %48, label %49, label %54

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %49
  store i32 4145, ptr %6, align 4, !tbaa !9
  %51 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 719, i32 noundef %51, ptr noundef null)
  br label %320

52:                                               ; No predecessors!
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53, %43
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.SignerInfo, ptr %55, i32 0, i32 1
  %57 = getelementptr inbounds %struct.ANY, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !33
  %59 = getelementptr inbounds i8, ptr %58, i64 0
  %60 = load i8, ptr %59, align 1, !tbaa !34
  %61 = zext i8 %60 to i32
  %62 = icmp eq i32 %61, 48
  br i1 %62, label %63, label %65

63:                                               ; preds = %54
  %64 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 2
  store i64 1, ptr %64, align 8, !tbaa !35
  br label %84

65:                                               ; preds = %54
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.SignerInfo, ptr %66, i32 0, i32 1
  %68 = getelementptr inbounds %struct.ANY, ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 8, !tbaa !25
  %70 = icmp slt i32 %69, 18
  br i1 %70, label %77, label %71

71:                                               ; preds = %65
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.SignerInfo, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds %struct.ANY, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !25
  %76 = icmp sgt i32 %75, 66
  br i1 %76, label %77, label %82

77:                                               ; preds = %71, %65
  br label %78

78:                                               ; preds = %77
  store i32 4112, ptr %6, align 4, !tbaa !9
  %79 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 728, i32 noundef %79, ptr noundef null)
  br label %320

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81, %71
  %83 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 2
  store i64 2, ptr %83, align 8, !tbaa !35
  br label %84

84:                                               ; preds = %82, %63
  %85 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 3
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.SignerInfo, ptr %86, i32 0, i32 1
  %88 = getelementptr inbounds %struct.ANY, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !33
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.SignerInfo, ptr %90, i32 0, i32 1
  %92 = getelementptr inbounds %struct.ANY, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 8, !tbaa !25
  %94 = sext i32 %93 to i64
  %95 = call ptr @ba_alloc_from_uint8(ptr noundef %89, i64 noundef %94)
  %96 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef %95)
  br i1 %96, label %102, label %97

97:                                               ; preds = %84
  br label %98

98:                                               ; preds = %97
  store i32 4097, ptr %6, align 4, !tbaa !9
  %99 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 733, i32 noundef %99, ptr noundef null)
  br label %320

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101, %84
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.SignerInfo, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 4
  %107 = call noundef i32 @_ZN7UapkiNS4Util27algorithmIdentifierFromAsn1ERK19AlgorithmIdentifierRNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48) %105, ptr noundef nonnull align 8 dereferenceable(40) %106)
  store i32 %107, ptr %6, align 4, !tbaa !9
  %108 = load i32, ptr %6, align 4, !tbaa !9
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %103
  %111 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 737, i32 noundef %111)
  br label %320

112:                                              ; preds = %103
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.SignerInfo, ptr %115, i32 0, i32 3
  %117 = getelementptr inbounds %struct.ANY, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 8, !tbaa !36
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %129, label %120

120:                                              ; preds = %114
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.SignerInfo, ptr %121, i32 0, i32 3
  %123 = getelementptr inbounds %struct.ANY, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !37
  %125 = getelementptr inbounds i8, ptr %124, i64 0
  %126 = load i8, ptr %125, align 1, !tbaa !34
  %127 = zext i8 %126 to i32
  %128 = icmp ne i32 %127, 160
  br i1 %128, label %129, label %134

129:                                              ; preds = %120, %114
  br label %130

130:                                              ; preds = %129
  store i32 4145, ptr %6, align 4, !tbaa !9
  %131 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 741, i32 noundef %131, ptr noundef null)
  br label %320

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %120
  %135 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 9
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.SignerInfo, ptr %136, i32 0, i32 3
  %138 = getelementptr inbounds %struct.ANY, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !37
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.SignerInfo, ptr %140, i32 0, i32 3
  %142 = getelementptr inbounds %struct.ANY, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 8, !tbaa !36
  %144 = sext i32 %143 to i64
  %145 = call ptr @ba_alloc_from_uint8(ptr noundef %139, i64 noundef %144)
  %146 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef %145)
  br i1 %146, label %152, label %147

147:                                              ; preds = %134
  br label %148

148:                                              ; preds = %147
  store i32 4097, ptr %6, align 4, !tbaa !9
  %149 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 744, i32 noundef %149, ptr noundef null)
  br label %320

150:                                              ; No predecessors!
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151, %134
  br label %153

153:                                              ; preds = %152
  %154 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 9
  %155 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %154)
  %156 = call i32 @ba_set_byte(ptr noundef %155, i64 noundef 0, i8 noundef zeroext 49)
  store i32 %156, ptr %6, align 4, !tbaa !9
  %157 = load i32, ptr %6, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %161

159:                                              ; preds = %153
  %160 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 746, i32 noundef %160)
  br label %320

161:                                              ; preds = %153
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  %165 = call ptr @get_Attributes_desc()
  %166 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 9
  %167 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %166)
  %168 = call ptr @asn_decode_ba_with_alloc(ptr noundef %165, ptr noundef %167)
  store ptr %168, ptr %8, align 8, !tbaa !5
  %169 = icmp eq ptr null, %168
  br i1 %169, label %170, label %172

170:                                              ; preds = %164
  store i32 2, ptr %6, align 4, !tbaa !9
  %171 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 747, i32 noundef %171)
  br label %320

172:                                              ; preds = %164
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 5
  %178 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo16decodeAttributesERK10AttributesRSt6vectorINS_9AttributeESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(48) %176, ptr noundef nonnull align 8 dereferenceable(24) %177)
  store i32 %178, ptr %6, align 4, !tbaa !9
  %179 = load i32, ptr %6, align 4, !tbaa !9
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %183

181:                                              ; preds = %175
  %182 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 748, i32 noundef %182)
  br label %320

183:                                              ; preds = %175
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185
  %187 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo20decodeMandatoryAttrsEv(ptr noundef nonnull align 8 dereferenceable(216) %14)
  store i32 %187, ptr %6, align 4, !tbaa !9
  %188 = load i32, ptr %6, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %186
  %191 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 749, i32 noundef %191)
  br label %320

192:                                              ; preds = %186
  br label %193

193:                                              ; preds = %192
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.SignerInfo, ptr %196, i32 0, i32 4
  %198 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 6
  %199 = call noundef i32 @_ZN7UapkiNS4Util27algorithmIdentifierFromAsn1ERK19AlgorithmIdentifierRNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48) %197, ptr noundef nonnull align 8 dereferenceable(40) %198)
  store i32 %199, ptr %6, align 4, !tbaa !9
  %200 = load i32, ptr %6, align 4, !tbaa !9
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %204

202:                                              ; preds = %195
  %203 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 752, i32 noundef %203)
  br label %320

204:                                              ; preds = %195
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.SignerInfo, ptr %208, i32 0, i32 5
  %210 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 7
  %211 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %210)
  %212 = call i32 @asn_OCTSTRING2ba(ptr noundef %209, ptr noundef %211)
  store i32 %212, ptr %6, align 4, !tbaa !9
  %213 = load i32, ptr %6, align 4, !tbaa !9
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %215, label %217

215:                                              ; preds = %207
  %216 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 755, i32 noundef %216)
  br label %320

217:                                              ; preds = %207
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.SignerInfo, ptr %220, i32 0, i32 6
  %222 = load ptr, ptr %221, align 8, !tbaa !38
  %223 = icmp ne ptr %222, null
  br i1 %223, label %224, label %317

224:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.SignerInfo, ptr %225, i32 0, i32 6
  %227 = load ptr, ptr %226, align 8, !tbaa !38
  %228 = getelementptr inbounds %struct.ANY, ptr %227, i32 0, i32 1
  %229 = load i32, ptr %228, align 8, !tbaa !39
  %230 = icmp eq i32 %229, 0
  br i1 %230, label %241, label %231

231:                                              ; preds = %224
  %232 = load ptr, ptr %5, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.SignerInfo, ptr %232, i32 0, i32 6
  %234 = load ptr, ptr %233, align 8, !tbaa !38
  %235 = getelementptr inbounds %struct.ANY, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !40
  %237 = getelementptr inbounds i8, ptr %236, i64 0
  %238 = load i8, ptr %237, align 1, !tbaa !34
  %239 = zext i8 %238 to i32
  %240 = icmp ne i32 %239, 161
  br i1 %240, label %241, label %251

241:                                              ; preds = %231, %224
  br label %242

242:                                              ; preds = %241
  store i32 4145, ptr %6, align 4, !tbaa !9
  %243 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 761, i32 noundef %243, ptr noundef null)
          to label %244 unwind label %245

244:                                              ; preds = %242
  store i32 4, ptr %10, align 4
  br label %314

245:                                              ; preds = %308, %301, %295, %291, %289, %287, %281, %276, %274, %268, %264, %251, %242
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %12, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %13, align 4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  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
  br label %328

249:                                              ; No predecessors!
  br label %250

250:                                              ; preds = %249
  br label %251

251:                                              ; preds = %250, %231
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.SignerInfo, ptr %252, i32 0, i32 6
  %254 = load ptr, ptr %253, align 8, !tbaa !38
  %255 = getelementptr inbounds %struct.ANY, ptr %254, i32 0, i32 0
  %256 = load ptr, ptr %255, align 8, !tbaa !40
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.SignerInfo, ptr %257, i32 0, i32 6
  %259 = load ptr, ptr %258, align 8, !tbaa !38
  %260 = getelementptr inbounds %struct.ANY, ptr %259, i32 0, i32 1
  %261 = load i32, ptr %260, align 8, !tbaa !39
  %262 = sext i32 %261 to i64
  %263 = invoke ptr @ba_alloc_from_uint8(ptr noundef %256, i64 noundef %262)
          to label %264 unwind label %245

264:                                              ; preds = %251
  %265 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %263)
          to label %266 unwind label %245

266:                                              ; preds = %264
  br i1 %265, label %273, label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  store i32 4097, ptr %6, align 4, !tbaa !9
  %269 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 764, i32 noundef %269, ptr noundef null)
          to label %270 unwind label %245

270:                                              ; preds = %268
  store i32 4, ptr %10, align 4
  br label %314

271:                                              ; No predecessors!
  br label %272

272:                                              ; preds = %271
  br label %273

273:                                              ; preds = %272, %266
  br label %274

274:                                              ; preds = %273
  %275 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %276 unwind label %245

276:                                              ; preds = %274
  %277 = invoke i32 @ba_set_byte(ptr noundef %275, i64 noundef 0, i8 noundef zeroext 49)
          to label %278 unwind label %245

278:                                              ; preds = %276
  store i32 %277, ptr %6, align 4, !tbaa !9
  %279 = load i32, ptr %6, align 4, !tbaa !9
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %281, label %284

281:                                              ; preds = %278
  %282 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 766, i32 noundef %282)
          to label %283 unwind label %245

283:                                              ; preds = %281
  store i32 4, ptr %10, align 4
  br label %314

284:                                              ; preds = %278
  br label %285

285:                                              ; preds = %284
  br label %286

286:                                              ; preds = %285
  br label %287

287:                                              ; preds = %286
  %288 = invoke ptr @get_Attributes_desc()
          to label %289 unwind label %245

289:                                              ; preds = %287
  %290 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %291 unwind label %245

291:                                              ; preds = %289
  %292 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %288, ptr noundef %290)
          to label %293 unwind label %245

293:                                              ; preds = %291
  store ptr %292, ptr %9, align 8, !tbaa !5
  %294 = icmp eq ptr null, %292
  br i1 %294, label %295, label %298

295:                                              ; preds = %293
  store i32 2, ptr %6, align 4, !tbaa !9
  %296 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 767, i32 noundef %296)
          to label %297 unwind label %245

297:                                              ; preds = %295
  store i32 4, ptr %10, align 4
  br label %314

298:                                              ; preds = %293
  br label %299

299:                                              ; preds = %298
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %9, align 8, !tbaa !5
  %303 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 8
  %304 = invoke noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo16decodeAttributesERK10AttributesRSt6vectorINS_9AttributeESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(48) %302, ptr noundef nonnull align 8 dereferenceable(24) %303)
          to label %305 unwind label %245

305:                                              ; preds = %301
  store i32 %304, ptr %6, align 4, !tbaa !9
  %306 = load i32, ptr %6, align 4, !tbaa !9
  %307 = icmp ne i32 %306, 0
  br i1 %307, label %308, label %311

308:                                              ; preds = %305
  %309 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 768, i32 noundef %309)
          to label %310 unwind label %245

310:                                              ; preds = %308
  store i32 4, ptr %10, align 4
  br label %314

311:                                              ; preds = %305
  br label %312

312:                                              ; preds = %311
  br label %313

313:                                              ; preds = %312
  store i32 0, ptr %10, align 4
  br label %314

314:                                              ; preds = %313, %310, %297, %283, %270, %244
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %315 = load i32, ptr %10, align 4
  switch i32 %315, label %326 [
    i32 0, label %316
    i32 4, label %320
  ]

316:                                              ; preds = %314
  br label %317

317:                                              ; preds = %316, %219
  %318 = load ptr, ptr %5, align 8, !tbaa !5
  %319 = getelementptr inbounds %"class.UapkiNS::Pkcs7::SignedDataParser::SignerInfo", ptr %14, i32 0, i32 0
  store ptr %318, ptr %319, align 8, !tbaa !41
  br label %320

320:                                              ; preds = %317, %314, %215, %202, %190, %181, %170, %159, %148, %130, %110, %98, %78, %50, %39, %25
  %321 = call ptr @get_Attributes_desc()
  %322 = load ptr, ptr %8, align 8, !tbaa !5
  call void @asn_free(ptr noundef %321, ptr noundef %322)
  %323 = call ptr @get_Attributes_desc()
  %324 = load ptr, ptr %9, align 8, !tbaa !5
  call void @asn_free(ptr noundef %323, ptr noundef %324)
  %325 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %325, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %326

326:                                              ; preds = %320, %314, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  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
  %327 = load i32, ptr %3, align 4
  ret i32 %327

328:                                              ; preds = %245
  %329 = load ptr, ptr %12, align 8
  %330 = load i32, ptr %13, align 4
  %331 = insertvalue { ptr, i32 } poison, ptr %329, 0
  %332 = insertvalue { ptr, i32 } %331, i32 %330, 1
  resume { ptr, i32 } %332
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

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

declare noundef i32 @_ZN7UapkiNS4Util27algorithmIdentifierFromAsn1ERK19AlgorithmIdentifierRNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo20decodeMandatoryAttrsEv(ptr noundef nonnull align 8 dereferenceable(216)) #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 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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 8}
!14 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfoE", !6, i64 0, !10, i64 8, !15, i64 16, !16, i64 24, !17, i64 32, !20, i64 72, !17, i64 96, !16, i64 136, !20, i64 144, !16, i64 168, !24, i64 176}
!15 = !{!"_ZTSN7UapkiNS5Pkcs720SignerIdentifierTypeE", !7, i64 0}
!16 = !{!"_ZTSN7UapkiNS7SmartBAE", !6, i64 0}
!17 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !18, i64 0, !6, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !12, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!20 = !{!"_ZTSSt6vectorIN7UapkiNS9AttributeESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfo14MandatoryAttrsE", !18, i64 0, !16, i64 32}
!25 = !{!26, !10, i64 24}
!26 = !{!"_ZTS10SignerInfo", !27, i64 0, !28, i64 16, !31, i64 56, !28, i64 104, !31, i64 144, !32, i64 192, !6, i64 232, !29, i64 240}
!27 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!28 = !{!"_ZTS3ANY", !6, i64 0, !10, i64 8, !29, i64 16}
!29 = !{!"_ZTS16asn_struct_ctx_s", !30, i64 0, !30, i64 2, !10, i64 4, !6, i64 8, !12, i64 16}
!30 = !{!"short", !7, i64 0}
!31 = !{!"_ZTS19AlgorithmIdentifier", !27, i64 0, !6, i64 16, !29, i64 24}
!32 = !{!"_ZTS12OCTET_STRING", !6, i64 0, !10, i64 8, !29, i64 16}
!33 = !{!26, !6, i64 16}
!34 = !{!7, !7, i64 0}
!35 = !{!14, !15, i64 16}
!36 = !{!26, !10, i64 112}
!37 = !{!26, !6, i64 104}
!38 = !{!26, !6, i64 232}
!39 = !{!28, !10, i64 8}
!40 = !{!28, !6, i64 0}
!41 = !{!14, !6, i64 0}


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

%"class.UapkiNS::SmartBA" = type { ptr }

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

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

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) #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 @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @get_Attributes_desc() local_unnamed_addr #0

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

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

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

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

declare i32 @ba_set_byte(ptr noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo5parseEPK10SignerInfo(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca %"class.UapkiNS::SmartBA", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store i64 0, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %125, label %5

5:                                                ; preds = %2
  %6 = call i32 @asn_INTEGER2long(ptr noundef nonnull %1, ptr noundef nonnull %3)
  %.not84 = icmp eq i32 %6, 0
  br i1 %.not84, label %8, label %7

7:                                                ; preds = %5
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 711, i32 noundef %6)
  br label %122

8:                                                ; preds = %5
  %9 = load i64, ptr %3, align 8
  %10 = trunc i64 %9 to i32
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %10, ptr %11, align 8, !tbaa !9
  %12 = and i64 %9, -3
  %or.cond.not = icmp eq i64 %12, 1
  br i1 %or.cond.not, label %14, label %13

13:                                               ; preds = %8
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 714, i32 noundef 4146, ptr noundef null)
  br label %122

14:                                               ; preds = %8
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  %16 = load i32, ptr %15, align 8, !tbaa !23
  %17 = icmp slt i32 %16, 7
  br i1 %17, label %18, label %19

18:                                               ; preds = %14
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 719, i32 noundef 4145, ptr noundef null)
  br label %122

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %1, i64 16
  %21 = load ptr, ptr %20, align 8, !tbaa !31
  %22 = load i8, ptr %21, align 1, !tbaa !32
  %23 = icmp eq i8 %22, 48
  br i1 %23, label %27, label %24

24:                                               ; preds = %19
  %25 = add nsw i32 %16, -67
  %or.cond = icmp ult i32 %25, -49
  br i1 %or.cond, label %26, label %27

26:                                               ; preds = %24
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 728, i32 noundef 4112, ptr noundef null)
  br label %122

27:                                               ; preds = %24, %19
  %.sink = phi i64 [ 1, %19 ], [ 2, %24 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %.sink, ptr %28, align 8, !tbaa !33
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  %30 = zext nneg i32 %16 to i64
  %31 = call ptr @ba_alloc_from_uint8(ptr noundef nonnull %21, i64 noundef %30)
  %32 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef %31)
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %27
  %35 = getelementptr inbounds i8, ptr %1, i64 56
  %36 = getelementptr inbounds i8, ptr %0, i64 32
  %37 = call noundef i32 @_ZN7UapkiNS4Util27algorithmIdentifierFromAsn1ERK19AlgorithmIdentifierRNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %36)
  %.not85 = icmp eq i32 %37, 0
  br i1 %.not85, label %39, label %38

38:                                               ; preds = %34
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 737, i32 noundef %37)
  br label %122

39:                                               ; preds = %34
  %40 = getelementptr inbounds i8, ptr %1, i64 112
  %41 = load i32, ptr %40, align 8, !tbaa !34
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %47, label %43

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %1, i64 104
  %45 = load ptr, ptr %44, align 8, !tbaa !35
  %46 = load i8, ptr %45, align 1, !tbaa !32
  %.not86 = icmp eq i8 %46, -96
  br i1 %.not86, label %48, label %47

47:                                               ; preds = %39, %43
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 741, i32 noundef 4145, ptr noundef null)
  br label %122

48:                                               ; preds = %43
  %49 = getelementptr inbounds i8, ptr %0, i64 168
  %50 = sext i32 %41 to i64
  %51 = call ptr @ba_alloc_from_uint8(ptr noundef nonnull %45, i64 noundef %50)
  %52 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef %51)
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 744, i32 noundef 4097, ptr noundef null)
  br label %122

54:                                               ; preds = %48
  %55 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
  %56 = call i32 @ba_set_byte(ptr noundef %55, i64 noundef 0, i8 noundef zeroext 49)
  %.not87 = icmp eq i32 %56, 0
  br i1 %.not87, label %58, label %57

57:                                               ; preds = %54
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 746, i32 noundef %56)
  br label %122

58:                                               ; preds = %54
  %59 = call ptr @get_Attributes_desc()
  %60 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
  %61 = call ptr @asn_decode_ba_with_alloc(ptr noundef %59, ptr noundef %60)
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 747, i32 noundef 2)
  br label %122

64:                                               ; preds = %58
  %65 = getelementptr inbounds i8, ptr %0, i64 72
  %66 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo16decodeAttributesERK10AttributesRSt6vectorINS_9AttributeESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(48) %61, ptr noundef nonnull align 8 dereferenceable(24) %65)
  %.not88 = icmp eq i32 %66, 0
  br i1 %.not88, label %68, label %67

67:                                               ; preds = %64
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 748, i32 noundef %66)
  br label %122

68:                                               ; preds = %64
  %69 = call noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo20decodeMandatoryAttrsEv(ptr noundef nonnull align 8 dereferenceable(216) %0)
  %.not89 = icmp eq i32 %69, 0
  br i1 %.not89, label %71, label %70

70:                                               ; preds = %68
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 749, i32 noundef %69)
  br label %122

71:                                               ; preds = %68
  %72 = getelementptr inbounds i8, ptr %1, i64 144
  %73 = getelementptr inbounds i8, ptr %0, i64 96
  %74 = call noundef i32 @_ZN7UapkiNS4Util27algorithmIdentifierFromAsn1ERK19AlgorithmIdentifierRNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48) %72, ptr noundef nonnull align 8 dereferenceable(40) %73)
  %.not90 = icmp eq i32 %74, 0
  br i1 %.not90, label %76, label %75

75:                                               ; preds = %71
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 752, i32 noundef %74)
  br label %122

76:                                               ; preds = %71
  %77 = getelementptr inbounds i8, ptr %1, i64 192
  %78 = getelementptr inbounds i8, ptr %0, i64 136
  %79 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %78)
  %80 = call i32 @asn_OCTSTRING2ba(ptr noundef nonnull %77, ptr noundef %79)
  %.not91 = icmp eq i32 %80, 0
  br i1 %.not91, label %82, label %81

81:                                               ; preds = %76
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 755, i32 noundef %80)
  br label %122

82:                                               ; preds = %76
  %83 = getelementptr inbounds i8, ptr %1, i64 232
  %84 = load ptr, ptr %83, align 8, !tbaa !36
  %.not92 = icmp eq ptr %84, null
  br i1 %.not92, label %121, label %85

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %86 = load ptr, ptr %83, align 8, !tbaa !36
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %88 = load i32, ptr %87, align 8, !tbaa !37
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %93, label %90

90:                                               ; preds = %85
  %91 = load ptr, ptr %86, align 8, !tbaa !38
  %92 = load i8, ptr %91, align 1, !tbaa !32
  %.not93 = icmp eq i8 %92, -95
  br i1 %.not93, label %96, label %93

93:                                               ; preds = %85, %90
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 761, i32 noundef 4145, ptr noundef null)
          to label %.thread unwind label %94

94:                                               ; preds = %119, %115, %114, %109, %107, %106, %102, %101, %96, %93
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %95

96:                                               ; preds = %90
  %97 = sext i32 %88 to i64
  %98 = invoke ptr @ba_alloc_from_uint8(ptr noundef nonnull %91, i64 noundef %97)
          to label %99 unwind label %94

99:                                               ; preds = %96
  %100 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %98)
  br i1 %100, label %102, label %101

101:                                              ; preds = %99
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 764, i32 noundef 4097, ptr noundef null)
          to label %.thread unwind label %94

102:                                              ; preds = %99
  %103 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %104 = invoke i32 @ba_set_byte(ptr noundef %103, i64 noundef 0, i8 noundef zeroext 49)
          to label %105 unwind label %94

105:                                              ; preds = %102
  %.not94 = icmp eq i32 %104, 0
  br i1 %.not94, label %107, label %106

106:                                              ; preds = %105
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 766, i32 noundef %104)
          to label %.thread unwind label %94

107:                                              ; preds = %105
  %108 = invoke ptr @get_Attributes_desc()
          to label %109 unwind label %94

109:                                              ; preds = %107
  %110 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %111 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %108, ptr noundef %110)
          to label %112 unwind label %94

112:                                              ; preds = %109
  %113 = icmp eq ptr %111, null
  br i1 %113, label %114, label %115

114:                                              ; preds = %112
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 767, i32 noundef 2)
          to label %.thread unwind label %94

115:                                              ; preds = %112
  %116 = getelementptr inbounds i8, ptr %0, i64 144
  %117 = invoke noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo16decodeAttributesERK10AttributesRSt6vectorINS_9AttributeESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(48) %111, ptr noundef nonnull align 8 dereferenceable(24) %116)
          to label %118 unwind label %94

118:                                              ; preds = %115
  %.not95 = icmp eq i32 %117, 0
  br i1 %.not95, label %120, label %119

119:                                              ; preds = %118
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 768, i32 noundef %117)
          to label %.thread unwind label %94

.thread:                                          ; preds = %93, %101, %106, %114, %119
  %.061.ph = phi ptr [ %111, %119 ], [ null, %114 ], [ null, %106 ], [ null, %101 ], [ null, %93 ]
  %.059.ph = phi i32 [ %117, %119 ], [ 2, %114 ], [ %104, %106 ], [ 4097, %101 ], [ 4145, %93 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %122

120:                                              ; preds = %118
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %121

121:                                              ; preds = %120, %82
  %.162 = phi ptr [ %111, %120 ], [ null, %82 ]
  store ptr %1, ptr %0, align 8, !tbaa !39
  br label %122

122:                                              ; preds = %.thread, %121, %81, %75, %70, %67, %63, %57, %53, %47, %38, %33, %26, %18, %13, %7
  %.064 = phi ptr [ null, %7 ], [ null, %13 ], [ null, %18 ], [ null, %38 ], [ null, %47 ], [ null, %57 ], [ null, %63 ], [ %61, %67 ], [ %61, %70 ], [ %61, %75 ], [ %61, %81 ], [ %61, %121 ], [ null, %53 ], [ null, %33 ], [ null, %26 ], [ %61, %.thread ]
  %.263 = phi ptr [ null, %7 ], [ null, %13 ], [ null, %18 ], [ null, %38 ], [ null, %47 ], [ null, %57 ], [ null, %63 ], [ null, %67 ], [ null, %70 ], [ null, %75 ], [ null, %81 ], [ %.162, %121 ], [ null, %53 ], [ null, %33 ], [ null, %26 ], [ %.061.ph, %.thread ]
  %.2 = phi i32 [ %6, %7 ], [ 4146, %13 ], [ 4145, %18 ], [ %37, %38 ], [ 4145, %47 ], [ %56, %57 ], [ 2, %63 ], [ %66, %67 ], [ %69, %70 ], [ %74, %75 ], [ %80, %81 ], [ 0, %121 ], [ 4097, %53 ], [ 4097, %33 ], [ 4112, %26 ], [ %.059.ph, %.thread ]
  %123 = call ptr @get_Attributes_desc()
  call void @asn_free(ptr noundef %123, ptr noundef %.064)
  %124 = call ptr @get_Attributes_desc()
  call void @asn_free(ptr noundef %124, ptr noundef %.263)
  br label %125

125:                                              ; preds = %2, %122
  %.0 = phi i32 [ %.2, %122 ], [ 4101, %2 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 %.0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

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

declare noundef i32 @_ZN7UapkiNS4Util27algorithmIdentifierFromAsn1ERK19AlgorithmIdentifierRNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS5Pkcs716SignedDataParser10SignerInfo20decodeMandatoryAttrsEv(ptr noundef nonnull align 8 dereferenceable(216)) 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 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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, !12, i64 8}
!10 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfoE", !11, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !15, i64 32, !18, i64 72, !15, i64 96, !14, i64 136, !18, i64 144, !14, i64 168, !22, i64 176}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN7UapkiNS5Pkcs720SignerIdentifierTypeE", !7, i64 0}
!14 = !{!"_ZTSN7UapkiNS7SmartBAE", !11, i64 0}
!15 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !16, i64 0, !11, i64 32}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !6, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!18 = !{!"_ZTSSt6vectorIN7UapkiNS9AttributeESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS9AttributeESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!"_ZTSN7UapkiNS5Pkcs716SignedDataParser10SignerInfo14MandatoryAttrsE", !16, i64 0, !14, i64 32}
!23 = !{!24, !12, i64 24}
!24 = !{!"_ZTS10SignerInfo", !25, i64 0, !26, i64 16, !29, i64 56, !26, i64 104, !29, i64 144, !30, i64 192, !11, i64 232, !27, i64 240}
!25 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !11, i64 0, !12, i64 8}
!26 = !{!"_ZTS3ANY", !11, i64 0, !12, i64 8, !27, i64 16}
!27 = !{!"_ZTS16asn_struct_ctx_s", !28, i64 0, !28, i64 2, !12, i64 4, !11, i64 8, !6, i64 16}
!28 = !{!"short", !7, i64 0}
!29 = !{!"_ZTS19AlgorithmIdentifier", !25, i64 0, !11, i64 16, !27, i64 24}
!30 = !{!"_ZTS12OCTET_STRING", !11, i64 0, !12, i64 8, !27, i64 16}
!31 = !{!24, !11, i64 16}
!32 = !{!7, !7, i64 0}
!33 = !{!10, !13, i64 16}
!34 = !{!24, !12, i64 112}
!35 = !{!24, !11, i64 104}
!36 = !{!24, !11, i64 232}
!37 = !{!26, !12, i64 8}
!38 = !{!26, !11, i64 0}
!39 = !{!10, !11, i64 0}


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