val key_of_certificateStatusRequest (x: certificateStatusRequest)
    : LP.maybe_enum_key certificateStatusType_enum
val key_of_certificateStatusRequest (x: certificateStatusRequest)
    : LP.maybe_enum_key certificateStatusType_enum
let key_of_certificateStatusRequest (x:certificateStatusRequest) : LP.maybe_enum_key certificateStatusType_enum =
  match x with
  | Csr_ocsp _ -> LP.Known (known_certificateStatusType_as_enum_key Ocsp)
  | Csr_Unknown_certificateStatusType v _ -> LP.Unknown (unknown_certificateStatusType_as_enum_key v)
module MiTLS.Parsers.CertificateStatusRequest

(* This file has been automatically generated by EverParse. *)
open FStar.Bytes
module U8 = FStar.UInt8
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module LP = LowParse.Spec
module LT = LowParse.TacLib
module LS = LowParse.SLow
module LSZ = LowParse.SLow
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

#reset-options "--using_facts_from '* -FStar.Tactics -FStar.Reflection' --z3rlimit 16 --z3cliopt smt.arith.nl=false --max_fuel 2 --max_ifuel 2"

friend MiTLS.Parsers.CertificateStatusType

// Need high Z3 limits for large sum types
#set-options "--z3rlimit 60"

inline_for_extraction unfold let known_certificateStatusType_as_enum_key
  (x: certificateStatusType { norm [delta; zeta; iota; primops] (LP.list_mem x (LP.list_map fst certificateStatusType_enum)) == true })
  : LP.enum_key certificateStatusType_enum =
  [@inline_let] let _ = norm_spec [delta; zeta; iota; primops] (LP.list_mem x (LP.list_map fst certificateStatusType_enum)) in x

inline_for_extraction let unknown_certificateStatusType_as_enum_key (r:certificateStatusType_repr) : Pure (LP.unknown_enum_repr certificateStatusType_enum)
  (requires known_certificateStatusType_repr r == false) (ensures fun _ -> True) =
  [@inline_let] let _ = assert_norm(LP.list_mem r (LP.list_map snd certificateStatusType_enum) == known_certificateStatusType_repr r) in r

inline_for_extraction let unknown_enum_repr_certificateStatusType_as_repr (r:LP.unknown_enum_repr certificateStatusType_enum) : Pure certificateStatusType_repr
  (requires True) (ensures fun r -> known_certificateStatusType_repr r == false) =
  [@inline_let] let _ = assert_norm(LP.list_mem r (LP.list_map snd certificateStatusType_enum) == known_certificateStatusType_repr r) in r
/
prims.fst.checked MiTLS.Parsers.CertificateStatusType.fst.checked LowStar.Buffer.fst.checked LowParse.TacLib.fst.checked LowParse.Spec.AllIntegers.fst.checked LowParse.Spec.fst.checked LowParse.SLow.fst.checked LowParse.Low.fst.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.UInt16.fsti.checked FStar.Tactics.Effect.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Bytes.fsti.checked
MiTLS.Parsers.CertificateStatusRequest.fst
x: MiTLS.Parsers.CertificateStatusRequest.certificateStatusRequest
  -> LowParse.Spec.Enum.maybe_enum_key MiTLS.Parsers.CertificateStatusType.certificateStatusType_enum

MiTLS.Parsers.CertificateStatusRequest.certificateStatusRequest MiTLS.Parsers.OCSPStatusRequest.oCSPStatusRequest LowParse.Spec.Enum.Known MiTLS.Parsers.CertificateStatusType.certificateStatusType FStar.UInt8.t MiTLS.Parsers.CertificateStatusType.certificateStatusType_enum MiTLS.Parsers.CertificateStatusRequest.known_certificateStatusType_as_enum_key MiTLS.Parsers.CertificateStatusType.Ocsp MiTLS.Parsers.CertificateStatusType.certificateStatusType_repr Prims.b2t Prims.op_Negation MiTLS.Parsers.CertificateStatusType.known_certificateStatusType_repr Prims.squash Prims.l_False LowParse.Spec.Enum.Unknown MiTLS.Parsers.CertificateStatusRequest.unknown_certificateStatusType_as_enum_key LowParse.Spec.Enum.maybe_enum_key
let key_of_certificateStatusRequest (x: certificateStatusRequest)
    : LP.maybe_enum_key certificateStatusType_enum =
  
match x with
| Csr_ocsp _ -> LP.Known (known_certificateStatusType_as_enum_key Ocsp)
| Csr_Unknown_certificateStatusType v _ -> LP.Unknown (unknown_certificateStatusType_as_enum_key v)