; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src/crl-item.ll (ZN7UapkiNS3Crl7CrlItem6verifyEPKNS_4Cert7CerItemEb)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::lock_guard" = type { ptr }
%"class.UapkiNS::SmartBA" = 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.UapkiNS::Crl::CrlItem" = type <{ %"class.std::mutex", %"class.std::__cxx11::basic_string", i32, i32, ptr, ptr, ptr, ptr, i64, i64, %"class.std::vector", ptr, ptr, ptr, %"struct.UapkiNS::Crl::CrlItem::Uris", i32, [4 x i8], %"class.std::vector.8", ptr, i32, [4 x i8] }>
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<UapkiNS::Crl::RevokedCertOffset, std::allocator<UapkiNS::Crl::RevokedCertOffset>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Crl::RevokedCertOffset, std::allocator<UapkiNS::Crl::RevokedCertOffset>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Crl::RevokedCertOffset, std::allocator<UapkiNS::Crl::RevokedCertOffset>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Crl::RevokedCertOffset, std::allocator<UapkiNS::Crl::RevokedCertOffset>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.UapkiNS::Crl::CrlItem::Uris" = type { %"class.std::vector.3", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<UapkiNS::OtherHash *, std::allocator<UapkiNS::OtherHash *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::OtherHash *, std::allocator<UapkiNS::OtherHash *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::OtherHash *, std::allocator<UapkiNS::OtherHash *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::OtherHash *, std::allocator<UapkiNS::OtherHash *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.X509Tbs = type { %struct.ANY, %struct.AlgorithmIdentifier, %struct.BIT_STRING_s, %struct.asn_struct_ctx_s }
%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.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.BIT_STRING_s = type { ptr, i32, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@OID_DSTU4145_WITH_DSTU7564 = external global ptr, align 8
@OID_DSTU4145_WITH_GOST3411 = external global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Crl7CrlItem6verifyEPKNS_4Cert7CerItemEb(ptr noundef nonnull align 8 dereferenceable(268) %0, ptr noundef %1, i1 noundef zeroext %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::lock_guard", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.UapkiNS::SmartBA", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.UapkiNS::SmartBA", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  %17 = zext i1 %2 to i8
  store i8 %17, ptr %7, align 1, !tbaa !9
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %19 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 0
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(40) %19)
  %20 = load i8, ptr %7, align 1, !tbaa !9, !range !11, !noundef !12
  %21 = trunc i8 %20 to i1
  br i1 %21, label %28, label %22

22:                                               ; preds = %3
  %23 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 15
  %24 = load i32, ptr %23, align 8, !tbaa !13
  %25 = icmp ugt i32 %24, 1
  br i1 %25, label %26, label %27

26:                                               ; preds = %22
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %165

27:                                               ; preds = %22
  br label %28

28:                                               ; preds = %27, %3
  %29 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 15
  store i32 1, ptr %29, align 8, !tbaa !13
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %165

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %34 unwind label %48

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %35 unwind label %52

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %36 = invoke ptr @get_X509Tbs_desc()
          to label %37 unwind label %56

37:                                               ; preds = %35
  %38 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !38
  %40 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %36, ptr noundef %39)
          to label %41 unwind label %56

41:                                               ; preds = %37
  store ptr %40, ptr %16, align 8, !tbaa !5
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %62, label %44

44:                                               ; preds = %41
  br label %45

45:                                               ; preds = %44
  store i32 4145, ptr %10, align 4, !tbaa !37
  %46 = load i32, ptr %10, align 4, !tbaa !37
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 345, i32 noundef %46, ptr noundef null)
          to label %47 unwind label %56

47:                                               ; preds = %45
  br label %157

48:                                               ; preds = %33
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %12, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %13, align 4
  br label %164

52:                                               ; preds = %34
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %12, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %13, align 4
  br label %163

56:                                               ; preds = %159, %157, %146, %144, %141, %138, %132, %127, %123, %116, %111, %107, %101, %96, %91, %83, %77, %73, %62, %45, %37, %35
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %12, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br label %163

60:                                               ; No predecessors!
  br label %61

61:                                               ; preds = %60
  br label %62

62:                                               ; preds = %61, %41
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.X509Tbs, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %struct.ANY, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !39
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.X509Tbs, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.ANY, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !47
  %71 = sext i32 %70 to i64
  %72 = invoke ptr @ba_alloc_from_uint8(ptr noundef %66, i64 noundef %71)
          to label %73 unwind label %56

73:                                               ; preds = %62
  %74 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %72)
          to label %75 unwind label %56

75:                                               ; preds = %73
  br i1 %74, label %82, label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  store i32 4097, ptr %10, align 4, !tbaa !37
  %78 = load i32, ptr %10, align 4, !tbaa !37
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 348, i32 noundef %78, ptr noundef null)
          to label %79 unwind label %56

79:                                               ; preds = %77
  br label %157

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81, %75
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.X509Tbs, ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds %struct.AlgorithmIdentifier, ptr %85, i32 0, i32 0
  %87 = invoke noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %86, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %88 unwind label %56

88:                                               ; preds = %83
  store i32 %87, ptr %10, align 4, !tbaa !37
  %89 = load i32, ptr %10, align 4, !tbaa !37
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %88
  %92 = load i32, ptr %10, align 4, !tbaa !37
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 351, i32 noundef %92)
          to label %93 unwind label %56

93:                                               ; preds = %91
  br label %157

94:                                               ; preds = %88
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr @OID_DSTU4145_WITH_DSTU7564, align 8, !tbaa !5
  %98 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %99 = invoke zeroext i1 @oid_is_parent(ptr noundef %97, ptr noundef %98)
          to label %100 unwind label %56

100:                                              ; preds = %96
  br i1 %99, label %106, label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr @OID_DSTU4145_WITH_GOST3411, align 8, !tbaa !5
  %103 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %104 = invoke zeroext i1 @oid_is_parent(ptr noundef %102, ptr noundef %103)
          to label %105 unwind label %56

105:                                              ; preds = %101
  br i1 %104, label %106, label %122

106:                                              ; preds = %105, %100
  br label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %16, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.X509Tbs, ptr %108, i32 0, i32 2
  %110 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %111 unwind label %56

111:                                              ; preds = %107
  %112 = invoke noundef i32 @_ZN7UapkiNS4Util27bitStringEncapOctetFromAsn1EPK12BIT_STRING_sPP12ByteArray_st(ptr noundef %109, ptr noundef %110)
          to label %113 unwind label %56

113:                                              ; preds = %111
  store i32 %112, ptr %10, align 4, !tbaa !37
  %114 = load i32, ptr %10, align 4, !tbaa !37
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %119

116:                                              ; preds = %113
  %117 = load i32, ptr %10, align 4, !tbaa !37
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 356, i32 noundef %117)
          to label %118 unwind label %56

118:                                              ; preds = %116
  br label %157

119:                                              ; preds = %113
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  br label %138

122:                                              ; preds = %105
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.X509Tbs, ptr %124, i32 0, i32 2
  %126 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %127 unwind label %56

127:                                              ; preds = %123
  %128 = invoke i32 @asn_BITSTRING2ba(ptr noundef %125, ptr noundef %126)
          to label %129 unwind label %56

129:                                              ; preds = %127
  store i32 %128, ptr %10, align 4, !tbaa !37
  %130 = load i32, ptr %10, align 4, !tbaa !37
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %135

132:                                              ; preds = %129
  %133 = load i32, ptr %10, align 4, !tbaa !37
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 359, i32 noundef %133)
          to label %134 unwind label %56

134:                                              ; preds = %132
  br label %157

135:                                              ; preds = %129
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137, %121
  %139 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %140 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %141 unwind label %56

141:                                              ; preds = %138
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = invoke noundef ptr @_ZNK7UapkiNS4Cert7CerItem7getSpkiEv(ptr noundef nonnull align 8 dereferenceable(401) %142)
          to label %144 unwind label %56

144:                                              ; preds = %141
  %145 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %146 unwind label %56

146:                                              ; preds = %144
  %147 = invoke noundef i32 @_ZN7UapkiNS6Verify15verifySignatureEPKcPK12ByteArray_stbS5_S5_(ptr noundef %139, ptr noundef %140, i1 noundef zeroext false, ptr noundef %143, ptr noundef %145)
          to label %148 unwind label %56

148:                                              ; preds = %146
  store i32 %147, ptr %10, align 4, !tbaa !37
  %149 = load i32, ptr %10, align 4, !tbaa !37
  switch i32 %149, label %154 [
    i32 0, label %150
    i32 3, label %152
  ]

150:                                              ; preds = %148
  %151 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 15
  store i32 5, ptr %151, align 8, !tbaa !13
  br label %156

152:                                              ; preds = %148
  %153 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 15
  store i32 3, ptr %153, align 8, !tbaa !13
  br label %156

154:                                              ; preds = %148
  %155 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %18, i32 0, i32 15
  store i32 2, ptr %155, align 8, !tbaa !13
  br label %156

156:                                              ; preds = %154, %152, %150
  br label %157

157:                                              ; preds = %156, %134, %118, %93, %79, %47
  %158 = invoke ptr @get_X509Tbs_desc()
          to label %159 unwind label %56

159:                                              ; preds = %157
  %160 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @asn_free(ptr noundef %158, ptr noundef %160)
          to label %161 unwind label %56

161:                                              ; preds = %159
  %162 = load i32, ptr %10, align 4, !tbaa !37
  store i32 %162, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #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 4, ptr %10) #4
  br label %165

163:                                              ; preds = %56, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %164

164:                                              ; preds = %163, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %167

165:                                              ; preds = %161, %32, %26
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %166 = load i32, ptr %4, align 4
  ret i32 %166

167:                                              ; preds = %164
  %168 = load ptr, ptr %12, align 8
  %169 = load i32, ptr %13, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

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

declare ptr @get_X509Tbs_desc() #1

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

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

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

declare noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #1

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

declare zeroext i1 @oid_is_parent(ptr noundef, ptr noundef) #1

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

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

declare noundef i32 @_ZN7UapkiNS6Verify15verifySignatureEPKcPK12ByteArray_stbS5_S5_(ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef) #1

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !31, i64 224}
!14 = !{!"_ZTSN7UapkiNS3Crl7CrlItemE", !15, i64 0, !17, i64 40, !20, i64 72, !21, i64 76, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !19, i64 112, !19, i64 120, !22, i64 128, !6, i64 152, !6, i64 160, !6, i64 168, !26, i64 176, !31, i64 224, !32, i64 232, !6, i64 256, !36, i64 264}
!15 = !{!"_ZTSSt5mutex", !16, i64 0}
!16 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !19, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN7UapkiNS3Crl4TypeE", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN7UapkiNS3Crl7CrlItem4UrisE", !27, i64 0, !27, i64 24}
!27 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSN7UapkiNS4Cert12VerifyStatusE", !7, i64 0}
!32 = !{!"_ZTSSt6vectorIPN7UapkiNS9OtherHashESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSN7UapkiNS3Crl7CrlItem9ActualityE", !7, i64 0}
!37 = !{!20, !20, i64 0}
!38 = !{!14, !6, i64 80}
!39 = !{!40, !6, i64 0}
!40 = !{!"_ZTS7X509Tbs", !41, i64 0, !44, i64 40, !46, i64 88, !42, i64 128}
!41 = !{!"_ZTS3ANY", !6, i64 0, !20, i64 8, !42, i64 16}
!42 = !{!"_ZTS16asn_struct_ctx_s", !43, i64 0, !43, i64 2, !20, i64 4, !6, i64 8, !19, i64 16}
!43 = !{!"short", !7, i64 0}
!44 = !{!"_ZTS19AlgorithmIdentifier", !45, i64 0, !6, i64 16, !42, i64 24}
!45 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !20, i64 8}
!46 = !{!"_ZTS12BIT_STRING_s", !6, i64 0, !20, i64 8, !20, i64 12, !42, i64 16}
!47 = !{!40, !20, i64 8}


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

%"class.std::lock_guard" = type { ptr }
%"class.UapkiNS::SmartBA" = 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] }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@OID_DSTU4145_WITH_DSTU7564 = external local_unnamed_addr global ptr, align 8
@OID_DSTU4145_WITH_GOST3411 = external local_unnamed_addr global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS3Crl7CrlItem6verifyEPKNS_4Cert7CerItemEb(ptr noundef nonnull align 8 dereferenceable(268) %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::lock_guard", align 8
  %5 = alloca %"class.UapkiNS::SmartBA", align 8
  %6 = alloca %"class.UapkiNS::SmartBA", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(40) %0)
  %8 = getelementptr inbounds i8, ptr %0, i64 224
  %9 = load i32, ptr %8, align 8
  %10 = icmp ult i32 %9, 2
  %or.cond.not = select i1 %2, i1 true, i1 %10
  br i1 %or.cond.not, label %11, label %71

11:                                               ; preds = %3
  store i32 1, ptr %8, align 8, !tbaa !5
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %71, label %12

12:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  %13 = invoke ptr @get_X509Tbs_desc()
          to label %14 unwind label %20

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 80
  %16 = load ptr, ptr %15, align 8, !tbaa !32
  %17 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %13, ptr noundef %16)
          to label %18 unwind label %20

18:                                               ; preds = %14
  %.not30 = icmp eq ptr %17, null
  br i1 %.not30, label %19, label %22

19:                                               ; preds = %18
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 345, i32 noundef 4145, ptr noundef null)
          to label %67 unwind label %20

20:                                               ; preds = %69, %67, %58, %57, %52, %51, %46, %41, %36, %35, %31, %30, %22, %19, %14, %12
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %21

22:                                               ; preds = %18
  %23 = load ptr, ptr %17, align 8, !tbaa !33
  %24 = getelementptr inbounds i8, ptr %17, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !41
  %26 = sext i32 %25 to i64
  %27 = invoke ptr @ba_alloc_from_uint8(ptr noundef %23, i64 noundef %26)
          to label %28 unwind label %20

28:                                               ; preds = %22
  %29 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %27)
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 348, i32 noundef 4097, ptr noundef null)
          to label %67 unwind label %20

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %17, i64 40
  %33 = invoke noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %32, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %34 unwind label %20

34:                                               ; preds = %31
  %.not31 = icmp eq i32 %33, 0
  br i1 %.not31, label %36, label %35

35:                                               ; preds = %34
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 351, i32 noundef %33)
          to label %67 unwind label %20

36:                                               ; preds = %34
  %37 = load ptr, ptr @OID_DSTU4145_WITH_DSTU7564, align 8, !tbaa !42
  %38 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  %39 = invoke zeroext i1 @oid_is_parent(ptr noundef %37, ptr noundef %38)
          to label %40 unwind label %20

40:                                               ; preds = %36
  br i1 %39, label %46, label %41

41:                                               ; preds = %40
  %42 = load ptr, ptr @OID_DSTU4145_WITH_GOST3411, align 8, !tbaa !42
  %43 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  %44 = invoke zeroext i1 @oid_is_parent(ptr noundef %42, ptr noundef %43)
          to label %45 unwind label %20

45:                                               ; preds = %41
  br i1 %44, label %46, label %52

46:                                               ; preds = %40, %45
  %47 = getelementptr inbounds i8, ptr %17, i64 88
  %48 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %49 = invoke noundef i32 @_ZN7UapkiNS4Util27bitStringEncapOctetFromAsn1EPK12BIT_STRING_sPP12ByteArray_st(ptr noundef nonnull %47, ptr noundef %48)
          to label %50 unwind label %20

50:                                               ; preds = %46
  %.not33 = icmp eq i32 %49, 0
  br i1 %.not33, label %58, label %51

51:                                               ; preds = %50
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 356, i32 noundef %49)
          to label %67 unwind label %20

52:                                               ; preds = %45
  %53 = getelementptr inbounds i8, ptr %17, i64 88
  %54 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %55 = invoke i32 @asn_BITSTRING2ba(ptr noundef nonnull %53, ptr noundef %54)
          to label %56 unwind label %20

56:                                               ; preds = %52
  %.not32 = icmp eq i32 %55, 0
  br i1 %.not32, label %58, label %57

57:                                               ; preds = %56
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 359, i32 noundef %55)
          to label %67 unwind label %20

58:                                               ; preds = %56, %50
  %59 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  %60 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %61 = call noundef ptr @_ZNK7UapkiNS4Cert7CerItem7getSpkiEv(ptr noundef nonnull align 8 dereferenceable(401) %1)
  %62 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %63 = invoke noundef i32 @_ZN7UapkiNS6Verify15verifySignatureEPKcPK12ByteArray_stbS5_S5_(ptr noundef %59, ptr noundef %60, i1 noundef zeroext false, ptr noundef %61, ptr noundef %62)
          to label %64 unwind label %20

64:                                               ; preds = %58
  switch i32 %63, label %66 [
    i32 0, label %.sink.split
    i32 3, label %65
  ]

65:                                               ; preds = %64
  br label %.sink.split

66:                                               ; preds = %64
  br label %.sink.split

.sink.split:                                      ; preds = %64, %66, %65
  %.sink = phi i32 [ 3, %65 ], [ 2, %66 ], [ 5, %64 ]
  %.023.ph = phi i32 [ 3, %65 ], [ %63, %66 ], [ %63, %64 ]
  store i32 %.sink, ptr %8, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %.sink.split, %57, %51, %35, %30, %19
  %.023 = phi i32 [ %33, %35 ], [ %49, %51 ], [ %55, %57 ], [ 4097, %30 ], [ 4145, %19 ], [ %.023.ph, %.sink.split ]
  %68 = invoke ptr @get_X509Tbs_desc()
          to label %69 unwind label %20

69:                                               ; preds = %67
  invoke void @asn_free(ptr noundef %68, ptr noundef %17)
          to label %70 unwind label %20

70:                                               ; preds = %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %71

71:                                               ; preds = %11, %3, %70
  %.0 = phi i32 [ %.023, %70 ], [ 0, %3 ], [ 0, %11 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret i32 %.0
}

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

declare ptr @get_X509Tbs_desc() local_unnamed_addr #1

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

; 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 #0 align 2

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

declare noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

declare zeroext i1 @oid_is_parent(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

declare noundef i32 @_ZN7UapkiNS6Verify15verifySignatureEPKcPK12ByteArray_stbS5_S5_(ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

attributes #0 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !26, i64 224}
!6 = !{!"_ZTSN7UapkiNS3Crl7CrlItemE", !7, i64 0, !11, i64 40, !15, i64 72, !16, i64 76, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !14, i64 112, !14, i64 120, !17, i64 128, !13, i64 152, !13, i64 160, !13, i64 168, !21, i64 176, !26, i64 224, !27, i64 232, !13, i64 256, !31, i64 264}
!7 = !{!"_ZTSSt5mutex", !8, i64 0}
!8 = !{!"_ZTSSt12__mutex_base", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !14, i64 8, !9, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!"long", !9, i64 0}
!15 = !{!"int", !9, i64 0}
!16 = !{!"_ZTSN7UapkiNS3Crl4TypeE", !9, i64 0}
!17 = !{!"_ZTSSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!21 = !{!"_ZTSN7UapkiNS3Crl7CrlItem4UrisE", !22, i64 0, !22, i64 24}
!22 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!26 = !{!"_ZTSN7UapkiNS4Cert12VerifyStatusE", !9, i64 0}
!27 = !{!"_ZTSSt6vectorIPN7UapkiNS9OtherHashESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!31 = !{!"_ZTSN7UapkiNS3Crl7CrlItem9ActualityE", !9, i64 0}
!32 = !{!6, !13, i64 80}
!33 = !{!34, !13, i64 0}
!34 = !{!"_ZTS7X509Tbs", !35, i64 0, !38, i64 40, !40, i64 88, !36, i64 128}
!35 = !{!"_ZTS3ANY", !13, i64 0, !15, i64 8, !36, i64 16}
!36 = !{!"_ZTS16asn_struct_ctx_s", !37, i64 0, !37, i64 2, !15, i64 4, !13, i64 8, !14, i64 16}
!37 = !{!"short", !9, i64 0}
!38 = !{!"_ZTS19AlgorithmIdentifier", !39, i64 0, !13, i64 16, !36, i64 24}
!39 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !13, i64 0, !15, i64 8}
!40 = !{!"_ZTS12BIT_STRING_s", !13, i64 0, !15, i64 8, !15, i64 12, !36, i64 16}
!41 = !{!34, !15, i64 8}
!42 = !{!13, !13, i64 0}


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