val paddingExtension_count (#rrel: _) (#rel: _) (input: LL.slice rrel rel) (pos: U32.t) : HST.Stack U32.t
  (requires (fun h -> LL.valid paddingExtension_parser h input pos))
  (ensures (fun h res h' ->
    let x = LL.contents paddingExtension_parser h input pos in
    let pos' = LL.get_valid_pos paddingExtension_parser h input pos in
    B.modifies B.loc_none h h' /\
    U32.v res == L.length x /\
    U32.v pos' == U32.v pos + 2 + (U32.v res `FStar.Mul.op_Star` 1) /\
    LL.valid_list zeroByte_parser h input (pos `U32.add` 2ul) pos' /\
    LL.contents_list zeroByte_parser h input (pos `U32.add` 2ul) pos' == x
  ))
val paddingExtension_count (#rrel: _) (#rel: _) (input: LL.slice rrel rel) (pos: U32.t) : HST.Stack U32.t
  (requires (fun h -> LL.valid paddingExtension_parser h input pos))
  (ensures (fun h res h' ->
    let x = LL.contents paddingExtension_parser h input pos in
    let pos' = LL.get_valid_pos paddingExtension_parser h input pos in
    B.modifies B.loc_none h h' /\
    U32.v res == L.length x /\
    U32.v pos' == U32.v pos + 2 + (U32.v res `FStar.Mul.op_Star` 1) /\
    LL.valid_list zeroByte_parser h input (pos `U32.add` 2ul) pos' /\
    LL.contents_list zeroByte_parser h input (pos `U32.add` 2ul) pos' == x
  ))
let paddingExtension_count #_ #_ input pos = LL.vlarray_list_length 0 65535 zeroByte_serializer 0 65535 input pos
module MiTLS.Parsers.PaddingExtension

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

private let pre : squash (LP.vldata_vlarray_precond 0 65535 zeroByte_parser 0 65535 == true) = _ by (FStar.Tactics.trefl ())

let paddingExtension_parser =
  LP.parse_vlarray 0 65535 zeroByte_serializer 0 65535 ()

let paddingExtension_serializer =
  LP.serialize_vlarray 0 65535 zeroByte_serializer 0 65535 ()

let paddingExtension_bytesize (x:paddingExtension) : GTot nat = Seq.length (paddingExtension_serializer x)

let paddingExtension_bytesize_eq x = ()

let paddingExtension_parser32 =
  LS.parse32_vlarray 0 0ul 65535 65535ul zeroByte_serializer zeroByte_parser32 0 65535 ()

let paddingExtension_serializer32 =
  LS.serialize32_vlarray 0 65535 #_ #_ #_ #zeroByte_serializer zeroByte_serializer32 0 65535 ()

let paddingExtension_size32 =
  [@inline_let] let _ = assert_norm (LP.vldata_vlarray_precond 0 65535 zeroByte_parser 0 65535 == true) in
  LSZ.size32_vlarray 0 65535 zeroByte_serializer 0 65535 () 2ul 1ul

let paddingExtension_validator =
 LL.validate_vlarray 0 65535 zeroByte_serializer zeroByte_validator 0 65535 () 2ul

let paddingExtension_jumper =
 LL.jump_vlarray 0 65535 zeroByte_serializer 0 65535 () 2ul

let _ : squash (paddingExtension == LL.vlarray zeroByte 0 65535) = _ by (FStar.Tactics.trefl ())

let finalize_paddingExtension #_ #_ sl pos pos' =
  LL.finalize_vlarray 0 65535 zeroByte_serializer 0 65535 sl pos pos'
/
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.fsti.checked FStar.List.Tot.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked FStar.Bytes.fsti.checked
MiTLS.Parsers.PaddingExtension.fst
input: LowParse.Slice.slice rrel rel -> pos: FStar.UInt32.t
  -> FStar.HyperStack.ST.Stack FStar.UInt32.t
LowParse.Slice.srel LowParse.Bytes.byte LowParse.Slice.slice FStar.UInt32.t LowParse.Low.Array.vlarray_list_length MiTLS.Parsers.ZeroByte.zeroByte_parser_kind MiTLS.Parsers.ZeroByte.zeroByte MiTLS.Parsers.ZeroByte.zeroByte_parser MiTLS.Parsers.ZeroByte.zeroByte_serializer
let paddingExtension_count #_ #_ input pos =
  
LL.vlarray_list_length 0 65535 zeroByte_serializer 0 65535 input pos