val synth_u30 (msb: varint_msb_t) (lsb: bounded_integer 3) : Tot U62.t
val synth_u30 (msb: varint_msb_t) (lsb: bounded_integer 3) : Tot U62.t
let synth_u30
  (msb: varint_msb_t)
  (lsb: bounded_integer 3)
: Tot U62.t
= [@inline_let] let _ =
    assert_norm (pow2 8 == 256);
    assert (pow2 62 == U64.v U62.bound);
    assert_norm (pow2 24 == 16777216)
   in
   (msb `U64.mul` 16777216uL) `U64.add` Cast.uint32_to_uint64 lsb
module QUIC.Spec.VarInt

module U64 = FStar.UInt64
module LP = LowParse.Spec.BoundedInt // for bounded_int32

open LowParse.Spec.BoundedInt
open LowParse.Spec.BitFields

inline_for_extraction
let parse_varint_payload_kind = {
  parser_kind_low = 0;
  parser_kind_high = Some 7;
  parser_kind_subkind = Some ParserStrong;
  parser_kind_metadata = None;
}

module Cast = FStar.Int.Cast
module U62 = QUIC.UInt62
module U64 = FStar.UInt64
module U32 = FStar.UInt32
module U16 = FStar.UInt16
module U8 = FStar.UInt8

inline_for_extraction
let varint_msb_t = (x: U64.t { U64.v x < 64 })

#push-options "--z3rlimit 32"

inline_for_extraction
let synth_u14
  (msb: varint_msb_t)
  (lsb: U8.t)
: Tot U62.t
= [@inline_let] let _ =
    assert_norm (pow2 8 == 256);
    assert (pow2 62 == U64.v U62.bound)
  in
  (msb `U64.mul` 256uL) `U64.add` Cast.uint8_to_uint64 lsb  

let synth_u14_injective
  (msb: varint_msb_t)
: Lemma
  (synth_injective (synth_u14 msb))
  [SMTPat (synth_injective (synth_u14 msb))]
= ()
/
QUIC.UInt62.fst.checked prims.fst.checked LowParse.Spec.BoundedInt.fsti.checked LowParse.Spec.BitFields.fst.checked LowParse.BitFields.fsti.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.Int.Cast.fst.checked FStar.Classical.fsti.checked
QUIC.Spec.VarInt.fst
msb: QUIC.Spec.VarInt.varint_msb_t -> lsb: LowParse.Spec.BoundedInt.bounded_integer 3
  -> QUIC.UInt62.t
QUIC.Spec.VarInt.varint_msb_t LowParse.Spec.BoundedInt.bounded_integer FStar.UInt64.add FStar.UInt64.mul FStar.UInt64.__uint_to_t FStar.Int.Cast.uint32_to_uint64 Prims.unit FStar.Pervasives.assert_norm Prims.eq2 Prims.int Prims.pow2 Prims._assert Prims.l_or Prims.b2t Prims.op_GreaterThan FStar.UInt.size FStar.UInt64.n FStar.UInt64.v QUIC.UInt62.bound QUIC.UInt62.t
let synth_u30 (msb: varint_msb_t) (lsb: bounded_integer 3) : Tot U62.t =
  
[@@ inline_let ]let _ =
  assert_norm (pow2 8 == 256);
  assert (pow2 62 == U64.v U62.bound);
  assert_norm (pow2 24 == 16777216)
in
(msb `U64.mul` 16777216uL) `U64.add` (Cast.uint32_to_uint64 lsb)