val serialize32_eCCurveType_key:LS.serializer32 serialize_eCCurveType_key
val serialize32_eCCurveType_key:LS.serializer32 serialize_eCCurveType_key
let serialize32_eCCurveType_key : LS.serializer32 serialize_eCCurveType_key =
  FStar.Tactics.synth_by_tactic (LS.serialize32_enum_key_gen_tac
    eCCurveType_repr_serializer32 eCCurveType_enum)
module MiTLS.Parsers.ECCurveType

(* 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"

[@LT.Norm] inline_for_extraction let eCCurveType_enum : LP.enum eCCurveType U8.t =
  [@inline_let] let e = [
    Explicit_prime, 1z;
    Explicit_char2, 2z;
    Named_curve, 3z;
  ] in
  [@inline_let] let _ =
    assert_norm (L.noRepeats (LP.list_map fst e))
  in
  [@inline_let] let _ = 
    assert_norm (L.noRepeats (LP.list_map snd e))
  in e

noextract let eCCurveType_repr_parser = LPI.parse_u8

noextract let eCCurveType_repr_serializer = LPI.serialize_u8

inline_for_extraction noextract let eCCurveType_repr_parser32 = LS.parse32_u8

inline_for_extraction noextract let eCCurveType_repr_serializer32 = LS.serialize32_u8

inline_for_extraction noextract let eCCurveType_repr_size32 = LSZ.size32_u8

inline_for_extraction noextract let eCCurveType_repr_validator = (LL.validate_u8 ())

inline_for_extraction noextract let eCCurveType_repr_jumper = LL.jump_u8

inline_for_extraction noextract let eCCurveType_repr_reader = LL.read_u8

inline_for_extraction noextract let eCCurveType_repr_writer = LL.write_u8

inline_for_extraction let synth_eCCurveType (x: LP.enum_key eCCurveType_enum) : Tot eCCurveType = x

inline_for_extraction let synth_eCCurveType_inv (x: eCCurveType) : Tot (LP.enum_key eCCurveType_enum) =
  [@inline_let] let _ : squash (LP.list_mem x (LP.list_map fst eCCurveType_enum)) =
    _ by (LP.synth_maybe_enum_key_inv_unknown_tac x)
  in
  x

let lemma_synth_eCCurveType_inj () : Lemma
  (LP.synth_injective synth_eCCurveType) = ()

let lemma_synth_eCCurveType_inv () : Lemma
  (LP.synth_inverse synth_eCCurveType synth_eCCurveType_inv) = ()

noextract let parse_eCCurveType_key : LP.parser _ (LP.enum_key eCCurveType_enum) =
  LP.parse_enum_key eCCurveType_repr_parser eCCurveType_enum

noextract let serialize_eCCurveType_key : LP.serializer parse_eCCurveType_key =
  LP.serialize_enum_key eCCurveType_repr_parser eCCurveType_repr_serializer eCCurveType_enum

noextract let eCCurveType_parser : LP.parser _ eCCurveType =
  lemma_synth_eCCurveType_inj ();
  parse_eCCurveType_key `LP.parse_synth` synth_eCCurveType

noextract let eCCurveType_serializer : LP.serializer eCCurveType_parser =
  lemma_synth_eCCurveType_inj ();
  lemma_synth_eCCurveType_inv ();
  LP.serialize_synth _ synth_eCCurveType serialize_eCCurveType_key synth_eCCurveType_inv ()

let eCCurveType_bytesize (x:eCCurveType) : GTot nat = Seq.length (eCCurveType_serializer x)

let eCCurveType_bytesize_eq x = ()

let parse32_eCCurveType_key : LS.parser32 parse_eCCurveType_key =
  FStar.Tactics.synth_by_tactic (LS.parse32_enum_key_tac eCCurveType_repr_parser32 eCCurveType_enum)

let eCCurveType_parser32 : LS.parser32 eCCurveType_parser =
  lemma_synth_eCCurveType_inj ();
  LS.parse32_synth _ synth_eCCurveType (fun x->synth_eCCurveType x) parse32_eCCurveType_key ()
/
prims.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.Tactics.fst.checked FStar.Seq.fst.checked FStar.Pervasives.Native.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.ECCurveType.fst
LowParse.SLow.Base.serializer32 MiTLS.Parsers.ECCurveType.serialize_eCCurveType_key
LowParse.SLow.Enum.serialize32_enum_key_gen LowParse.Spec.Int.parse_u8_kind MiTLS.Parsers.ECCurveType.eCCurveType FStar.UInt8.t LowParse.Spec.Int.parse_u8 LowParse.Spec.Int.serialize_u8 MiTLS.Parsers.ECCurveType.eCCurveType_repr_serializer32 MiTLS.Parsers.ECCurveType.eCCurveType_enum LowParse.Spec.Combinators.parse_filter_kind LowParse.Spec.Enum.enum_key MiTLS.Parsers.ECCurveType.parse_eCCurveType_key MiTLS.Parsers.ECCurveType.serialize_eCCurveType_key LowParse.Spec.Enum.enum_repr_of_key_cons' LowParse.Spec.Enum.enum_tail' LowParse.Spec.Enum.enum_repr_of_key_cons_nil'
let serialize32_eCCurveType_key:LS.serializer32 serialize_eCCurveType_key =
  
FStar.Tactics.synth_by_tactic (LS.serialize32_enum_key_gen_tac eCCurveType_repr_serializer32
      eCCurveType_enum)