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

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

%"class.UapkiNS::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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = 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.TBSCertListAlt = type { ptr, %struct.AlgorithmIdentifier, %struct.Name, %struct.PKIXTime, %struct.PKIXTime, %struct.ANY, ptr, %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.Name = type { i32, %"union.Name::Name_u", %struct.asn_struct_ctx_s }
%"union.Name::Name_u" = type { %struct.RDNSequence }
%struct.RDNSequence = type { %struct.anon, %struct.asn_struct_ctx_s }
%struct.anon = type { ptr, i32, i32, ptr }
%struct.PKIXTime = type { i32, %"union.PKIXTime::PKIXTime_u", %struct.asn_struct_ctx_s }
%"union.PKIXTime::PKIXTime_u" = type { %struct.OCTET_STRING }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%"struct.UapkiNS::Crl::RevokedCertOffset" = type { i64, i64 }
%struct.RevokedCertificate = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.PKIXTime, ptr, %struct.asn_struct_ctx_s }

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK7UapkiNS3Crl7CrlItem17parsedRevokedCertEmPP12ByteArray_stRmRNS_9CrlReasonES5_(ptr noundef nonnull align 8 dereferenceable(268) %0, i64 noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #2 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8
  %23 = load i64, ptr %9, align 8, !tbaa !9
  %24 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %22, i32 0, i32 10
  %25 = call noundef i64 @_ZNKSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  %26 = icmp uge i64 %23, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %6
  store i32 4101, ptr %7, align 4
  br label %109

28:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %29 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %22, i32 0, i32 5
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.TBSCertListAlt, ptr %30, i32 0, i32 5
  %32 = getelementptr inbounds %struct.ANY, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !34
  %34 = getelementptr inbounds %"class.UapkiNS::Crl::CrlItem", ptr %22, i32 0, i32 10
  %35 = load i64, ptr %9, align 8, !tbaa !9
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %35) #4
  %37 = getelementptr inbounds %"struct.UapkiNS::Crl::RevokedCertOffset", ptr %36, i32 0, i32 0
  %38 = load i64, ptr %37, align 8, !tbaa !45
  %39 = getelementptr inbounds i8, ptr %33, i64 %38
  store ptr %39, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = call noundef i32 @_ZN7UapkiNS4Util16decodeAsn1HeaderEPKhmRjRmS4_(ptr noundef %40, i64 noundef 6, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %28
  store i32 4145, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %108

44:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %45 = call ptr @get_RevokedCertificate_desc()
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = load i64, ptr %16, align 8, !tbaa !9
  %48 = load i64, ptr %17, align 8, !tbaa !9
  %49 = add i64 %47, %48
  %50 = call ptr @asn_decode_with_alloc(ptr noundef %45, ptr noundef %46, i64 noundef %49)
  store ptr %50, ptr %20, align 8, !tbaa !5
  %51 = load ptr, ptr %20, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %44
  store i32 4145, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %107

54:                                               ; preds = %44
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %55, align 8, !tbaa !9
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %56, align 8, !tbaa !9
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 -1, ptr %57, align 4, !tbaa !48
  br label %58

58:                                               ; preds = %54
  %59 = load ptr, ptr %20, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.RevokedCertificate, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = call i32 @asn_INTEGER2ba(ptr noundef %60, ptr noundef %61)
  store i32 %62, ptr %19, align 4, !tbaa !47
  %63 = load i32, ptr %19, align 4, !tbaa !47
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %67

65:                                               ; preds = %58
  %66 = load i32, ptr %19, align 4, !tbaa !47
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 420, i32 noundef %66)
  br label %103

67:                                               ; preds = %58
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.RevokedCertificate, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = call noundef i32 @_ZN7UapkiNS4Util16pkixTimeFromAsn1EPK8PKIXTimeRm(ptr noundef %72, ptr noundef nonnull align 8 dereferenceable(8) %73)
  store i32 %74, ptr %19, align 4, !tbaa !47
  %75 = load i32, ptr %19, align 4, !tbaa !47
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %79

77:                                               ; preds = %70
  %78 = load i32, ptr %19, align 4, !tbaa !47
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 421, i32 noundef %78)
  br label %103

79:                                               ; preds = %70
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.RevokedCertificate, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !50
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %102

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !47
  %87 = load ptr, ptr %20, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.RevokedCertificate, ptr %87, i32 0, i32 2
  %89 = load ptr, ptr %88, align 8, !tbaa !50
  %90 = call noundef i32 @_ZN7UapkiNS15ExtensionHelper12getCrlReasonEPK10ExtensionsRj(ptr noundef %89, ptr noundef nonnull align 4 dereferenceable(4) %21)
  store i32 %90, ptr %19, align 4, !tbaa !47
  %91 = load i32, ptr %19, align 4, !tbaa !47
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %96

93:                                               ; preds = %86
  %94 = load i32, ptr %21, align 4, !tbaa !47
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %94, ptr %95, align 4, !tbaa !48
  br label %96

96:                                               ; preds = %93, %86
  store i32 0, ptr %19, align 4, !tbaa !47
  %97 = load ptr, ptr %20, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.RevokedCertificate, ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !50
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = call noundef i32 @_ZN7UapkiNS15ExtensionHelper20getCrlInvalidityDateEPK10ExtensionsRm(ptr noundef %99, ptr noundef nonnull align 8 dereferenceable(8) %100)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %102

102:                                              ; preds = %96, %81
  br label %103

103:                                              ; preds = %102, %77, %65
  %104 = call ptr @get_RevokedCertificate_desc()
  %105 = load ptr, ptr %20, align 8, !tbaa !5
  call void @asn_free(ptr noundef %104, ptr noundef %105)
  %106 = load i32, ptr %19, align 4, !tbaa !47
  store i32 %106, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %107

107:                                              ; preds = %103, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %108

108:                                              ; preds = %107, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %109

109:                                              ; preds = %108, %27
  %110 = load i32, ptr %7, align 4
  ret i32 %110
}

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

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

declare noundef i32 @_ZN7UapkiNS4Util16decodeAsn1HeaderEPKhmRjRmS4_(ptr noundef, i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

declare ptr @get_RevokedCertificate_desc() #0

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

declare noundef i32 @_ZN7UapkiNS4Util16pkixTimeFromAsn1EPK8PKIXTimeRm(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #0

declare noundef i32 @_ZN7UapkiNS15ExtensionHelper12getCrlReasonEPK10ExtensionsRj(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #0

declare noundef i32 @_ZN7UapkiNS15ExtensionHelper20getCrlInvalidityDateEPK10ExtensionsRm(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 88}
!12 = !{!"_ZTSN7UapkiNS3Crl7CrlItemE", !13, i64 0, !15, i64 40, !17, i64 72, !18, i64 76, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 120, !19, i64 128, !6, i64 152, !6, i64 160, !6, i64 168, !23, i64 176, !28, i64 224, !29, i64 232, !6, i64 256, !33, i64 264}
!13 = !{!"_ZTSSt5mutex", !14, i64 0}
!14 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !10, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN7UapkiNS3Crl4TypeE", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSN7UapkiNS3Crl7CrlItem4UrisE", !24, i64 0, !24, i64 24}
!24 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSN7UapkiNS4Cert12VerifyStatusE", !7, i64 0}
!29 = !{!"_ZTSSt6vectorIPN7UapkiNS9OtherHashESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS9OtherHashESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSN7UapkiNS3Crl7CrlItem9ActualityE", !7, i64 0}
!34 = !{!35, !6, i64 280}
!35 = !{!"_ZTS14TBSCertListAlt", !6, i64 0, !36, i64 8, !40, i64 56, !42, i64 136, !42, i64 208, !44, i64 280, !6, i64 320, !38, i64 328}
!36 = !{!"_ZTS19AlgorithmIdentifier", !37, i64 0, !6, i64 16, !38, i64 24}
!37 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !17, i64 8}
!38 = !{!"_ZTS16asn_struct_ctx_s", !39, i64 0, !39, i64 2, !17, i64 4, !6, i64 8, !10, i64 16}
!39 = !{!"short", !7, i64 0}
!40 = !{!"_ZTS4Name", !41, i64 0, !7, i64 8, !38, i64 56}
!41 = !{!"_ZTS7Name_PR", !7, i64 0}
!42 = !{!"_ZTS8PKIXTime", !43, i64 0, !7, i64 8, !38, i64 48}
!43 = !{!"_ZTS11PKIXTime_PR", !7, i64 0}
!44 = !{!"_ZTS3ANY", !6, i64 0, !17, i64 8, !38, i64 16}
!45 = !{!46, !10, i64 0}
!46 = !{!"_ZTSN7UapkiNS3Crl17RevokedCertOffsetE", !10, i64 0, !10, i64 8}
!47 = !{!17, !17, i64 0}
!48 = !{!49, !49, i64 0}
!49 = !{!"_ZTSN7UapkiNS9CrlReasonE", !7, i64 0}
!50 = !{!51, !6, i64 88}
!51 = !{!"_ZTS18RevokedCertificate", !37, i64 0, !42, i64 16, !6, i64 88, !38, i64 96}


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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK7UapkiNS3Crl7CrlItem17parsedRevokedCertEmPP12ByteArray_stRmRNS_9CrlReasonES5_(ptr noundef nonnull align 8 dereferenceable(268) %0, i64 noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) local_unnamed_addr #2 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  %12 = tail call noundef i64 @_ZNKSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %.not = icmp ugt i64 %12, %1
  br i1 %.not, label %13, label %49

13:                                               ; preds = %6
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 280
  %17 = load ptr, ptr %16, align 8, !tbaa !32
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN7UapkiNS3Crl17RevokedCertOffsetESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %1) #4
  %19 = load i64, ptr %18, align 8, !tbaa !43
  %20 = getelementptr inbounds i8, ptr %17, i64 %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %21 = call noundef i32 @_ZN7UapkiNS4Util16decodeAsn1HeaderEPKhmRjRmS4_(ptr noundef %20, i64 noundef 6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %.not31 = icmp eq i32 %21, 0
  br i1 %.not31, label %48, label %22

22:                                               ; preds = %13
  %23 = call ptr @get_RevokedCertificate_desc()
  %24 = load i64, ptr %8, align 8, !tbaa !45
  %25 = load i64, ptr %9, align 8, !tbaa !45
  %26 = add i64 %25, %24
  %27 = call ptr @asn_decode_with_alloc(ptr noundef %23, ptr noundef %20, i64 noundef %26)
  %.not32 = icmp eq ptr %27, null
  br i1 %.not32, label %48, label %28

28:                                               ; preds = %22
  store i64 0, ptr %5, align 8, !tbaa !45
  store i64 0, ptr %3, align 8, !tbaa !45
  store i32 -1, ptr %4, align 4, !tbaa !46
  %29 = call i32 @asn_INTEGER2ba(ptr noundef nonnull %27, ptr noundef %2)
  %.not33 = icmp eq i32 %29, 0
  br i1 %.not33, label %31, label %30

30:                                               ; preds = %28
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 420, i32 noundef %29)
  br label %46

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %27, i64 16
  %33 = call noundef i32 @_ZN7UapkiNS4Util16pkixTimeFromAsn1EPK8PKIXTimeRm(ptr noundef nonnull %32, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %.not34 = icmp eq i32 %33, 0
  br i1 %.not34, label %35, label %34

34:                                               ; preds = %31
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 421, i32 noundef %33)
  br label %46

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %27, i64 88
  %37 = load ptr, ptr %36, align 8, !tbaa !48
  %.not35 = icmp eq ptr %37, null
  br i1 %.not35, label %46, label %38

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 0, ptr %10, align 4, !tbaa !50
  %39 = call noundef i32 @_ZN7UapkiNS15ExtensionHelper12getCrlReasonEPK10ExtensionsRj(ptr noundef nonnull %37, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %38
  %42 = load i32, ptr %10, align 4, !tbaa !50
  store i32 %42, ptr %4, align 4, !tbaa !46
  br label %43

43:                                               ; preds = %41, %38
  %44 = load ptr, ptr %36, align 8, !tbaa !48
  %45 = call noundef i32 @_ZN7UapkiNS15ExtensionHelper20getCrlInvalidityDateEPK10ExtensionsRm(ptr noundef %44, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  br label %46

46:                                               ; preds = %35, %43, %34, %30
  %.025 = phi i32 [ %29, %30 ], [ %33, %34 ], [ 0, %43 ], [ 0, %35 ]
  %47 = call ptr @get_RevokedCertificate_desc()
  call void @asn_free(ptr noundef %47, ptr noundef nonnull %27)
  br label %48

48:                                               ; preds = %46, %22, %13
  %.1 = phi i32 [ 4145, %13 ], [ %.025, %46 ], [ 4145, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %49

49:                                               ; preds = %6, %48
  %.2 = phi i32 [ %.1, %48 ], [ 4101, %6 ]
  ret i32 %.2
}

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

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

declare noundef i32 @_ZN7UapkiNS4Util16decodeAsn1HeaderEPKhmRjRmS4_(ptr noundef, i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

declare ptr @get_RevokedCertificate_desc() local_unnamed_addr #0

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

declare noundef i32 @_ZN7UapkiNS4Util16pkixTimeFromAsn1EPK8PKIXTimeRm(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

declare noundef i32 @_ZN7UapkiNS15ExtensionHelper12getCrlReasonEPK10ExtensionsRj(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

declare noundef i32 @_ZN7UapkiNS15ExtensionHelper20getCrlInvalidityDateEPK10ExtensionsRm(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 88}
!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 = !{!33, !13, i64 280}
!33 = !{!"_ZTS14TBSCertListAlt", !13, i64 0, !34, i64 8, !38, i64 56, !40, i64 136, !40, i64 208, !42, i64 280, !13, i64 320, !36, i64 328}
!34 = !{!"_ZTS19AlgorithmIdentifier", !35, i64 0, !13, i64 16, !36, i64 24}
!35 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !13, i64 0, !15, i64 8}
!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 = !{!"_ZTS4Name", !39, i64 0, !9, i64 8, !36, i64 56}
!39 = !{!"_ZTS7Name_PR", !9, i64 0}
!40 = !{!"_ZTS8PKIXTime", !41, i64 0, !9, i64 8, !36, i64 48}
!41 = !{!"_ZTS11PKIXTime_PR", !9, i64 0}
!42 = !{!"_ZTS3ANY", !13, i64 0, !15, i64 8, !36, i64 16}
!43 = !{!44, !14, i64 0}
!44 = !{!"_ZTSN7UapkiNS3Crl17RevokedCertOffsetE", !14, i64 0, !14, i64 8}
!45 = !{!14, !14, i64 0}
!46 = !{!47, !47, i64 0}
!47 = !{!"_ZTSN7UapkiNS9CrlReasonE", !9, i64 0}
!48 = !{!49, !13, i64 88}
!49 = !{!"_ZTS18RevokedCertificate", !35, i64 0, !40, i64 16, !13, i64 88, !36, i64 96}
!50 = !{!15, !15, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass