; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (attribute-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.__gnu_cxx::__normal_iterator.18" = type { 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::allocator.6" = type { i8 }
%"struct.UapkiNS::OtherHash" = type { %"struct.UapkiNS::AlgorithmIdentifier", ptr }
%"struct.UapkiNS::AlgorithmIdentifier" = type { %"class.std::__cxx11::basic_string", ptr }
%struct.ESSCertIDv2 = type { ptr, %struct.OCTET_STRING, 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 }
%"struct.UapkiNS::AttrCertId" = type { %"struct.UapkiNS::OtherHash", %"struct.UapkiNS::AttrCertId::IssuerSerial" }
%"struct.UapkiNS::AttrCertId::IssuerSerial" = type { ptr, ptr }
%struct.IssuerSerial = type { %struct.GeneralNames, %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.GeneralNames = type { %struct.anon.9, %struct.asn_struct_ctx_s }
%struct.anon.9 = type { ptr, i32, i32, ptr }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.SigningCertificateV2 = type { %"struct.SigningCertificateV2::certs", ptr, %struct.asn_struct_ctx_s }
%"struct.SigningCertificateV2::certs" = type { %struct.anon.10, %struct.asn_struct_ctx_s }
%struct.anon.10 = type { ptr, i32, i32, ptr }

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @get_GeneralNames_desc() #1

declare ptr @get_SigningCertificateV2_desc() #1

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

declare noundef i32 @_ZN7UapkiNS4Util25algorithmIdentifierToAsn1ER19AlgorithmIdentifierRKNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) #1

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

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

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

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

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

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

declare ptr @get_ESSCertIDv2_desc() #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15AttributeHelper24encodeSigningCertificateERKSt6vectorINS_10AttrCertIdESaIS2_EEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.std::allocator.6", align 1
  %17 = alloca i1, align 1
  %18 = alloca i1, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  %22 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 80) #7
  store ptr %22, ptr %7, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %2
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  store i32 1, ptr %6, align 4, !tbaa !9
  %27 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 414, i32 noundef %27, ptr noundef null)
  br label %218

28:                                               ; preds = %23
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %31, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call ptr @_ZNKSt6vectorIN7UapkiNS10AttrCertIdESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %10, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt6vectorIN7UapkiNS10AttrCertIdESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #6
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %11, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %201, %30
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  store i32 5, ptr %12, align 4
  br label %203

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %42 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  store ptr %42, ptr %13, align 8, !tbaa !5
  %43 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 80) #7
  store ptr %43, ptr %8, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %49

47:                                               ; preds = %44
  store i32 1, ptr %6, align 4, !tbaa !9
  %48 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 417, i32 noundef %48, ptr noundef null)
  store i32 4, ptr %12, align 4
  br label %198

49:                                               ; preds = %44
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %52, i32 0, i32 0
  %54 = call noundef zeroext i1 @_ZNK7UapkiNS19AlgorithmIdentifier9isPresentEv(ptr noundef nonnull align 8 dereferenceable(40) %53)
  store i1 false, ptr %15, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %18, align 1
  store i1 false, ptr %21, align 1
  br i1 %54, label %55, label %62

55:                                               ; preds = %51
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %"struct.UapkiNS::AlgorithmIdentifier", ptr %57, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  store i1 true, ptr %15, align 1
  %59 = load ptr, ptr @OID_SHA256, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i1 true, ptr %17, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  store i1 true, ptr %18, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %59, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %60 unwind label %87

60:                                               ; preds = %55
  store i1 true, ptr %21, align 1
  %61 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %62

62:                                               ; preds = %60, %51
  %63 = phi i1 [ false, %51 ], [ %61, %60 ]
  %64 = load i1, ptr %21, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %66

66:                                               ; preds = %65, %62
  %67 = load i1, ptr %18, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  br label %69

69:                                               ; preds = %68, %66
  %70 = load i1, ptr %17, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  br label %72

72:                                               ; preds = %71, %69
  %73 = load i1, ptr %15, align 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %75

75:                                               ; preds = %74, %72
  br i1 %63, label %76, label %117

76:                                               ; preds = %75
  %77 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 48) #7
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ESSCertIDv2, ptr %78, i32 0, i32 0
  store ptr %77, ptr %79, align 8, !tbaa !11
  br label %80

80:                                               ; preds = %76
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ESSCertIDv2, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %100

85:                                               ; preds = %80
  store i32 1, ptr %6, align 4, !tbaa !9
  %86 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 421, i32 noundef %86, ptr noundef null)
  store i32 4, ptr %12, align 4
  br label %198

87:                                               ; preds = %55
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %19, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %20, align 4
  %91 = load i1, ptr %18, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  br label %93

93:                                               ; preds = %92, %87
  %94 = load i1, ptr %17, align 1
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  br label %96

96:                                               ; preds = %95, %93
  %97 = load i1, ptr %15, align 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %99

99:                                               ; preds = %98, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %226

100:                                              ; preds = %80
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ESSCertIDv2, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !11
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %107, i32 0, i32 0
  %109 = call noundef i32 @_ZN7UapkiNS4Util25algorithmIdentifierToAsn1ER19AlgorithmIdentifierRKNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48) %106, ptr noundef nonnull align 8 dereferenceable(40) %108)
  store i32 %109, ptr %6, align 4, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !9
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %103
  %113 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 422, i32 noundef %113)
  store i32 4, ptr %12, align 4
  br label %198

114:                                              ; preds = %103
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116, %75
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.UapkiNS::OtherHash", ptr %119, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !17
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ESSCertIDv2, ptr %122, i32 0, i32 1
  %124 = call i32 @asn_ba2OCTSTRING(ptr noundef %121, ptr noundef %123)
  store i32 %124, ptr %6, align 4, !tbaa !9
  %125 = load i32, ptr %6, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %129

127:                                              ; preds = %118
  %128 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 426, i32 noundef %128)
  store i32 4, ptr %12, align 4
  br label %198

129:                                              ; preds = %118
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.UapkiNS::AttrCertId", ptr %132, i32 0, i32 1
  %134 = call noundef zeroext i1 @_ZNK7UapkiNS10AttrCertId12IssuerSerial9isPresentEv(ptr noundef nonnull align 8 dereferenceable(16) %133)
  br i1 %134, label %135, label %184

135:                                              ; preds = %131
  %136 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 96) #7
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ESSCertIDv2, ptr %137, i32 0, i32 2
  store ptr %136, ptr %138, align 8, !tbaa !22
  br label %139

139:                                              ; preds = %135
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ESSCertIDv2, ptr %140, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !22
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %146

144:                                              ; preds = %139
  store i32 1, ptr %6, align 4, !tbaa !9
  %145 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 430, i32 noundef %145, ptr noundef null)
  store i32 4, ptr %12, align 4
  br label %198

146:                                              ; preds = %139
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  %150 = call ptr @get_GeneralNames_desc()
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ESSCertIDv2, ptr %151, i32 0, i32 2
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = getelementptr inbounds %struct.IssuerSerial, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.UapkiNS::AttrCertId", ptr %155, i32 0, i32 1
  %157 = getelementptr inbounds %"struct.UapkiNS::AttrCertId::IssuerSerial", ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !23
  %159 = call i32 @asn_decode_ba(ptr noundef %150, ptr noundef %154, ptr noundef %158)
  store i32 %159, ptr %6, align 4, !tbaa !9
  %160 = load i32, ptr %6, align 4, !tbaa !9
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %164

162:                                              ; preds = %149
  %163 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 431, i32 noundef %163)
  store i32 4, ptr %12, align 4
  br label %198

164:                                              ; preds = %149
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %13, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.UapkiNS::AttrCertId", ptr %168, i32 0, i32 1
  %170 = getelementptr inbounds %"struct.UapkiNS::AttrCertId::IssuerSerial", ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !26
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.ESSCertIDv2, ptr %172, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !22
  %175 = getelementptr inbounds %struct.IssuerSerial, ptr %174, i32 0, i32 1
  %176 = call i32 @asn_ba2INTEGER(ptr noundef %171, ptr noundef %175)
  store i32 %176, ptr %6, align 4, !tbaa !9
  %177 = load i32, ptr %6, align 4, !tbaa !9
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %181

179:                                              ; preds = %167
  %180 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 432, i32 noundef %180)
  store i32 4, ptr %12, align 4
  br label %198

181:                                              ; preds = %167
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183, %131
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.SigningCertificateV2, ptr %186, i32 0, i32 0
  %188 = getelementptr inbounds %"struct.SigningCertificateV2::certs", ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = call i32 @asn_set_add(ptr noundef %188, ptr noundef %189)
  store i32 %190, ptr %6, align 4, !tbaa !9
  %191 = load i32, ptr %6, align 4, !tbaa !9
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %195

193:                                              ; preds = %185
  %194 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 435, i32 noundef %194)
  store i32 4, ptr %12, align 4
  br label %198

195:                                              ; preds = %185
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  store ptr null, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %12, align 4
  br label %198

198:                                              ; preds = %197, %193, %179, %162, %144, %127, %112, %85, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %199 = load i32, ptr %12, align 4
  switch i32 %199, label %203 [
    i32 0, label %200
  ]

200:                                              ; preds = %198
  br label %201

201:                                              ; preds = %200
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br label %38

203:                                              ; preds = %198, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %204 = load i32, ptr %12, align 4
  switch i32 %204, label %224 [
    i32 5, label %205
    i32 4, label %218
  ]

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205
  %207 = call ptr @get_SigningCertificateV2_desc()
  %208 = load ptr, ptr %7, align 8, !tbaa !5
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = call i32 @asn_encode_ba(ptr noundef %207, ptr noundef %208, ptr noundef %209)
  store i32 %210, ptr %6, align 4, !tbaa !9
  %211 = load i32, ptr %6, align 4, !tbaa !9
  %212 = icmp ne i32 %211, 0
  br i1 %212, label %213, label %215

213:                                              ; preds = %206
  %214 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 439, i32 noundef %214)
  br label %218

215:                                              ; preds = %206
  br label %216

216:                                              ; preds = %215
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217, %213, %203, %26
  %219 = call ptr @get_SigningCertificateV2_desc()
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  call void @asn_free(ptr noundef %219, ptr noundef %220)
  %221 = call ptr @get_ESSCertIDv2_desc()
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  call void @asn_free(ptr noundef %221, ptr noundef %222)
  %223 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %223, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %224

224:                                              ; preds = %218, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %225 = load i32, ptr %3, align 4
  ret i32 %225

226:                                              ; preds = %99
  %227 = load ptr, ptr %19, align 8
  %228 = load i32, ptr %20, align 4
  %229 = insertvalue { ptr, i32 } poison, ptr %227, 0
  %230 = insertvalue { ptr, i32 } %229, i32 %228, 1
  resume { ptr, i32 } %230
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS11ESSCertIDv2", !6, i64 0, !13, i64 8, !6, i64 48, !14, i64 56}
!13 = !{!"_ZTS12OCTET_STRING", !6, i64 0, !10, i64 8, !14, i64 16}
!14 = !{!"_ZTS16asn_struct_ctx_s", !15, i64 0, !15, i64 2, !10, i64 4, !6, i64 8, !16, i64 16}
!15 = !{!"short", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !6, i64 40}
!18 = !{!"_ZTSN7UapkiNS9OtherHashE", !19, i64 0, !6, i64 40}
!19 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !20, i64 0, !6, i64 32}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !16, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!12, !6, i64 48}
!23 = !{!24, !6, i64 48}
!24 = !{!"_ZTSN7UapkiNS10AttrCertIdE", !18, i64 0, !25, i64 48}
!25 = !{!"_ZTSN7UapkiNS10AttrCertId12IssuerSerialE", !6, i64 0, !6, i64 8}
!26 = !{!24, !6, i64 56}


; 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.__gnu_cxx::__normal_iterator.18" = type { 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::allocator.6" = type { i8 }

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@OID_SHA256 = external local_unnamed_addr global ptr, align 8

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @get_GeneralNames_desc() local_unnamed_addr #1

declare ptr @get_SigningCertificateV2_desc() local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

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

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

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

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

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

declare ptr @get_ESSCertIDv2_desc() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15AttributeHelper24encodeSigningCertificateERKSt6vectorINS_10AttrCertIdESaIS2_EEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.6", align 1
  %7 = tail call noalias dereferenceable_or_null(80) ptr @calloc(i64 noundef 1, i64 noundef 80) #6
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %2
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 414, i32 noundef 1, ptr noundef null)
  br label %68

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %11 = tail call ptr @_ZNKSt6vectorIN7UapkiNS10AttrCertIdESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %11, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %12 = tail call ptr @_ZNKSt6vectorIN7UapkiNS10AttrCertIdESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %12, ptr %4, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10, %61
  %14 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %15 = call noalias dereferenceable_or_null(80) ptr @calloc(i64 noundef 1, i64 noundef 80) #6
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %.lr.ph
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 417, i32 noundef 1, ptr noundef null)
  br label %64

18:                                               ; preds = %.lr.ph
  %19 = call noundef zeroext i1 @_ZNK7UapkiNS19AlgorithmIdentifier9isPresentEv(ptr noundef nonnull align 8 dereferenceable(40) %14)
  br i1 %19, label %20, label %.critedge83.thread

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %21 = load ptr, ptr @OID_SHA256, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %.critedge83 unwind label %27

.critedge83:                                      ; preds = %20
  %22 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br i1 %22, label %23, label %.critedge83.thread

23:                                               ; preds = %.critedge83
  %24 = call noalias dereferenceable_or_null(48) ptr @calloc(i64 noundef 1, i64 noundef 48) #6
  store ptr %24, ptr %15, align 8, !tbaa !9
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 421, i32 noundef 1, ptr noundef null)
  br label %64

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

29:                                               ; preds = %23
  %30 = call noundef i32 @_ZN7UapkiNS4Util25algorithmIdentifierToAsn1ER19AlgorithmIdentifierRKNS_19AlgorithmIdentifierE(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 8 dereferenceable(40) %14)
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %.critedge83.thread, label %31

31:                                               ; preds = %29
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 422, i32 noundef %30)
  br label %64

.critedge83.thread:                               ; preds = %18, %.critedge83, %29
  %32 = getelementptr inbounds i8, ptr %14, i64 40
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = getelementptr inbounds i8, ptr %15, i64 8
  %35 = call i32 @asn_ba2OCTSTRING(ptr noundef %33, ptr noundef nonnull %34)
  %.not77 = icmp eq i32 %35, 0
  br i1 %.not77, label %37, label %36

36:                                               ; preds = %.critedge83.thread
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 426, i32 noundef %35)
  br label %64

37:                                               ; preds = %.critedge83.thread
  %38 = getelementptr inbounds i8, ptr %14, i64 48
  %39 = call noundef zeroext i1 @_ZNK7UapkiNS10AttrCertId12IssuerSerial9isPresentEv(ptr noundef nonnull align 8 dereferenceable(16) %38)
  br i1 %39, label %40, label %58

40:                                               ; preds = %37
  %41 = call noalias dereferenceable_or_null(96) ptr @calloc(i64 noundef 1, i64 noundef 96) #6
  %42 = getelementptr inbounds i8, ptr %15, i64 48
  store ptr %41, ptr %42, align 8, !tbaa !21
  %43 = icmp eq ptr %41, null
  br i1 %43, label %44, label %45

44:                                               ; preds = %40
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 430, i32 noundef 1, ptr noundef null)
  br label %64

45:                                               ; preds = %40
  %46 = call ptr @get_GeneralNames_desc()
  %47 = load ptr, ptr %42, align 8, !tbaa !21
  %48 = load ptr, ptr %38, align 8, !tbaa !22
  %49 = call i32 @asn_decode_ba(ptr noundef %46, ptr noundef %47, ptr noundef %48)
  %.not78 = icmp eq i32 %49, 0
  br i1 %.not78, label %51, label %50

50:                                               ; preds = %45
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 431, i32 noundef %49)
  br label %64

51:                                               ; preds = %45
  %52 = getelementptr inbounds i8, ptr %14, i64 56
  %53 = load ptr, ptr %52, align 8, !tbaa !25
  %54 = load ptr, ptr %42, align 8, !tbaa !21
  %55 = getelementptr inbounds i8, ptr %54, i64 48
  %56 = call i32 @asn_ba2INTEGER(ptr noundef %53, ptr noundef nonnull %55)
  %.not79 = icmp eq i32 %56, 0
  br i1 %.not79, label %58, label %57

57:                                               ; preds = %51
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 432, i32 noundef %56)
  br label %64

58:                                               ; preds = %37, %51
  %59 = call i32 @asn_set_add(ptr noundef nonnull %7, ptr noundef nonnull %15)
  %.not80 = icmp eq i32 %59, 0
  br i1 %.not80, label %61, label %60

60:                                               ; preds = %58
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 435, i32 noundef %59)
  br label %64

61:                                               ; preds = %58
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %63 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7UapkiNS10AttrCertIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br i1 %63, label %.lr.ph, label %._crit_edge

64:                                               ; preds = %17, %26, %31, %36, %44, %50, %57, %60
  %.1.ph = phi i32 [ %59, %60 ], [ %56, %57 ], [ %49, %50 ], [ 1, %44 ], [ %35, %36 ], [ %30, %31 ], [ 1, %26 ], [ 1, %17 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %68

._crit_edge:                                      ; preds = %61, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %65 = call ptr @get_SigningCertificateV2_desc()
  %66 = call i32 @asn_encode_ba(ptr noundef %65, ptr noundef nonnull %7, ptr noundef %1)
  %.not81 = icmp eq i32 %66, 0
  br i1 %.not81, label %68, label %67

67:                                               ; preds = %._crit_edge
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 439, i32 noundef %66)
  br label %68

68:                                               ; preds = %64, %._crit_edge, %67, %9
  %.364 = phi ptr [ null, %9 ], [ %15, %64 ], [ null, %67 ], [ null, %._crit_edge ]
  %.3 = phi i32 [ 1, %9 ], [ %.1.ph, %64 ], [ %66, %67 ], [ 0, %._crit_edge ]
  %69 = call ptr @get_SigningCertificateV2_desc()
  call void @asn_free(ptr noundef %69, ptr noundef %7)
  %70 = call ptr @get_ESSCertIDv2_desc()
  call void @asn_free(ptr noundef %70, ptr noundef %.364)
  ret i32 %.3
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint 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 #6 = { nounwind allocsize(0,1) }
attributes #7 = { 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, !6, i64 0}
!10 = !{!"_ZTS11ESSCertIDv2", !6, i64 0, !11, i64 8, !6, i64 48, !13, i64 56}
!11 = !{!"_ZTS12OCTET_STRING", !6, i64 0, !12, i64 8, !13, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS16asn_struct_ctx_s", !14, i64 0, !14, i64 2, !12, i64 4, !6, i64 8, !15, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 40}
!17 = !{!"_ZTSN7UapkiNS9OtherHashE", !18, i64 0, !6, i64 40}
!18 = !{!"_ZTSN7UapkiNS19AlgorithmIdentifierE", !19, i64 0, !6, i64 32}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !15, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!10, !6, i64 48}
!22 = !{!23, !6, i64 48}
!23 = !{!"_ZTSN7UapkiNS10AttrCertIdE", !17, i64 0, !24, i64 48}
!24 = !{!"_ZTSN7UapkiNS10AttrCertId12IssuerSerialE", !6, i64 0, !6, i64 8}
!25 = !{!23, !6, i64 56}


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