val accessor_addm_payload_addm_payload':LL.accessor gaccessor_addm_payload_addm_payload'
val accessor_addm_payload_addm_payload':LL.accessor gaccessor_addm_payload_addm_payload'
let accessor_addm_payload_addm_payload' : LL.accessor gaccessor_addm_payload_addm_payload' = synth_addm_payload_inverse (); synth_addm_payload_injective (); synth_addm_payload_recip_inverse (); LL.accessor_synth addm_payload'_parser synth_addm_payload synth_addm_payload_recip ()
module Zeta.Formats.Aux.Addm_payload

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

type addm_payload' = ((record & slot_id) & slot_id)

inline_for_extraction let synth_addm_payload (x: addm_payload') : addm_payload =
  match x with ((addm_r,addm_s),addm_s2) -> {
    addm_r = addm_r;
    addm_s = addm_s;
    addm_s2 = addm_s2;
  }

inline_for_extraction let synth_addm_payload_recip (x: addm_payload) : addm_payload' = ((x.addm_r,x.addm_s),x.addm_s2)

let synth_addm_payload_recip_inverse () : Lemma (LP.synth_inverse synth_addm_payload_recip synth_addm_payload) = ()

let synth_addm_payload_injective () : Lemma (LP.synth_injective synth_addm_payload) =
  LP.synth_inverse_synth_injective synth_addm_payload_recip synth_addm_payload;
  synth_addm_payload_recip_inverse ()

let synth_addm_payload_inverse () : Lemma (LP.synth_inverse synth_addm_payload synth_addm_payload_recip) =
  assert_norm (LP.synth_inverse synth_addm_payload synth_addm_payload_recip)

let synth_addm_payload_recip_injective () : Lemma (LP.synth_injective synth_addm_payload_recip) =
  synth_addm_payload_recip_inverse ();
  LP.synth_inverse_synth_injective synth_addm_payload synth_addm_payload_recip

noextract let addm_payload'_parser : LP.parser _ addm_payload' = ((record_parser `LP.nondep_then` slot_id_parser) `LP.nondep_then` slot_id_parser)

noextract let addm_payload'_parser_kind = LP.get_parser_kind addm_payload'_parser

let addm_payload_parser =
  synth_addm_payload_injective ();
  assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind);
  addm_payload'_parser `LP.parse_synth` synth_addm_payload

noextract let addm_payload'_serializer : LP.serializer addm_payload'_parser = ((record_serializer `LP.serialize_nondep_then` slot_id_serializer) `LP.serialize_nondep_then` slot_id_serializer)

let addm_payload_serializer =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = synth_addm_payload_inverse () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LP.serialize_synth _ synth_addm_payload addm_payload'_serializer synth_addm_payload_recip ()

let addm_payload_bytesize (x:addm_payload) : GTot nat = Seq.length (addm_payload_serializer x)

let addm_payload_bytesize_eq x = ()

inline_for_extraction let addm_payload'_size32 : LSZ.size32 addm_payload'_serializer = ((record_size32 `LSZ.size32_nondep_then` slot_id_size32) `LSZ.size32_nondep_then` slot_id_size32)

let addm_payload_size32 =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = synth_addm_payload_inverse () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LSZ.size32_synth _ synth_addm_payload _ addm_payload'_size32 synth_addm_payload_recip (fun x -> synth_addm_payload_recip x) ()

inline_for_extraction let addm_payload'_validator : LL.validator addm_payload'_parser = ((record_validator `LL.validate_nondep_then` slot_id_validator) `LL.validate_nondep_then` slot_id_validator)

let addm_payload_validator =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LL.validate_synth addm_payload'_validator synth_addm_payload ()

inline_for_extraction let addm_payload'_jumper : LL.jumper addm_payload'_parser = ((record_jumper `LL.jump_nondep_then` slot_id_jumper) `LL.jump_nondep_then` slot_id_jumper)

let addm_payload_jumper =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LL.jump_synth addm_payload'_jumper synth_addm_payload ()

inline_for_extraction let addm_payload'_reader : LL.leaf_reader addm_payload'_parser = (LL.read_nondep_then (record_jumper `LL.jump_nondep_then` slot_id_jumper) (LL.read_nondep_then record_jumper record_reader slot_id_reader) slot_id_reader)

let addm_payload_reader =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LL.read_synth _ synth_addm_payload (fun x -> synth_addm_payload x) addm_payload'_reader ()

inline_for_extraction let addm_payload'_lserializer : LL.serializer32 addm_payload'_serializer = ((record_lserializer `LL.serialize32_nondep_then` slot_id_lserializer) `LL.serialize32_nondep_then` slot_id_lserializer)

let addm_payload_lserializer =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = synth_addm_payload_inverse () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LL.serialize32_synth addm_payload'_lserializer synth_addm_payload synth_addm_payload_recip (fun x -> synth_addm_payload_recip x) ()

let addm_payload_bytesize_eqn x =
  [@inline_let] let _ = synth_addm_payload_injective () in
  [@inline_let] let _ = synth_addm_payload_inverse () in
  [@inline_let] let _ = assert_norm (addm_payload_parser_kind == addm_payload'_parser_kind) in
  LP.serialize_synth_eq _ synth_addm_payload addm_payload'_serializer synth_addm_payload_recip () x;
LP.length_serialize_nondep_then record_serializer slot_id_serializer x.addm_r x.addm_s;
LP.length_serialize_nondep_then (record_serializer `LP.serialize_nondep_then` slot_id_serializer) slot_id_serializer (x.addm_r, x.addm_s) x.addm_s2;
  (record_bytesize_eq (x.addm_r));
  (slot_id_bytesize_eq (x.addm_s));
  (slot_id_bytesize_eq (x.addm_s2));
  assert(addm_payload_bytesize x == Seq.length (LP.serialize record_serializer x.addm_r) + Seq.length (LP.serialize slot_id_serializer x.addm_s) + Seq.length (LP.serialize slot_id_serializer x.addm_s2))

let gaccessor'_addm_payload_addm_r : LL.gaccessor addm_payload'_parser record_parser _ = (LL.gaccessor_then_fst (LL.gaccessor_then_fst (LL.gaccessor_id addm_payload'_parser)))

let gaccessor'_addm_payload_addm_s : LL.gaccessor addm_payload'_parser slot_id_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_then_fst (LL.gaccessor_id addm_payload'_parser)))

let gaccessor'_addm_payload_addm_s2 : LL.gaccessor addm_payload'_parser slot_id_parser _ = (LL.gaccessor_then_snd (LL.gaccessor_id addm_payload'_parser))

inline_for_extraction noextract let accessor'_addm_payload_addm_r : LL.accessor gaccessor'_addm_payload_addm_r = (LL.accessor_then_fst (LL.accessor_then_fst (LL.accessor_id addm_payload'_parser)))

inline_for_extraction noextract let accessor'_addm_payload_addm_s : LL.accessor gaccessor'_addm_payload_addm_s = (LL.accessor_then_snd (LL.accessor_then_fst (LL.accessor_id addm_payload'_parser)) record_jumper)

inline_for_extraction noextract let accessor'_addm_payload_addm_s2 : LL.accessor gaccessor'_addm_payload_addm_s2 = (LL.accessor_then_snd (LL.accessor_id addm_payload'_parser) (record_jumper `LL.jump_nondep_then` slot_id_jumper))

noextract let clens_addm_payload_addm_payload' : LL.clens addm_payload addm_payload' = synth_addm_payload_recip_inverse (); synth_addm_payload_recip_injective (); LL.clens_synth synth_addm_payload_recip synth_addm_payload

let gaccessor_addm_payload_addm_payload' : LL.gaccessor addm_payload_parser addm_payload'_parser clens_addm_payload_addm_payload' = synth_addm_payload_inverse (); synth_addm_payload_injective (); synth_addm_payload_recip_inverse (); LL.gaccessor_synth addm_payload'_parser synth_addm_payload synth_addm_payload_recip ()
/
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.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
Zeta.Formats.Aux.Addm_payload.fst
LowParse.Low.Base.accessor Zeta.Formats.Aux.Addm_payload.gaccessor_addm_payload_addm_payload'
LowParse.Low.Combinators.accessor_synth LowParse.Spec.Combinators.and_then_kind Zeta.Formats.Aux.Record.record_parser_kind Zeta.Formats.Aux.Slot_id.slot_id_parser_kind Zeta.Formats.Aux.Addm_payload.addm_payload' Zeta.Formats.Aux.Addm_payload.addm_payload Zeta.Formats.Aux.Addm_payload.addm_payload'_parser Zeta.Formats.Aux.Addm_payload.synth_addm_payload Zeta.Formats.Aux.Addm_payload.synth_addm_payload_recip Prims.unit Zeta.Formats.Aux.Addm_payload.synth_addm_payload_recip_inverse Zeta.Formats.Aux.Addm_payload.synth_addm_payload_injective Zeta.Formats.Aux.Addm_payload.synth_addm_payload_inverse
let accessor_addm_payload_addm_payload':LL.accessor gaccessor_addm_payload_addm_payload' =
  
synth_addm_payload_inverse ();
synth_addm_payload_injective ();
synth_addm_payload_recip_inverse ();
LL.accessor_synth addm_payload'_parser synth_addm_payload synth_addm_payload_recip ()