val poly_pre:VSig.vale_pre dom
let poly_pre : VSig.vale_pre dom =
  fun (c:V.va_code)
    (ctx_b:b64)
    (inp_b:b64)
    (len:uint64)
    (finish:uint64)
    (va_s0:V.va_state) ->
      PO.va_req_Poly1305 c va_s0 IA.win
        (as_vale_buffer ctx_b) (as_vale_buffer inp_b) (UInt64.v len) (UInt64.v finish)
val poly_pre:VSig.vale_pre dom
let poly_pre:VSig.vale_pre dom =
fun (c: V.va_code) (ctx_b: b64) (inp_b: b64) (len: uint64) (finish: uint64) (va_s0: V.va_state) ->
  PO.va_req_Poly1305 c
    va_s0
    IA.win
    (as_vale_buffer ctx_b)
    (as_vale_buffer inp_b)
    (UInt64.v len)
    (UInt64.v finish)
Vale.Stdcalls.X64.Poly.fsti.checked
Vale.X64.State.fsti.checked Vale.X64.MemoryAdapters.fsti.checked Vale.X64.Memory.fsti.checked Vale.X64.Machine_s.fst.checked Vale.X64.Decls.fsti.checked Vale.Poly1305.X64.fsti.checked Vale.Poly1305.Math.fsti.checked Vale.Interop.X64.fsti.checked Vale.Interop.Base.fst.checked Vale.Interop.Assumptions.fst.checked Vale.Def.Types_s.fst.checked Vale.AsLowStar.Wrapper.fsti.checked Vale.AsLowStar.ValeSig.fst.checked Vale.AsLowStar.MemoryHelpers.fsti.checked Vale.AsLowStar.LowStarSig.fst.checked prims.fst.checked LowStar.ImmutableBuffer.fst.checked LowStar.BufferView.Down.fsti.checked LowStar.Buffer.fst.checked FStar.UInt64.fsti.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Mul.fst.checked FStar.List.fst.checked FStar.HyperStack.ST.fsti.checked FStar.HyperStack.fst.checked
Vale.Stdcalls.X64.Poly.fsti
Vale.X64.Decls.va_code Vale.Stdcalls.X64.Poly.b64 Vale.Stdcalls.X64.Poly.uint64 Vale.X64.Decls.va_state Vale.Poly1305.X64.va_req_Poly1305 Vale.Interop.Assumptions.win Vale.X64.MemoryAdapters.as_vale_buffer Vale.Arch.HeapTypes_s.TUInt8 Vale.Arch.HeapTypes_s.TUInt64 FStar.UInt64.v Prims.prop
module Vale.Stdcalls.X64.Poly
open FStar.Mul

val z3rlimit_hack (x:nat) : squash (x < x + x + 1)
#reset-options "--z3rlimit 50"

open FStar.HyperStack.ST
module HS = FStar.HyperStack
module B = LowStar.Buffer
module IB = LowStar.ImmutableBuffer
module DV = LowStar.BufferView.Down
open Vale.Def.Types_s

open Vale.Interop.Base
module IX64 = Vale.Interop.X64
module VSig = Vale.AsLowStar.ValeSig
module LSig = Vale.AsLowStar.LowStarSig
module ME = Vale.X64.Memory
module V = Vale.X64.Decls
module IA = Vale.Interop.Assumptions
module W = Vale.AsLowStar.Wrapper
open Vale.X64.MemoryAdapters
module VS = Vale.X64.State
module MS = Vale.X64.Machine_s

module PO = Vale.Poly1305.X64
open Vale.Poly1305.Math

let uint64 = UInt64.t

(* A little utility to trigger normalization in types *)
noextract
let as_t (#a:Type) (x:normal a) : a = x
noextract
let as_normal_t (#a:Type) (x:a) : normal a = x

[@__reduce__] noextract
let b64 = buf_t TUInt8 TUInt64
[@__reduce__] noextract
let t64_mod = TD_Buffer TUInt8 TUInt64 ({modified=true; strict_disjointness=false; taint=MS.Public})
[@__reduce__] noextract
let t64_no_mod = TD_Buffer TUInt8 TUInt64 ({modified=false; strict_disjointness=false; taint=MS.Public})
[@__reduce__] noextract
let tuint64 = TD_Base TUInt64

[@__reduce__] noextract
let dom: IX64.arity_ok_stdcall td =
  let y = [t64_mod; t64_no_mod; tuint64; tuint64] in
  assert_norm (List.length y = 4);
  y

(* Need to rearrange the order of arguments *)
[@__reduce__] noextract
val poly_pre:VSig.vale_pre dom
Vale.AsLowStar.ValeSig.vale_pre Vale.Stdcalls.X64.Poly.dom