val handshake12_m_certificate_gaccessor : LL.gaccessor handshake12_m_certificate_parser certificate12_parser handshake12_m_certificate_clens
val handshake12_m_certificate_gaccessor : LL.gaccessor handshake12_m_certificate_parser certificate12_parser handshake12_m_certificate_clens
let handshake12_m_certificate_gaccessor =
  LL.gaccessor_ext
    (LL.gaccessor_compose
      (LL.gaccessor_synth handshake12_m_certificate'_parser synth_handshake12_m_certificate synth_handshake12_m_certificate_recip ())
      (LL.gaccessor_bounded_vldata_strong_payload 0 16777215 certificate12_serializer)
    )
    handshake12_m_certificate_clens
    ()
module MiTLS.Parsers.Handshake12_m_certificate

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

let check_handshake12_m_certificate_bytesize x =
  [@inline_let] let _ = (certificate12_bytesize_eq (x)) in
  let l = certificate12_size32 x in
  0ul `U32.lte` l && l `U32.lte` 16777215ul

type handshake12_m_certificate' = LP.parse_bounded_vldata_strong_t 0 16777215 certificate12_serializer

inline_for_extraction let synth_handshake12_m_certificate (x: handshake12_m_certificate') : Tot handshake12_m_certificate =
  [@inline_let] let _ = (certificate12_bytesize_eq (x)) in x

inline_for_extraction let synth_handshake12_m_certificate_recip (x: handshake12_m_certificate) : Tot handshake12_m_certificate' =
  [@inline_let] let _ = (certificate12_bytesize_eq (x)) in x

noextract let handshake12_m_certificate'_parser : LP.parser _ handshake12_m_certificate' =
  LP.parse_bounded_vldata_strong 0 16777215 certificate12_serializer

let handshake12_m_certificate_parser = LP.parse_synth handshake12_m_certificate'_parser synth_handshake12_m_certificate

noextract let handshake12_m_certificate'_serializer : LP.serializer handshake12_m_certificate'_parser =
  LP.serialize_bounded_vldata_strong 0 16777215 certificate12_serializer

let handshake12_m_certificate_serializer = LP.serialize_synth _ synth_handshake12_m_certificate handshake12_m_certificate'_serializer synth_handshake12_m_certificate_recip ()

let handshake12_m_certificate_bytesize (x:handshake12_m_certificate) : GTot nat = Seq.length (handshake12_m_certificate_serializer x)

let handshake12_m_certificate_bytesize_eq x = ()

inline_for_extraction let handshake12_m_certificate'_parser32 : LS.parser32 handshake12_m_certificate'_parser =
  LS.parse32_bounded_vldata_strong 0 0ul 16777215 16777215ul certificate12_serializer certificate12_parser32

let handshake12_m_certificate_parser32 = LS.parse32_synth' _ synth_handshake12_m_certificate handshake12_m_certificate'_parser32 ()

inline_for_extraction noextract let handshake12_m_certificate'_serializer32 : LS.serializer32 handshake12_m_certificate'_serializer =
  LS.serialize32_bounded_vldata_strong 0 16777215 certificate12_serializer32

let handshake12_m_certificate_serializer32 = LS.serialize32_synth' _ synth_handshake12_m_certificate _ handshake12_m_certificate'_serializer32 synth_handshake12_m_certificate_recip ()

inline_for_extraction noextract let handshake12_m_certificate'_size32 : LSZ.size32 handshake12_m_certificate'_serializer =
  LSZ.size32_bounded_vldata_strong 0 16777215 certificate12_size32 3ul

let handshake12_m_certificate_size32 = LSZ.size32_synth' _ synth_handshake12_m_certificate _ handshake12_m_certificate'_size32 synth_handshake12_m_certificate_recip ()

inline_for_extraction let handshake12_m_certificate'_validator : LL.validator handshake12_m_certificate'_parser =
  LL.validate_bounded_vldata_strong 0 16777215 certificate12_serializer certificate12_validator ()

let handshake12_m_certificate_validator = LL.validate_synth handshake12_m_certificate'_validator synth_handshake12_m_certificate ()

inline_for_extraction let handshake12_m_certificate'_jumper : LL.jumper handshake12_m_certificate'_parser =
  LL.jump_bounded_vldata_strong 0 16777215 certificate12_serializer ()

let handshake12_m_certificate_jumper = LL.jump_synth handshake12_m_certificate'_jumper synth_handshake12_m_certificate ()

let handshake12_m_certificate_finalize #_ #_ input pos pos' =
  let h = HST.get () in
  [@inline_let] let _ =
    let x = LL.contents certificate12_parser h input (pos `U32.add` 3ul) in
    (certificate12_bytesize_eq (x))
  in
  LL.finalize_bounded_vldata_strong 0 16777215 certificate12_serializer input pos pos';
  let h = HST.get () in
  LL.valid_synth h handshake12_m_certificate'_parser synth_handshake12_m_certificate input 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.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.Handshake12_m_certificate.fst
LowParse.Low.Base.Spec.gaccessor MiTLS.Parsers.Handshake12_m_certificate.handshake12_m_certificate_parser
  MiTLS.Parsers.Certificate12.certificate12_parser
  MiTLS.Parsers.Handshake12_m_certificate.handshake12_m_certificate_clens
LowParse.Low.Base.Spec.gaccessor_ext LowParse.Spec.VLData.parse_bounded_vldata_strong_kind LowParse.Spec.BoundedInt.log256' MiTLS.Parsers.Certificate12.certificate12_parser_kind MiTLS.Parsers.Handshake12_m_certificate.handshake12_m_certificate LowParse.Spec.Combinators.parse_synth MiTLS.Parsers.Handshake12_m_certificate.handshake12_m_certificate' MiTLS.Parsers.Handshake12_m_certificate.handshake12_m_certificate'_parser MiTLS.Parsers.Handshake12_m_certificate.synth_handshake12_m_certificate MiTLS.Parsers.Certificate12.certificate12 MiTLS.Parsers.Certificate12.certificate12_parser LowParse.Low.Base.Spec.clens_compose LowParse.Low.Combinators.clens_synth MiTLS.Parsers.Handshake12_m_certificate.synth_handshake12_m_certificate_recip LowParse.Low.VLData.clens_bounded_vldata_strong_payload MiTLS.Parsers.Certificate12.certificate12_serializer LowParse.Low.Base.Spec.gaccessor_compose LowParse.Low.Combinators.gaccessor_synth LowParse.Low.VLData.gaccessor_bounded_vldata_strong_payload MiTLS.Parsers.Handshake12_m_certificate.handshake12_m_certificate_clens
let handshake12_m_certificate_gaccessor =
  
LL.gaccessor_ext (LL.gaccessor_compose (LL.gaccessor_synth handshake12_m_certificate'_parser
          synth_handshake12_m_certificate
          synth_handshake12_m_certificate_recip
          ())
      (LL.gaccessor_bounded_vldata_strong_payload 0 16777215 certificate12_serializer))
  handshake12_m_certificate_clens
  ()