val serverName_clens_tag:LL.clens serverName nameType
val serverName_clens_tag:LL.clens serverName nameType
let serverName_clens_tag : LL.clens serverName nameType = {
  LL.clens_cond = (fun _ -> True);
  LL.clens_get = (fun (x: serverName) -> tag_of_serverName x);
}
module MiTLS.Parsers.ServerName

(* 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.Base
module LS = LowParse.SLow.Base
module LSZ = LowParse.SLow.Base
module LPI = LowParse.Spec.AllIntegers
module LL = LowParse.Low.Base
module L = FStar.List.Tot
module B = LowStar.Buffer
module BY = FStar.Bytes
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST

open MiTLS.Parsers.NameType
open MiTLS.Parsers.UnknownName
open MiTLS.Parsers.HostName

type serverName =
  | Sni_host_name of hostName
  | Sni_Unknown_nameType: v:nameType_repr{not (known_nameType_repr v)} -> x:unknownName -> serverName

inline_for_extraction let tag_of_serverName (x:serverName) : nameType = match x with
  | Sni_host_name _ -> Host_name
  | Sni_Unknown_nameType v _ -> Unknown_nameType v

inline_for_extraction noextract let serverName_parser_kind = LP.strong_parser_kind 4 65538 None

noextract val serverName_parser: LP.parser serverName_parser_kind serverName

noextract val serverName_serializer: LP.serializer serverName_parser

noextract val serverName_bytesize (x:serverName) : GTot nat

noextract val serverName_bytesize_eq (x:serverName) : Lemma (serverName_bytesize x == Seq.length (LP.serialize serverName_serializer x))

val serverName_parser32: LS.parser32 serverName_parser

val serverName_serializer32: LS.serializer32 serverName_serializer

val serverName_size32: LSZ.size32 serverName_serializer

val serverName_validator: LL.validator serverName_parser

val serverName_jumper: LL.jumper serverName_parser

val lemma_valid_serverName_valid_nameType: #rrel: _ -> #rel: _ -> s:LL.slice rrel rel -> pos:U32.t -> h:HyperStack.mem -> Lemma
  (requires LL.valid serverName_parser h s pos)
  (ensures (LL.valid nameType_parser h s pos /\ LL.contents nameType_parser h s pos == tag_of_serverName (LL.contents serverName_parser h s pos)))
  [SMTPat (LL.valid serverName_parser h s pos)]
/
prims.fst.checked MiTLS.Parsers.UnknownName.fsti.checked MiTLS.Parsers.NameType.fsti.checked MiTLS.Parsers.HostName.fsti.checked LowStar.Buffer.fst.checked LowParse.Spec.Base.fsti.checked LowParse.Spec.AllIntegers.fst.checked LowParse.SLow.Base.fst.checked LowParse.Low.Base.fst.checked FStar.UInt8.fsti.checked FStar.UInt64.fsti.checked FStar.UInt32.fsti.checked FStar.UInt16.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.ServerName.fsti
LowParse.Low.Base.Spec.clens MiTLS.Parsers.ServerName.serverName MiTLS.Parsers.NameType.nameType
LowParse.Low.Base.Spec.Mkclens MiTLS.Parsers.ServerName.serverName MiTLS.Parsers.NameType.nameType Prims.l_True MiTLS.Parsers.ServerName.tag_of_serverName
let serverName_clens_tag:LL.clens serverName nameType =
  
{ LL.clens_cond = (fun _ -> True); LL.clens_get = (fun (x: serverName) -> tag_of_serverName x) }