val va_req_Fsqr2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (tmp_b inA_b dst_b: buffer64)
    : prop
let va_req_Fsqr2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fsqr2_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (adx_enabled /\
    bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 16 (va_get_mem_layout va_s0)
    Secret))
val va_req_Fsqr2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (tmp_b inA_b dst_b: buffer64)
    : prop
let va_req_Fsqr2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (tmp_b inA_b dst_b: buffer64)
    : prop =
(va_require_total va_b0 (va_code_Fsqr2_stdcall win) va_s0 /\ va_get_ok va_s0 /\
  (let tmp_in:(va_int_range 0 18446744073709551615) =
      (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0)
    in
    let inA_in:(va_int_range 0 18446744073709551615) =
      (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0)
    in
    let dst_in:(va_int_range 0 18446744073709551615) =
      (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0)
    in
    va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (adx_enabled /\ bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0)
      dst_in
      dst_b
      8
      (va_get_mem_layout va_s0)
      Secret /\
    Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0)
      inA_in
      inA_b
      8
      (va_get_mem_layout va_s0)
      Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0)
      tmp_in
      tmp_b
      16
      (va_get_mem_layout va_s0)
      Secret))
Vale.Curve25519.X64.FastWide.fsti.checked
Vale.X64.State.fsti.checked Vale.X64.Stack_i.fsti.checked Vale.X64.QuickCodes.fsti.checked Vale.X64.QuickCode.fst.checked Vale.X64.Memory.fsti.checked Vale.X64.Machine_s.fst.checked Vale.X64.InsStack.fsti.checked Vale.X64.InsMem.fsti.checked Vale.X64.InsBasic.fsti.checked Vale.X64.Flags.fsti.checked Vale.X64.Decls.fsti.checked Vale.X64.CPU_Features_s.fst.checked Vale.Def.Types_s.fst.checked Vale.Curve25519.Fast_defs.fst.checked Vale.Arch.Types.fsti.checked Vale.Arch.HeapImpl.fsti.checked prims.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked
Vale.Curve25519.X64.FastWide.fsti
Vale.X64.Decls.va_code Vale.X64.Decls.va_state Prims.bool Vale.X64.Memory.buffer64 Prims.l_and Vale.X64.Decls.va_require_total Vale.Curve25519.X64.FastWide.va_code_Fsqr2_stdcall Prims.b2t Vale.X64.Decls.va_get_ok Prims.eq2 Vale.Def.Words_s.nat64 Vale.X64.Decls.va_get_reg64 Vale.X64.Machine_s.rRsp Vale.X64.Stack_i.init_rsp Vale.X64.Decls.va_get_stack Vale.X64.Memory.is_initial_heap Vale.X64.Decls.va_get_mem_layout Vale.X64.Decls.va_get_mem Vale.X64.CPU_Features_s.adx_enabled Vale.X64.CPU_Features_s.bmi2_enabled Prims.l_or Vale.X64.Decls.buffers_disjoint Vale.X64.Decls.validDstAddrs64 Vale.Arch.HeapTypes_s.Secret Vale.X64.Decls.validSrcAddrs64 Vale.X64.Decls.va_int_range Vale.X64.Machine_s.rR8 Vale.X64.Machine_s.rRdx Vale.X64.Machine_s.rRsi Vale.X64.Machine_s.rRcx Vale.X64.Machine_s.rRdi Prims.prop
module Vale.Curve25519.X64.FastWide
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.Stack_i
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.InsMem
open Vale.X64.InsStack
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.Curve25519.Fast_defs
open Vale.X64.CPU_Features_s
//-- Fmul

val va_code_Fmul : va_dummy:unit -> Tot va_code

val va_codegen_success_Fmul : va_dummy:unit -> Tot va_pbool
let va_req_Fmul (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (inB_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fmul ()) va_s0 /\ va_get_ok va_s0 /\ (let (tmp_in:nat64) =
    va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let (dst_in:nat64) =
    va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64 rRcx va_s0 in adx_enabled /\
    bmi2_enabled /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 8 (va_get_mem_layout va_s0) Secret))
let va_ens_Fmul (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (inB_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fmul va_b0 va_s0 tmp_b inA_b dst_b inB_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
    va_get_ok va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) =
    va_get_reg64 rRcx va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in
    let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in d `op_Modulus` prime
    == va_mul_nat a b `op_Modulus` prime /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b
    (va_get_mem va_s0) (va_get_mem va_sM)) /\ va_state_eq va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR14 va_sM
    (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM
    (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRsi va_sM
    (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
    (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem
    va_sM va_s0))))))))))))))))))

val va_lemma_Fmul : va_b0:va_code -> va_s0:va_state -> tmp_b:buffer64 -> inA_b:buffer64 ->
  dst_b:buffer64 -> inB_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fmul ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let
    (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64 rRcx va_s0 in
    adx_enabled /\ bmi2_enabled /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0)
    (va_get_mem va_s0) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 8 (va_get_mem_layout va_s0) Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0
    in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64 rRcx va_s0
    in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in d `op_Modulus` prime
    == va_mul_nat a b `op_Modulus` prime /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b
    (va_get_mem va_s0) (va_get_mem va_sM)) /\ va_state_eq va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR14 va_sM
    (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM
    (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRsi va_sM
    (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
    (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem
    va_sM va_s0)))))))))))))))))))
[@ va_qattr]
let va_wp_Fmul (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) (va_s0:va_state)
  (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) =
    va_get_reg64 rRcx va_s0 in adx_enabled /\ bmi2_enabled /\ Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/
    dst_b == inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 8 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64)
    (va_x_rbx:nat64) (va_x_rcx:nat64) (va_x_rdx:nat64) (va_x_rdi:nat64) (va_x_rsi:nat64)
    (va_x_r8:nat64) (va_x_r9:nat64) (va_x_r10:nat64) (va_x_r11:nat64) (va_x_r13:nat64)
    (va_x_r14:nat64) (va_x_efl:Vale.X64.Flags.t) (va_x_heap0:vale_heap)
    (va_x_memLayout:vale_heap_layout) . let va_sM = va_upd_mem_layout va_x_memLayout
    (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags va_x_efl (va_upd_reg64 rR14 va_x_r14
    (va_upd_reg64 rR13 va_x_r13 (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10
    (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64 rR8 va_x_r8 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64
    rRdi va_x_rdi (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRcx va_x_rcx (va_upd_reg64 rRbx
    va_x_rbx (va_upd_reg64 rRax va_x_rax (va_upd_mem va_x_mem va_s0))))))))))))))) in va_get_ok
    va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64
    rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64
    rRcx va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in d `op_Modulus` prime
    == va_mul_nat a b `op_Modulus` prime /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b
    (va_get_mem va_s0) (va_get_mem va_sM)) ==> va_k va_sM (())))

val va_wpProof_Fmul : tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 -> inB_b:buffer64 ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fmul tmp_b inA_b dst_b inB_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fmul ()) ([va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11;
    va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi;
    va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_s0
    va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fmul (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) :
  (va_quickCode unit (va_code_Fmul ())) =
  (va_QProc (va_code_Fmul ()) ([va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64
    rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64
    rR8; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64
    rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fmul tmp_b inA_b dst_b inB_b) (va_wpProof_Fmul
    tmp_b inA_b dst_b inB_b))
//--
//-- Fmul_stdcall

val va_code_Fmul_stdcall : win:bool -> Tot va_code

val va_codegen_success_Fmul_stdcall : win:bool -> Tot va_pbool
let va_req_Fmul_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fmul_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else
    va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack
    va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (adx_enabled /\ bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b ==
    inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 8 (va_get_mem_layout va_s0) Secret))
let va_ens_Fmul_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fmul_stdcall va_b0 va_s0 win tmp_b inA_b dst_b inB_b /\ va_ensure_total va_b0 va_s0 va_sM
    va_fM /\ va_get_ok va_sM /\ (let (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in
    let (dst_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else
    va_get_reg64 rRdx va_s0) in let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in let a0 = Vale.X64.Decls.buffer64_read
    inA_b 0 (va_get_mem va_s0) in let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0)
    in let a2 = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in d `op_Modulus` prime
    == va_mul_nat a b `op_Modulus` prime /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b
    (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
    va_s0) /\ (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64
    rRdi va_sM == va_get_reg64 rRdi va_s0) /\ (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi
    va_s0) /\ (win ==> va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64
    rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14
    va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\
    (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15
    va_sM == va_get_reg64 rR15 va_s0) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\
    va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout
    va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM (va_update_reg64 rRdi va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
    (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem
    va_sM va_s0)))))))))))))))))))))))

val va_lemma_Fmul_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> tmp_b:buffer64 ->
  inA_b:buffer64 -> dst_b:buffer64 -> inB_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fmul_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else
    va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack
    va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (adx_enabled /\ bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b ==
    inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 8 (va_get_mem_layout va_s0) Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else
    va_get_reg64 rRcx va_s0) in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in
    let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in d `op_Modulus` prime
    == va_mul_nat a b `op_Modulus` prime /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b
    (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
    va_s0) /\ (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64
    rRdi va_sM == va_get_reg64 rRdi va_s0) /\ (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi
    va_s0) /\ (win ==> va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64
    rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14
    va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\
    (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15
    va_sM == va_get_reg64 rR15 va_s0) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\
    va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout
    va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM (va_update_reg64 rRdi va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
    (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem
    va_sM va_s0))))))))))))))))))))))))
[@ va_qattr]
let va_wp_Fmul_stdcall (win:bool) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (inB_b:buffer64) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64
    rRsi va_s0) in let (dst_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) in let (inB_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64
    rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (adx_enabled /\
    bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 8 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64)
    (va_x_rbx:nat64) (va_x_rcx:nat64) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_rdi:nat64)
    (va_x_rbp:nat64) (va_x_rsp:nat64) (va_x_r8:nat64) (va_x_r9:nat64) (va_x_r10:nat64)
    (va_x_r11:nat64) (va_x_r13:nat64) (va_x_r14:nat64) (va_x_r15:nat64) (va_x_efl:Vale.X64.Flags.t)
    (va_x_heap0:vale_heap) (va_x_memLayout:vale_heap_layout) (va_x_stack:vale_stack)
    (va_x_stackTaint:memtaint) . let va_sM = va_upd_stackTaint va_x_stackTaint (va_upd_stack
    va_x_stack (va_upd_mem_layout va_x_memLayout (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags
    va_x_efl (va_upd_reg64 rR15 va_x_r15 (va_upd_reg64 rR14 va_x_r14 (va_upd_reg64 rR13 va_x_r13
    (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10 (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64
    rR8 va_x_r8 (va_upd_reg64 rRsp va_x_rsp (va_upd_reg64 rRbp va_x_rbp (va_upd_reg64 rRdi va_x_rdi
    (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRcx va_x_rcx
    (va_upd_reg64 rRbx va_x_rbx (va_upd_reg64 rRax va_x_rax (va_upd_mem va_x_mem
    va_s0)))))))))))))))))))) in va_get_ok va_sM /\ (let (tmp_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64
    rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64
    rRdx va_s0) in let (inB_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64 rRcx va_s0) in let a0 =
    Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in d `op_Modulus` prime
    == va_mul_nat a b `op_Modulus` prime /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b
    (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
    va_s0) /\ (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64
    rRdi va_sM == va_get_reg64 rRdi va_s0) /\ (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi
    va_s0) /\ (win ==> va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64
    rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14
    va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\
    (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15
    va_sM == va_get_reg64 rR15 va_s0) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) ==>
    va_k va_sM (())))

val va_wpProof_Fmul_stdcall : win:bool -> tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 ->
  inB_b:buffer64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fmul_stdcall win tmp_b inA_b dst_b inB_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fmul_stdcall win) ([va_Mod_stackTaint;
    va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15;
    va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
    va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi;
    va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_s0
    va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fmul_stdcall (win:bool) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (inB_b:buffer64) : (va_quickCode unit (va_code_Fmul_stdcall win)) =
  (va_QProc (va_code_Fmul_stdcall win) ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13;
    va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp;
    va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
    va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fmul_stdcall win tmp_b inA_b dst_b
    inB_b) (va_wpProof_Fmul_stdcall win tmp_b inA_b dst_b inB_b))
//--
//-- Fmul2

val va_code_Fmul2 : va_dummy:unit -> Tot va_code

val va_codegen_success_Fmul2 : va_dummy:unit -> Tot va_pbool
let va_req_Fmul2 (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64)
  (dst_b:buffer64) (inB_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fmul2 ()) va_s0 /\ va_get_ok va_s0 /\ (let (tmp_in:nat64) =
    va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let (dst_in:nat64) =
    va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64 rRcx va_s0 in adx_enabled /\
    bmi2_enabled /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 16 (va_get_mem_layout va_s0) Secret))
let va_ens_Fmul2 (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64)
  (dst_b:buffer64) (inB_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fmul2 va_b0 va_s0 tmp_b inA_b dst_b inB_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
    va_get_ok va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) =
    va_get_reg64 rRcx va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in
    let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let a0' = Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let
    a1' = Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let b0' =
    Vale.X64.Decls.buffer64_read inB_b (0 + 4) (va_get_mem va_s0) in let b1' =
    Vale.X64.Decls.buffer64_read inB_b (1 + 4) (va_get_mem va_s0) in let b2' =
    Vale.X64.Decls.buffer64_read inB_b (2 + 4) (va_get_mem va_s0) in let b3' =
    Vale.X64.Decls.buffer64_read inB_b (3 + 4) (va_get_mem va_s0) in let a' =
    Vale.Curve25519.Fast_defs.pow2_four a0' a1' a2' a3' in let b' =
    Vale.Curve25519.Fast_defs.pow2_four b0' b1' b2' b3' in let d0 = Vale.X64.Decls.buffer64_read
    dst_b 0 (va_get_mem va_sM) in let d1 = Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM)
    in let d2 = Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d =
    Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d0' = Vale.X64.Decls.buffer64_read dst_b
    (0 + 4) (va_get_mem va_sM) in let d1' = Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem
    va_sM) in let d2' = Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a b
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' b' `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM)) /\
    va_state_eq va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags
    va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))

val va_lemma_Fmul2 : va_b0:va_code -> va_s0:va_state -> tmp_b:buffer64 -> inA_b:buffer64 ->
  dst_b:buffer64 -> inB_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fmul2 ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let
    (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64 rRcx va_s0 in
    adx_enabled /\ bmi2_enabled /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0)
    (va_get_mem va_s0) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 16 (va_get_mem_layout va_s0) Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0
    in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64 rRcx va_s0
    in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let a0' = Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let
    a1' = Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let b0' =
    Vale.X64.Decls.buffer64_read inB_b (0 + 4) (va_get_mem va_s0) in let b1' =
    Vale.X64.Decls.buffer64_read inB_b (1 + 4) (va_get_mem va_s0) in let b2' =
    Vale.X64.Decls.buffer64_read inB_b (2 + 4) (va_get_mem va_s0) in let b3' =
    Vale.X64.Decls.buffer64_read inB_b (3 + 4) (va_get_mem va_s0) in let a' =
    Vale.Curve25519.Fast_defs.pow2_four a0' a1' a2' a3' in let b' =
    Vale.Curve25519.Fast_defs.pow2_four b0' b1' b2' b3' in let d0 = Vale.X64.Decls.buffer64_read
    dst_b 0 (va_get_mem va_sM) in let d1 = Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM)
    in let d2 = Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d =
    Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d0' = Vale.X64.Decls.buffer64_read dst_b
    (0 + 4) (va_get_mem va_sM) in let d1' = Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem
    va_sM) in let d2' = Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a b
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' b' `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM)) /\
    va_state_eq va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags
    va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))
[@ va_qattr]
let va_wp_Fmul2 (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64)
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) =
    va_get_reg64 rRcx va_s0 in adx_enabled /\ bmi2_enabled /\ Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/
    dst_b == inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 16 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64)
    (va_x_rbx:nat64) (va_x_rcx:nat64) (va_x_rdx:nat64) (va_x_rdi:nat64) (va_x_rsi:nat64)
    (va_x_r8:nat64) (va_x_r9:nat64) (va_x_r10:nat64) (va_x_r11:nat64) (va_x_r13:nat64)
    (va_x_r14:nat64) (va_x_efl:Vale.X64.Flags.t) (va_x_heap0:vale_heap)
    (va_x_memLayout:vale_heap_layout) . let va_sM = va_upd_mem_layout va_x_memLayout
    (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags va_x_efl (va_upd_reg64 rR14 va_x_r14
    (va_upd_reg64 rR13 va_x_r13 (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10
    (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64 rR8 va_x_r8 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64
    rRdi va_x_rdi (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRcx va_x_rcx (va_upd_reg64 rRbx
    va_x_rbx (va_upd_reg64 rRax va_x_rax (va_upd_mem va_x_mem va_s0))))))))))))))) in va_get_ok
    va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64
    rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR15 va_s0 in let (inB_in:nat64) = va_get_reg64
    rRcx va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let a0' = Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let
    a1' = Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let b0' =
    Vale.X64.Decls.buffer64_read inB_b (0 + 4) (va_get_mem va_s0) in let b1' =
    Vale.X64.Decls.buffer64_read inB_b (1 + 4) (va_get_mem va_s0) in let b2' =
    Vale.X64.Decls.buffer64_read inB_b (2 + 4) (va_get_mem va_s0) in let b3' =
    Vale.X64.Decls.buffer64_read inB_b (3 + 4) (va_get_mem va_s0) in let a' =
    Vale.Curve25519.Fast_defs.pow2_four a0' a1' a2' a3' in let b' =
    Vale.Curve25519.Fast_defs.pow2_four b0' b1' b2' b3' in let d0 = Vale.X64.Decls.buffer64_read
    dst_b 0 (va_get_mem va_sM) in let d1 = Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM)
    in let d2 = Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d =
    Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d0' = Vale.X64.Decls.buffer64_read dst_b
    (0 + 4) (va_get_mem va_sM) in let d1' = Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem
    va_sM) in let d2' = Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a b
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' b' `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM)) ==> va_k
    va_sM (())))

val va_wpProof_Fmul2 : tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 -> inB_b:buffer64 ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fmul2 tmp_b inA_b dst_b inB_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fmul2 ()) ([va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11;
    va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi;
    va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_s0
    va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fmul2 (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) :
  (va_quickCode unit (va_code_Fmul2 ())) =
  (va_QProc (va_code_Fmul2 ()) ([va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags;
    va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
    va_Mod_reg64 rR8; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
    va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fmul2 tmp_b inA_b dst_b inB_b)
    (va_wpProof_Fmul2 tmp_b inA_b dst_b inB_b))
//--
//-- Fmul2_stdcall

val va_code_Fmul2_stdcall : win:bool -> Tot va_code

val va_codegen_success_Fmul2_stdcall : win:bool -> Tot va_pbool
let va_req_Fmul2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fmul2_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else
    va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack
    va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (adx_enabled /\ bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b ==
    inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 16 (va_get_mem_layout va_s0) Secret))
let va_ens_Fmul2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) (inB_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fmul2_stdcall va_b0 va_s0 win tmp_b inA_b dst_b inB_b /\ va_ensure_total va_b0 va_s0
    va_sM va_fM /\ va_get_ok va_sM /\ (let (tmp_in:(va_int_range 0 18446744073709551615)) = (if win
    then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in
    let (dst_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else
    va_get_reg64 rRdx va_s0) in let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in let a0 = Vale.X64.Decls.buffer64_read
    inA_b 0 (va_get_mem va_s0) in let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0)
    in let a2 = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let a0' = Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let
    a1' = Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let b0' =
    Vale.X64.Decls.buffer64_read inB_b (0 + 4) (va_get_mem va_s0) in let b1' =
    Vale.X64.Decls.buffer64_read inB_b (1 + 4) (va_get_mem va_s0) in let b2' =
    Vale.X64.Decls.buffer64_read inB_b (2 + 4) (va_get_mem va_s0) in let b3' =
    Vale.X64.Decls.buffer64_read inB_b (3 + 4) (va_get_mem va_s0) in let a' =
    Vale.Curve25519.Fast_defs.pow2_four a0' a1' a2' a3' in let b' =
    Vale.Curve25519.Fast_defs.pow2_four b0' b1' b2' b3' in let d0 = Vale.X64.Decls.buffer64_read
    dst_b 0 (va_get_mem va_sM) in let d1 = Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM)
    in let d2 = Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d =
    Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d0' = Vale.X64.Decls.buffer64_read dst_b
    (0 + 4) (va_get_mem va_sM) in let d1' = Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem
    va_sM) in let d2' = Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a b
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' b' `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\
    (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rRsp
    va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13
    va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64
    rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64
    rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==>
    va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (~win ==> va_get_reg64 rR14 va_sM ==
    va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\
    va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ va_state_eq va_sM (va_update_stackTaint
    va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM
    (va_update_flags va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64
    rR13 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM
    (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM
    (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))))))

val va_lemma_Fmul2_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> tmp_b:buffer64 ->
  inA_b:buffer64 -> dst_b:buffer64 -> inB_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fmul2_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else
    va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack
    va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (adx_enabled /\ bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b ==
    inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 16 (va_get_mem_layout va_s0) Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (inB_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else
    va_get_reg64 rRcx va_s0) in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in
    let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let a0' = Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let
    a1' = Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let b0' =
    Vale.X64.Decls.buffer64_read inB_b (0 + 4) (va_get_mem va_s0) in let b1' =
    Vale.X64.Decls.buffer64_read inB_b (1 + 4) (va_get_mem va_s0) in let b2' =
    Vale.X64.Decls.buffer64_read inB_b (2 + 4) (va_get_mem va_s0) in let b3' =
    Vale.X64.Decls.buffer64_read inB_b (3 + 4) (va_get_mem va_s0) in let a' =
    Vale.Curve25519.Fast_defs.pow2_four a0' a1' a2' a3' in let b' =
    Vale.Curve25519.Fast_defs.pow2_four b0' b1' b2' b3' in let d0 = Vale.X64.Decls.buffer64_read
    dst_b 0 (va_get_mem va_sM) in let d1 = Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM)
    in let d2 = Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d =
    Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d0' = Vale.X64.Decls.buffer64_read dst_b
    (0 + 4) (va_get_mem va_sM) in let d1' = Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem
    va_sM) in let d2' = Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a b
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' b' `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\
    (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rRsp
    va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13
    va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64
    rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64
    rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==>
    va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (~win ==> va_get_reg64 rR14 va_sM ==
    va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\
    va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ va_state_eq va_sM (va_update_stackTaint
    va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM
    (va_update_flags va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64
    rR13 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM
    (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM
    (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))))))
[@ va_qattr]
let va_wp_Fmul2_stdcall (win:bool) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (inB_b:buffer64) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64
    rRsi va_s0) in let (dst_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) in let (inB_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64
    rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (adx_enabled /\
    bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inB_b \/ dst_b == inB_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.buffers_disjoint tmp_b inB_b /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout
    va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0) inB_in inB_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in
    tmp_b 16 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64)
    (va_x_rbx:nat64) (va_x_rcx:nat64) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_rdi:nat64)
    (va_x_rbp:nat64) (va_x_rsp:nat64) (va_x_r8:nat64) (va_x_r9:nat64) (va_x_r10:nat64)
    (va_x_r11:nat64) (va_x_r13:nat64) (va_x_r14:nat64) (va_x_r15:nat64) (va_x_efl:Vale.X64.Flags.t)
    (va_x_heap0:vale_heap) (va_x_memLayout:vale_heap_layout) (va_x_stack:vale_stack)
    (va_x_stackTaint:memtaint) . let va_sM = va_upd_stackTaint va_x_stackTaint (va_upd_stack
    va_x_stack (va_upd_mem_layout va_x_memLayout (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags
    va_x_efl (va_upd_reg64 rR15 va_x_r15 (va_upd_reg64 rR14 va_x_r14 (va_upd_reg64 rR13 va_x_r13
    (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10 (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64
    rR8 va_x_r8 (va_upd_reg64 rRsp va_x_rsp (va_upd_reg64 rRbp va_x_rbp (va_upd_reg64 rRdi va_x_rdi
    (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRcx va_x_rcx
    (va_upd_reg64 rRbx va_x_rbx (va_upd_reg64 rRax va_x_rax (va_upd_mem va_x_mem
    va_s0)))))))))))))))))))) in va_get_ok va_sM /\ (let (tmp_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64
    rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64
    rRdx va_s0) in let (inB_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64 rRcx va_s0) in let a0 =
    Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let b0 =
    Vale.X64.Decls.buffer64_read inB_b 0 (va_get_mem va_s0) in let b1 =
    Vale.X64.Decls.buffer64_read inB_b 1 (va_get_mem va_s0) in let b2 =
    Vale.X64.Decls.buffer64_read inB_b 2 (va_get_mem va_s0) in let b3 =
    Vale.X64.Decls.buffer64_read inB_b 3 (va_get_mem va_s0) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let b = Vale.Curve25519.Fast_defs.pow2_four
    b0 b1 b2 b3 in let a0' = Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let
    a1' = Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let b0' =
    Vale.X64.Decls.buffer64_read inB_b (0 + 4) (va_get_mem va_s0) in let b1' =
    Vale.X64.Decls.buffer64_read inB_b (1 + 4) (va_get_mem va_s0) in let b2' =
    Vale.X64.Decls.buffer64_read inB_b (2 + 4) (va_get_mem va_s0) in let b3' =
    Vale.X64.Decls.buffer64_read inB_b (3 + 4) (va_get_mem va_s0) in let a' =
    Vale.Curve25519.Fast_defs.pow2_four a0' a1' a2' a3' in let b' =
    Vale.Curve25519.Fast_defs.pow2_four b0' b1' b2' b3' in let d0 = Vale.X64.Decls.buffer64_read
    dst_b 0 (va_get_mem va_sM) in let d1 = Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM)
    in let d2 = Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d =
    Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d0' = Vale.X64.Decls.buffer64_read dst_b
    (0 + 4) (va_get_mem va_sM) in let d1' = Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem
    va_sM) in let d2' = Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a b
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' b' `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\
    (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rRsp
    va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13
    va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64
    rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64
    rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==>
    va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (~win ==> va_get_reg64 rR14 va_sM ==
    va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\
    va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) ==> va_k va_sM (())))

val va_wpProof_Fmul2_stdcall : win:bool -> tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 ->
  inB_b:buffer64 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fmul2_stdcall win tmp_b inA_b dst_b inB_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fmul2_stdcall win)
    ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags;
    va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11; va_Mod_reg64 rR10;
    va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi;
    va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax;
    va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fmul2_stdcall (win:bool) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (inB_b:buffer64) : (va_quickCode unit (va_code_Fmul2_stdcall win)) =
  (va_QProc (va_code_Fmul2_stdcall win) ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13;
    va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp;
    va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
    va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fmul2_stdcall win tmp_b inA_b dst_b
    inB_b) (va_wpProof_Fmul2_stdcall win tmp_b inA_b dst_b inB_b))
//--
//-- Fsqr

val va_code_Fsqr : va_dummy:unit -> Tot va_code

val va_codegen_success_Fsqr : va_dummy:unit -> Tot va_pbool
let va_req_Fsqr (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  : prop =
  (va_require_total va_b0 (va_code_Fsqr ()) va_s0 /\ va_get_ok va_s0 /\ (let (tmp_in:nat64) =
    va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let (dst_in:nat64) =
    va_get_reg64 rR12 va_s0 in adx_enabled /\ bmi2_enabled /\ Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/
    dst_b == inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 8 (va_get_mem_layout va_s0)
    Secret))
let va_ens_Fsqr (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fsqr va_b0 va_s0 tmp_b inA_b dst_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
    va_get_ok va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR12 va_s0 in let a0 =
    Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let d = Vale.Curve25519.Fast_defs.pow2_four
    d0 d1 d2 d3 in d `op_Modulus` prime == va_mul_nat a a `op_Modulus` prime /\ va_get_reg64 rR12
    va_s0 == va_get_reg64 rR12 va_sM /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem
    va_s0) (va_get_mem va_sM)) /\ va_state_eq va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))

val va_lemma_Fsqr : va_b0:va_code -> va_s0:va_state -> tmp_b:buffer64 -> inA_b:buffer64 ->
  dst_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fsqr ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let
    (dst_in:nat64) = va_get_reg64 rR12 va_s0 in adx_enabled /\ bmi2_enabled /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 8 (va_get_mem_layout va_s0)
    Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0
    in let (dst_in:nat64) = va_get_reg64 rR12 va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b
    0 (va_get_mem va_s0) in let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let
    a2 = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let d = Vale.Curve25519.Fast_defs.pow2_four
    d0 d1 d2 d3 in d `op_Modulus` prime == va_mul_nat a a `op_Modulus` prime /\ va_get_reg64 rR12
    va_s0 == va_get_reg64 rR12 va_sM /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem
    va_s0) (va_get_mem va_sM)) /\ va_state_eq va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
[@ va_qattr]
let va_wp_Fsqr (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) (va_s0:va_state) (va_k:(va_state
  -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR12 va_s0 in adx_enabled /\
    bmi2_enabled /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 8 (va_get_mem_layout va_s0)
    Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64) (va_x_rbx:nat64) (va_x_rcx:nat64)
    (va_x_rdx:nat64) (va_x_rdi:nat64) (va_x_rsi:nat64) (va_x_r8:nat64) (va_x_r9:nat64)
    (va_x_r10:nat64) (va_x_r11:nat64) (va_x_r13:nat64) (va_x_r14:nat64) (va_x_r15:nat64)
    (va_x_efl:Vale.X64.Flags.t) (va_x_heap0:vale_heap) (va_x_memLayout:vale_heap_layout) . let
    va_sM = va_upd_mem_layout va_x_memLayout (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags
    va_x_efl (va_upd_reg64 rR15 va_x_r15 (va_upd_reg64 rR14 va_x_r14 (va_upd_reg64 rR13 va_x_r13
    (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10 (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64
    rR8 va_x_r8 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdi va_x_rdi (va_upd_reg64 rRdx va_x_rdx
    (va_upd_reg64 rRcx va_x_rcx (va_upd_reg64 rRbx va_x_rbx (va_upd_reg64 rRax va_x_rax (va_upd_mem
    va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi
    va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR12
    va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let d = Vale.Curve25519.Fast_defs.pow2_four
    d0 d1 d2 d3 in d `op_Modulus` prime == va_mul_nat a a `op_Modulus` prime /\ va_get_reg64 rR12
    va_s0 == va_get_reg64 rR12 va_sM /\ Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem
    va_s0) (va_get_mem va_sM)) ==> va_k va_sM (())))

val va_wpProof_Fsqr : tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 -> va_s0:va_state ->
  va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fsqr tmp_b inA_b dst_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fsqr ()) ([va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13;
    va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsi;
    va_Mod_reg64 rRdi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax;
    va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fsqr (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) : (va_quickCode unit
  (va_code_Fsqr ())) =
  (va_QProc (va_code_Fsqr ()) ([va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64
    rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64
    rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi; va_Mod_reg64 rRdx; va_Mod_reg64
    rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fsqr tmp_b inA_b dst_b)
    (va_wpProof_Fsqr tmp_b inA_b dst_b))
//--
//-- Fsqr_stdcall

val va_code_Fsqr_stdcall : win:bool -> Tot va_code

val va_codegen_success_Fsqr_stdcall : win:bool -> Tot va_pbool
let va_req_Fsqr_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fsqr_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (adx_enabled /\
    bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 8 (va_get_mem_layout va_s0)
    Secret))
let va_ens_Fsqr_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
  (inA_b:buffer64) (dst_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fsqr_stdcall va_b0 va_s0 win tmp_b inA_b dst_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM
    /\ va_get_ok va_sM /\ (let (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in
    let (dst_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else
    va_get_reg64 rRdx va_s0) in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in
    let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let d = Vale.Curve25519.Fast_defs.pow2_four
    d0 d1 d2 d3 in d `op_Modulus` prime == va_mul_nat a a `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\
    (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rRsp
    va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12
    va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64
    rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15
    va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==>
    va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR12 va_sM ==
    va_get_reg64 rR12 va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\
    (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15
    va_sM == va_get_reg64 rR15 va_s0) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\
    va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout
    va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM
    (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM
    (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM
    (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))))))

val va_lemma_Fsqr_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> tmp_b:buffer64 ->
  inA_b:buffer64 -> dst_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fsqr_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (adx_enabled /\
    bmi2_enabled) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 8 (va_get_mem_layout va_s0)
    Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else
    va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (dst_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let d = Vale.Curve25519.Fast_defs.pow2_four
    d0 d1 d2 d3 in d `op_Modulus` prime == va_mul_nat a a `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\
    (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rRsp
    va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12
    va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64
    rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15
    va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==>
    va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR12 va_sM ==
    va_get_reg64 rR12 va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\
    (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15
    va_sM == va_get_reg64 rR15 va_s0) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\
    va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout
    va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM
    (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM
    (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM
    (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))))))))
[@ va_qattr]
let va_wp_Fsqr_stdcall (win:bool) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64)
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0
    18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64
    rRsi va_s0) in let (dst_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ ->
    va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) in va_get_reg64 rRsp va_s0 ==
    Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\ Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (adx_enabled /\ bmi2_enabled) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 4 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 8 (va_get_mem_layout va_s0)
    Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64) (va_x_rbx:nat64) (va_x_rcx:nat64)
    (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_rdi:nat64) (va_x_rbp:nat64) (va_x_rsp:nat64)
    (va_x_r8:nat64) (va_x_r9:nat64) (va_x_r10:nat64) (va_x_r11:nat64) (va_x_r12:nat64)
    (va_x_r13:nat64) (va_x_r14:nat64) (va_x_r15:nat64) (va_x_efl:Vale.X64.Flags.t)
    (va_x_heap0:vale_heap) (va_x_memLayout:vale_heap_layout) (va_x_stack:vale_stack)
    (va_x_stackTaint:memtaint) . let va_sM = va_upd_stackTaint va_x_stackTaint (va_upd_stack
    va_x_stack (va_upd_mem_layout va_x_memLayout (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags
    va_x_efl (va_upd_reg64 rR15 va_x_r15 (va_upd_reg64 rR14 va_x_r14 (va_upd_reg64 rR13 va_x_r13
    (va_upd_reg64 rR12 va_x_r12 (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10
    (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64 rR8 va_x_r8 (va_upd_reg64 rRsp va_x_rsp (va_upd_reg64
    rRbp va_x_rbp (va_upd_reg64 rRdi va_x_rdi (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx
    va_x_rdx (va_upd_reg64 rRcx va_x_rcx (va_upd_reg64 rRbx va_x_rbx (va_upd_reg64 rRax va_x_rax
    (va_upd_mem va_x_mem va_s0))))))))))))))))))))) in va_get_ok va_sM /\ (let
    (tmp_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s0)
    (fun _ -> va_get_reg64 rRdi va_s0) in let (inA_in:(va_int_range 0 18446744073709551615)) =
    va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0) in let
    (dst_in:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s0)
    (fun _ -> va_get_reg64 rRdx va_s0) in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem
    va_s0) in let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let d = Vale.Curve25519.Fast_defs.pow2_four
    d0 d1 d2 d3 in d `op_Modulus` prime == va_mul_nat a a `op_Modulus` prime /\
    Vale.X64.Decls.modifies_buffer_2 dst_b tmp_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (win ==>
    va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM ==
    va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\
    (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rRsp
    va_sM == va_get_reg64 rRsp va_s0) /\ (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12
    va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64
    rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15
    va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==>
    va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR12 va_sM ==
    va_get_reg64 rR12 va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\
    (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15
    va_sM == va_get_reg64 rR15 va_s0) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) ==>
    va_k va_sM (())))

val va_wpProof_Fsqr_stdcall : win:bool -> tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fsqr_stdcall win tmp_b inA_b dst_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fsqr_stdcall win) ([va_Mod_stackTaint;
    va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15;
    va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10;
    va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi;
    va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax;
    va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fsqr_stdcall (win:bool) (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) :
  (va_quickCode unit (va_code_Fsqr_stdcall win)) =
  (va_QProc (va_code_Fsqr_stdcall win) ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13;
    va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8;
    va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx;
    va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fsqr_stdcall win
    tmp_b inA_b dst_b) (va_wpProof_Fsqr_stdcall win tmp_b inA_b dst_b))
//--
//-- Fsqr2

val va_code_Fsqr2 : va_dummy:unit -> Tot va_code

val va_codegen_success_Fsqr2 : va_dummy:unit -> Tot va_pbool
let va_req_Fsqr2 (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64)
  (dst_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Fsqr2 ()) va_s0 /\ va_get_ok va_s0 /\ (let (tmp_in:nat64) =
    va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let (dst_in:nat64) =
    va_get_reg64 rR12 va_s0 in adx_enabled /\ bmi2_enabled /\ Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/
    dst_b == inA_b) /\ (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 16 (va_get_mem_layout va_s0)
    Secret))
let va_ens_Fsqr2 (va_b0:va_code) (va_s0:va_state) (tmp_b:buffer64) (inA_b:buffer64)
  (dst_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fsqr2 va_b0 va_s0 tmp_b inA_b dst_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
    va_get_ok va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR12 va_s0 in let a0 =
    Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let a0' =
    Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let a1' =
    Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d0' =
    Vale.X64.Decls.buffer64_read dst_b (0 + 4) (va_get_mem va_sM) in let d1' =
    Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem va_sM) in let d2' =
    Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let a' = Vale.Curve25519.Fast_defs.pow2_four
    a0' a1' a2' a3' in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a a
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' a' `op_Modulus` prime /\
    va_get_reg64 rR12 va_s0 == va_get_reg64 rR12 va_sM /\ Vale.X64.Decls.modifies_buffer_2 dst_b
    tmp_b (va_get_mem va_s0) (va_get_mem va_sM)) /\ va_state_eq va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))

val va_lemma_Fsqr2 : va_b0:va_code -> va_s0:va_state -> tmp_b:buffer64 -> inA_b:buffer64 ->
  dst_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fsqr2 ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let
    (dst_in:nat64) = va_get_reg64 rR12 va_s0 in adx_enabled /\ bmi2_enabled /\
    Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 16 (va_get_mem_layout va_s0)
    Secret)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0
    in let (dst_in:nat64) = va_get_reg64 rR12 va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b
    0 (va_get_mem va_s0) in let a1 = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let
    a2 = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let a0' =
    Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let a1' =
    Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d0' =
    Vale.X64.Decls.buffer64_read dst_b (0 + 4) (va_get_mem va_sM) in let d1' =
    Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem va_sM) in let d2' =
    Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let a' = Vale.Curve25519.Fast_defs.pow2_four
    a0' a1' a2' a3' in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a a
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' a' `op_Modulus` prime /\
    va_get_reg64 rR12 va_s0 == va_get_reg64 rR12 va_sM /\ Vale.X64.Decls.modifies_buffer_2 dst_b
    tmp_b (va_get_mem va_s0) (va_get_mem va_sM)) /\ va_state_eq va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_reg64 rR15 va_sM
    (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRdx va_sM
    (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
[@ va_qattr]
let va_wp_Fsqr2 (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) (va_s0:va_state) (va_k:(va_state
  -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (tmp_in:nat64) = va_get_reg64 rRdi va_s0 in let (inA_in:nat64) =
    va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR12 va_s0 in adx_enabled /\
    bmi2_enabled /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    (Vale.X64.Decls.buffers_disjoint dst_b inA_b \/ dst_b == inA_b) /\
    (Vale.X64.Decls.buffers_disjoint dst_b tmp_b \/ dst_b == tmp_b) /\
    Vale.X64.Decls.buffers_disjoint tmp_b inA_b /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem
    va_s0) dst_in dst_b 8 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64
    (va_get_mem va_s0) inA_in inA_b 8 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) tmp_in tmp_b 16 (va_get_mem_layout va_s0)
    Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64) (va_x_rbx:nat64) (va_x_rcx:nat64)
    (va_x_rdx:nat64) (va_x_rdi:nat64) (va_x_rsi:nat64) (va_x_r8:nat64) (va_x_r9:nat64)
    (va_x_r10:nat64) (va_x_r11:nat64) (va_x_r13:nat64) (va_x_r14:nat64) (va_x_r15:nat64)
    (va_x_efl:Vale.X64.Flags.t) (va_x_heap0:vale_heap) (va_x_memLayout:vale_heap_layout) . let
    va_sM = va_upd_mem_layout va_x_memLayout (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_flags
    va_x_efl (va_upd_reg64 rR15 va_x_r15 (va_upd_reg64 rR14 va_x_r14 (va_upd_reg64 rR13 va_x_r13
    (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rR10 va_x_r10 (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64
    rR8 va_x_r8 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdi va_x_rdi (va_upd_reg64 rRdx va_x_rdx
    (va_upd_reg64 rRcx va_x_rcx (va_upd_reg64 rRbx va_x_rbx (va_upd_reg64 rRax va_x_rax (va_upd_mem
    va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (let (tmp_in:nat64) = va_get_reg64 rRdi
    va_s0 in let (inA_in:nat64) = va_get_reg64 rRsi va_s0 in let (dst_in:nat64) = va_get_reg64 rR12
    va_s0 in let a0 = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let a1 =
    Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let a2 =
    Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let a3 =
    Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let a0' =
    Vale.X64.Decls.buffer64_read inA_b (0 + 4) (va_get_mem va_s0) in let a1' =
    Vale.X64.Decls.buffer64_read inA_b (1 + 4) (va_get_mem va_s0) in let a2' =
    Vale.X64.Decls.buffer64_read inA_b (2 + 4) (va_get_mem va_s0) in let a3' =
    Vale.X64.Decls.buffer64_read inA_b (3 + 4) (va_get_mem va_s0) in let d0 =
    Vale.X64.Decls.buffer64_read dst_b 0 (va_get_mem va_sM) in let d1 =
    Vale.X64.Decls.buffer64_read dst_b 1 (va_get_mem va_sM) in let d2 =
    Vale.X64.Decls.buffer64_read dst_b 2 (va_get_mem va_sM) in let d3 =
    Vale.X64.Decls.buffer64_read dst_b 3 (va_get_mem va_sM) in let d0' =
    Vale.X64.Decls.buffer64_read dst_b (0 + 4) (va_get_mem va_sM) in let d1' =
    Vale.X64.Decls.buffer64_read dst_b (1 + 4) (va_get_mem va_sM) in let d2' =
    Vale.X64.Decls.buffer64_read dst_b (2 + 4) (va_get_mem va_sM) in let d3' =
    Vale.X64.Decls.buffer64_read dst_b (3 + 4) (va_get_mem va_sM) in let a =
    Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 in let a' = Vale.Curve25519.Fast_defs.pow2_four
    a0' a1' a2' a3' in let d = Vale.Curve25519.Fast_defs.pow2_four d0 d1 d2 d3 in let d' =
    Vale.Curve25519.Fast_defs.pow2_four d0' d1' d2' d3' in d `op_Modulus` prime == va_mul_nat a a
    `op_Modulus` prime /\ d' `op_Modulus` prime == va_mul_nat a' a' `op_Modulus` prime /\
    va_get_reg64 rR12 va_s0 == va_get_reg64 rR12 va_sM /\ Vale.X64.Decls.modifies_buffer_2 dst_b
    tmp_b (va_get_mem va_s0) (va_get_mem va_sM)) ==> va_k va_sM (())))

val va_wpProof_Fsqr2 : tmp_b:buffer64 -> inA_b:buffer64 -> dst_b:buffer64 -> va_s0:va_state ->
  va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fsqr2 tmp_b inA_b dst_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fsqr2 ()) ([va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13;
    va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsi;
    va_Mod_reg64 rRdi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax;
    va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Fsqr2 (tmp_b:buffer64) (inA_b:buffer64) (dst_b:buffer64) : (va_quickCode unit
  (va_code_Fsqr2 ())) =
  (va_QProc (va_code_Fsqr2 ()) ([va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags;
    va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR11; va_Mod_reg64 rR10;
    va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi; va_Mod_reg64 rRdx;
    va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fsqr2 tmp_b inA_b
    dst_b) (va_wpProof_Fsqr2 tmp_b inA_b dst_b))
//--
//-- Fsqr2_stdcall

val va_code_Fsqr2_stdcall : win:bool -> Tot va_code

val va_codegen_success_Fsqr2_stdcall : win:bool -> Tot va_pbool
let va_req_Fsqr2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (tmp_b:buffer64)
val va_req_Fsqr2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (tmp_b inA_b dst_b: buffer64)
    : prop

    va_b0: Vale.X64.Decls.va_code ->
    va_s0: Vale.X64.Decls.va_state ->
    win: Prims.bool ->
    tmp_b: Vale.X64.Memory.buffer64 ->
    inA_b: Vale.X64.Memory.buffer64 ->
    dst_b: Vale.X64.Memory.buffer64
  -> Prims.prop