val va_ens_Cswap2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (bit_in: nat64)
      (p0_b p1_b: buffer64)
      (va_sM: va_state)
      (va_fM: va_fuel)
    : prop
let va_ens_Cswap2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (bit_in:nat64)
  (p0_b:buffer64) (p1_b:buffer64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Cswap2_stdcall va_b0 va_s0 win bit_in p0_b p1_b /\ va_ensure_total va_b0 va_s0 va_sM
    va_fM /\ va_get_ok va_sM /\ (let (p0_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (p1_in:(va_int_range 0
    18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in
    let (old_p0_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0)
    in let (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem
    va_s0) in let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 2
    (va_get_mem va_s0) in let (old_p0_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    3 (va_get_mem va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 4 (va_get_mem va_s0) in let (old_p0_5:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_s0) in let (old_p0_6:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0) in let
    (old_p0_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_s0) in
    let (old_p1_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0)
    in let (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem
    va_s0) in let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 2
    (va_get_mem va_s0) in let (old_p1_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    3 (va_get_mem va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 4 (va_get_mem va_s0) in let (old_p1_5:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_s0) in let (old_p1_6:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0) in let
    (old_p1_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_s0) in
    let p0_0 = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_sM) in let p0_1 =
    Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_sM) in let p0_2 =
    Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_sM) in let p0_3 =
    Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_sM) in let p0_4 =
    Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_sM) in let p0_5 =
    Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_sM) in let p0_6 =
    Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_sM) in let p0_7 =
    Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_sM) in let p1_0 =
    Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_sM) in let p1_1 =
    Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_sM) in let p1_2 =
    Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_sM) in let p1_3 =
    Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_sM) in let p1_4 =
    Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_sM) in let p1_5 =
    Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_sM) in let p1_6 =
    Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_sM) in let p1_7 =
    Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_sM) in p0_0 == (if (bit_in = 1) then
    old_p1_0 else old_p0_0) /\ p0_1 == (if (bit_in = 1) then old_p1_1 else old_p0_1) /\ p0_2 == (if
    (bit_in = 1) then old_p1_2 else old_p0_2) /\ p0_3 == (if (bit_in = 1) then old_p1_3 else
    old_p0_3) /\ p0_4 == (if (bit_in = 1) then old_p1_4 else old_p0_4) /\ p0_5 == (if (bit_in = 1)
    then old_p1_5 else old_p0_5) /\ p0_6 == (if (bit_in = 1) then old_p1_6 else old_p0_6) /\ p0_7
    == (if (bit_in = 1) then old_p1_7 else old_p0_7) /\ p1_0 == (if (bit_in = 1) then old_p0_0 else
    old_p1_0) /\ p1_1 == (if (bit_in = 1) then old_p0_1 else old_p1_1) /\ p1_2 == (if (bit_in = 1)
    then old_p0_2 else old_p1_2) /\ p1_3 == (if (bit_in = 1) then old_p0_3 else old_p1_3) /\ p1_4
    == (if (bit_in = 1) then old_p0_4 else old_p1_4) /\ p1_5 == (if (bit_in = 1) then old_p0_5 else
    old_p1_5) /\ p1_6 == (if (bit_in = 1) then old_p0_6 else old_p1_6) /\ p1_7 == (if (bit_in = 1)
    then old_p0_7 else old_p1_7) /\ Vale.X64.Decls.modifies_buffer_2 p0_b p1_b (va_get_mem va_s0)
    (va_get_mem va_sM) /\ (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) /\ 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 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM
    (va_update_reg64 rRsp va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM
    (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))
val va_ens_Cswap2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (bit_in: nat64)
      (p0_b p1_b: buffer64)
      (va_sM: va_state)
      (va_fM: va_fuel)
    : prop
let va_ens_Cswap2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (bit_in: nat64)
      (p0_b p1_b: buffer64)
      (va_sM: va_state)
      (va_fM: va_fuel)
    : prop =
(va_req_Cswap2_stdcall va_b0 va_s0 win bit_in p0_b p1_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
  va_get_ok va_sM /\
  (let p0_in:(va_int_range 0 18446744073709551615) =
      (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0)
    in
    let p1_in:(va_int_range 0 18446744073709551615) =
      (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0)
    in
    let old_p0_0:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0) in
    let old_p0_1:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_s0) in
    let old_p0_2:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_s0) in
    let old_p0_3:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_s0) in
    let old_p0_4:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_s0) in
    let old_p0_5:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_s0) in
    let old_p0_6:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0) in
    let old_p0_7:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_s0) in
    let old_p1_0:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0) in
    let old_p1_1:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_s0) in
    let old_p1_2:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_s0) in
    let old_p1_3:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_s0) in
    let old_p1_4:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_s0) in
    let old_p1_5:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_s0) in
    let old_p1_6:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0) in
    let old_p1_7:Vale.Def.Types_s.nat64 = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_s0) in
    let p0_0 = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_sM) in
    let p0_1 = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_sM) in
    let p0_2 = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_sM) in
    let p0_3 = Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_sM) in
    let p0_4 = Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_sM) in
    let p0_5 = Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_sM) in
    let p0_6 = Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_sM) in
    let p0_7 = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_sM) in
    let p1_0 = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_sM) in
    let p1_1 = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_sM) in
    let p1_2 = Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_sM) in
    let p1_3 = Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_sM) in
    let p1_4 = Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_sM) in
    let p1_5 = Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_sM) in
    let p1_6 = Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_sM) in
    let p1_7 = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_sM) in
    p0_0 == (if (bit_in = 1) then old_p1_0 else old_p0_0) /\
    p0_1 == (if (bit_in = 1) then old_p1_1 else old_p0_1) /\
    p0_2 == (if (bit_in = 1) then old_p1_2 else old_p0_2) /\
    p0_3 == (if (bit_in = 1) then old_p1_3 else old_p0_3) /\
    p0_4 == (if (bit_in = 1) then old_p1_4 else old_p0_4) /\
    p0_5 == (if (bit_in = 1) then old_p1_5 else old_p0_5) /\
    p0_6 == (if (bit_in = 1) then old_p1_6 else old_p0_6) /\
    p0_7 == (if (bit_in = 1) then old_p1_7 else old_p0_7) /\
    p1_0 == (if (bit_in = 1) then old_p0_0 else old_p1_0) /\
    p1_1 == (if (bit_in = 1) then old_p0_1 else old_p1_1) /\
    p1_2 == (if (bit_in = 1) then old_p0_2 else old_p1_2) /\
    p1_3 == (if (bit_in = 1) then old_p0_3 else old_p1_3) /\
    p1_4 == (if (bit_in = 1) then old_p0_4 else old_p1_4) /\
    p1_5 == (if (bit_in = 1) then old_p0_5 else old_p1_5) /\
    p1_6 == (if (bit_in = 1) then old_p0_6 else old_p1_6) /\
    p1_7 == (if (bit_in = 1) then old_p0_7 else old_p1_7) /\
    Vale.X64.Decls.modifies_buffer_2 p0_b p1_b (va_get_mem va_s0) (va_get_mem va_sM) /\
    (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) /\
    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 rR10
                            va_sM
                            (va_update_reg64 rR9
                                va_sM
                                (va_update_reg64 rR8
                                    va_sM
                                    (va_update_reg64 rRsp
                                        va_sM
                                        (va_update_reg64 rRdi
                                            va_sM
                                            (va_update_reg64 rRsi
                                                va_sM
                                                (va_update_reg64 rRdx
                                                    va_sM
                                                    (va_update_ok va_sM (va_update_mem va_sM va_s0))
                                                )))))))))))))
Vale.Curve25519.X64.FastUtil.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.FastUtil.fsti
Vale.X64.Decls.va_code Vale.X64.Decls.va_state Prims.bool Vale.X64.Memory.nat64 Vale.X64.Memory.buffer64 Vale.X64.Decls.va_fuel Prims.l_and Vale.Curve25519.X64.FastUtil.va_req_Cswap2_stdcall Vale.X64.Decls.va_ensure_total Prims.b2t Vale.X64.Decls.va_get_ok Prims.eq2 Vale.Def.Words_s.nat64 Prims.op_Equality Prims.int Vale.X64.Decls.modifies_buffer_2 Vale.X64.Decls.va_get_mem Prims.l_imp Vale.Def.Types_s.nat64 Vale.X64.Decls.va_get_reg64 Vale.X64.Machine_s.rRdi Vale.X64.Machine_s.rRsi Vale.X64.Machine_s.rRsp Vale.X64.Decls.buffer64_read Vale.X64.Decls.va_int_range Vale.X64.Machine_s.rR8 Vale.X64.Machine_s.rRdx Vale.X64.Decls.va_state_eq Vale.X64.Decls.va_update_stackTaint Vale.X64.Decls.va_update_stack Vale.X64.Decls.va_update_mem_layout Vale.X64.Decls.va_update_mem_heaplet Vale.X64.Decls.va_update_flags Vale.X64.Decls.va_update_reg64 Vale.X64.Machine_s.rR10 Vale.X64.Machine_s.rR9 Vale.X64.Decls.va_update_ok Vale.X64.Decls.va_update_mem Prims.prop
module Vale.Curve25519.X64.FastUtil
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
//-- Fast_add1

val va_code_Fast_add1 : va_dummy:unit -> Tot va_code

val va_codegen_success_Fast_add1 : va_dummy:unit -> Tot va_pbool
let va_req_Fast_add1 (va_b0:va_code) (va_s0:va_state) (dst_b:buffer64) (inA_b:buffer64) (inB:nat64)
  : prop =
  (va_require_total va_b0 (va_code_Fast_add1 ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (a0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let
    (a1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let
    (a2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let
    (a3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let
    (a:Prims.nat) = Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 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 \/ inA_b == dst_b) /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) (va_get_reg64 rRdi va_s0) dst_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0)
    (va_get_reg64 rRsi va_s0) inA_b 4 (va_get_mem_layout va_s0) Secret /\ inB == va_get_reg64 rRdx
    va_s0))
let va_ens_Fast_add1 (va_b0:va_code) (va_s0:va_state) (dst_b:buffer64) (inA_b:buffer64) (inB:nat64)
  (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fast_add1 va_b0 va_s0 dst_b inA_b inB /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
    va_get_ok va_sM /\ (let (a0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 0
    (va_get_mem va_s0) in let (a1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 1
    (va_get_mem va_s0) in let (a2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 2
    (va_get_mem va_s0) in let (a3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 3
    (va_get_mem va_s0) in let (a:Prims.nat) = Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 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_five d0 d1 d2 d3 (va_get_reg64 rRax va_sM) in d == a +
    va_get_reg64 rRdx va_s0 /\ Vale.X64.Decls.modifies_buffer dst_b (va_get_mem va_s0) (va_get_mem
    va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 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 rRdx va_sM
    (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))

val va_lemma_Fast_add1 : va_b0:va_code -> va_s0:va_state -> dst_b:buffer64 -> inA_b:buffer64 ->
  inB:nat64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fast_add1 ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (a0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in let
    (a1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in let
    (a2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in let
    (a3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in let
    (a:Prims.nat) = Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 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 \/ inA_b == dst_b) /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) (va_get_reg64 rRdi va_s0) dst_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0)
    (va_get_reg64 rRsi va_s0) inA_b 4 (va_get_mem_layout va_s0) Secret /\ inB == va_get_reg64 rRdx
    va_s0)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (a0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 0 (va_get_mem va_s0) in
    let (a1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 1 (va_get_mem va_s0) in
    let (a2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 2 (va_get_mem va_s0) in
    let (a3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 3 (va_get_mem va_s0) in
    let (a:Prims.nat) = Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 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_five d0 d1 d2 d3 (va_get_reg64 rRax va_sM) in d == a +
    va_get_reg64 rRdx va_s0 /\ Vale.X64.Decls.modifies_buffer dst_b (va_get_mem va_s0) (va_get_mem
    va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_layout va_sM
    (va_update_mem_heaplet 0 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 rRdx 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_Fast_add1 (dst_b:buffer64) (inA_b:buffer64) (inB:nat64) (va_s0:va_state) (va_k:(va_state
  -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (a0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 0
    (va_get_mem va_s0) in let (a1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 1
    (va_get_mem va_s0) in let (a2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 2
    (va_get_mem va_s0) in let (a3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 3
    (va_get_mem va_s0) in let (a:Prims.nat) = Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 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 \/ inA_b == dst_b) /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) (va_get_reg64 rRdi va_s0) dst_b 4
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs64 (va_get_mem va_s0)
    (va_get_reg64 rRsi va_s0) inA_b 4 (va_get_mem_layout va_s0) Secret /\ inB == va_get_reg64 rRdx
    va_s0) /\ (forall (va_x_mem:vale_heap) (va_x_rax:nat64) (va_x_rdx:nat64) (va_x_r8:nat64)
    (va_x_r9:nat64) (va_x_r10:nat64) (va_x_r11:nat64) (va_x_heap0:vale_heap)
    (va_x_memLayout:vale_heap_layout) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags
    va_x_efl (va_upd_mem_layout va_x_memLayout (va_upd_mem_heaplet 0 va_x_heap0 (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 rRdx va_x_rdx (va_upd_reg64 rRax va_x_rax (va_upd_mem va_x_mem va_s0))))))))) in
    va_get_ok va_sM /\ (let (a0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 0
    (va_get_mem va_s0) in let (a1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 1
    (va_get_mem va_s0) in let (a2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 2
    (va_get_mem va_s0) in let (a3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read inA_b 3
    (va_get_mem va_s0) in let (a:Prims.nat) = Vale.Curve25519.Fast_defs.pow2_four a0 a1 a2 a3 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_five d0 d1 d2 d3 (va_get_reg64 rRax va_sM) in d == a +
    va_get_reg64 rRdx va_s0 /\ Vale.X64.Decls.modifies_buffer dst_b (va_get_mem va_s0) (va_get_mem
    va_sM)) ==> va_k va_sM (())))

val va_wpProof_Fast_add1 : dst_b:buffer64 -> inA_b:buffer64 -> inB:nat64 -> va_s0:va_state ->
  va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fast_add1 dst_b inA_b inB va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fast_add1 ()) ([va_Mod_flags;
    va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64
    rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRdx; 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_Fast_add1 (dst_b:buffer64) (inA_b:buffer64) (inB:nat64) : (va_quickCode unit
  (va_code_Fast_add1 ())) =
  (va_QProc (va_code_Fast_add1 ()) ([va_Mod_flags; va_Mod_mem_layout; va_Mod_mem_heaplet 0;
    va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRdx;
    va_Mod_reg64 rRax; va_Mod_mem]) (va_wp_Fast_add1 dst_b inA_b inB) (va_wpProof_Fast_add1 dst_b
    inA_b inB))
//--
//-- Fast_add1_stdcall

val va_code_Fast_add1_stdcall : win:bool -> Tot va_code

val va_codegen_success_Fast_add1_stdcall : win:bool -> Tot va_pbool
let va_req_Fast_add1_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (dst_b:buffer64)
  (inA_b:buffer64) (inB_in:nat64) : prop =
  (va_require_total va_b0 (va_code_Fast_add1_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (dst_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 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 \/ inA_b == dst_b) /\ inB_in = (if win then
    va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) /\ 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))
let va_ens_Fast_add1_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (dst_b:buffer64)
  (inA_b:buffer64) (inB_in:nat64) (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Fast_add1_stdcall va_b0 va_s0 win dst_b inA_b inB_in /\ va_ensure_total va_b0 va_s0 va_sM
    va_fM /\ va_get_ok va_sM /\ (let (dst_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 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_five
    d0 d1 d2 d3 (va_get_reg64 rRax va_sM) in d == a + inB_in /\ Vale.X64.Decls.modifies_buffer
    dst_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_Fast_add1_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> dst_b:buffer64 ->
  inA_b:buffer64 -> inB_in:nat64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Fast_add1_stdcall win) va_s0 /\ va_get_ok va_s0 /\
    (let (dst_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 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 \/ inA_b == dst_b) /\ inB_in = (if win then
    va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) /\ 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)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (dst_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 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_five
    d0 d1 d2 d3 (va_get_reg64 rRax va_sM) in d == a + inB_in /\ Vale.X64.Decls.modifies_buffer
    dst_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_Fast_add1_stdcall (win:bool) (dst_b:buffer64) (inA_b:buffer64) (inB_in:nat64)
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (dst_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 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 \/ inA_b == dst_b) /\ inB_in =
    va_if win (fun _ -> va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) /\
    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) /\ (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 (dst_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 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_five
    d0 d1 d2 d3 (va_get_reg64 rRax va_sM) in d == a + inB_in /\ Vale.X64.Decls.modifies_buffer
    dst_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_Fast_add1_stdcall : win:bool -> dst_b:buffer64 -> inA_b:buffer64 -> inB_in:nat64 ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Fast_add1_stdcall win dst_b inA_b inB_in va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Fast_add1_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_Fast_add1_stdcall (win:bool) (dst_b:buffer64) (inA_b:buffer64) (inB_in:nat64) :
  (va_quickCode unit (va_code_Fast_add1_stdcall win)) =
  (va_QProc (va_code_Fast_add1_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_Fast_add1_stdcall win dst_b inA_b
    inB_in) (va_wpProof_Fast_add1_stdcall win dst_b inA_b inB_in))
//--
//-- Cswap2

val va_code_Cswap2 : va_dummy:unit -> Tot va_code

val va_codegen_success_Cswap2 : va_dummy:unit -> Tot va_pbool
let va_req_Cswap2 (va_b0:va_code) (va_s0:va_state) (bit_in:nat64) (p0_b:buffer64) (p1_b:buffer64) :
  prop =
  (va_require_total va_b0 (va_code_Cswap2 ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (old_p0_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0) in
    let (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_s0)
    in let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem
    va_s0) in let (old_p0_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 3
    (va_get_mem va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    4 (va_get_mem va_s0) in let (old_p0_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 5 (va_get_mem va_s0) in let (old_p0_6:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0) in let (old_p0_7:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_s0) in let
    (old_p1_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0) in
    let (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_s0)
    in let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem
    va_s0) in let (old_p1_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 3
    (va_get_mem va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    4 (va_get_mem va_s0) in let (old_p1_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 5 (va_get_mem va_s0) in let (old_p1_6:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0) in let (old_p1_7:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_s0) in Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ bit_in == va_get_reg64 rRdi va_s0 /\
    va_get_reg64 rRdi va_s0 <= 1 /\ (Vale.X64.Decls.buffers_disjoint p1_b p0_b \/ p1_b == p0_b) /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) (va_get_reg64 rRsi va_s0) p0_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0)
    (va_get_reg64 rRdx va_s0) p1_b 8 (va_get_mem_layout va_s0) Secret))
let va_ens_Cswap2 (va_b0:va_code) (va_s0:va_state) (bit_in:nat64) (p0_b:buffer64) (p1_b:buffer64)
  (va_sM:va_state) (va_fM:va_fuel) : prop =
  (va_req_Cswap2 va_b0 va_s0 bit_in p0_b p1_b /\ va_ensure_total va_b0 va_s0 va_sM va_fM /\
    va_get_ok va_sM /\ (let (old_p0_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 0
    (va_get_mem va_s0) in let (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    1 (va_get_mem va_s0) in let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 2 (va_get_mem va_s0) in let (old_p0_3:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_s0) in let
    (old_p0_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_s0) in
    let (old_p0_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0)
    in let (old_p0_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem
    va_s0) in let (old_p1_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 0
    (va_get_mem va_s0) in let (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    1 (va_get_mem va_s0) in let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 2 (va_get_mem va_s0) in let (old_p1_3:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_s0) in let
    (old_p1_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_s0) in
    let (old_p1_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0)
    in let (old_p1_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem
    va_s0) in Vale.X64.Decls.modifies_buffer_2 p0_b p1_b (va_get_mem va_s0) (va_get_mem va_sM) /\
    (let p0_0 = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_sM) in let p0_1 =
    Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_sM) in let p0_2 =
    Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_sM) in let p0_3 =
    Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_sM) in let p0_4 =
    Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_sM) in let p0_5 =
    Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_sM) in let p0_6 =
    Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_sM) in let p0_7 =
    Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_sM) in let p1_0 =
    Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_sM) in let p1_1 =
    Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_sM) in let p1_2 =
    Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_sM) in let p1_3 =
    Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_sM) in let p1_4 =
    Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_sM) in let p1_5 =
    Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_sM) in let p1_6 =
    Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_sM) in let p1_7 =
    Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_sM) in p0_0 == (if (va_get_reg64 rRdi va_s0
    = 1) then old_p1_0 else old_p0_0) /\ p0_1 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_1
    else old_p0_1) /\ p0_2 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_2 else old_p0_2) /\
    p0_3 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_3 else old_p0_3) /\ p0_4 == (if
    (va_get_reg64 rRdi va_s0 = 1) then old_p1_4 else old_p0_4) /\ p0_5 == (if (va_get_reg64 rRdi
    va_s0 = 1) then old_p1_5 else old_p0_5) /\ p0_6 == (if (va_get_reg64 rRdi va_s0 = 1) then
    old_p1_6 else old_p0_6) /\ p0_7 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_7 else
    old_p0_7) /\ p1_0 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_0 else old_p1_0) /\ p1_1 ==
    (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_1 else old_p1_1) /\ p1_2 == (if (va_get_reg64
    rRdi va_s0 = 1) then old_p0_2 else old_p1_2) /\ p1_3 == (if (va_get_reg64 rRdi va_s0 = 1) then
    old_p0_3 else old_p1_3) /\ p1_4 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_4 else
    old_p1_4) /\ p1_5 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_5 else old_p1_5) /\ p1_6 ==
    (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_6 else old_p1_6) /\ p1_7 == (if (va_get_reg64
    rRdi va_s0 = 1) then old_p0_7 else old_p1_7))) /\ 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 rR10 va_sM
    (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRdi va_sM (va_update_ok
    va_sM (va_update_mem va_sM va_s0))))))))))

val va_lemma_Cswap2 : va_b0:va_code -> va_s0:va_state -> bit_in:nat64 -> p0_b:buffer64 ->
  p1_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Cswap2 ()) va_s0 /\ va_get_ok va_s0 /\ (let
    (old_p0_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0) in
    let (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_s0)
    in let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem
    va_s0) in let (old_p0_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 3
    (va_get_mem va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    4 (va_get_mem va_s0) in let (old_p0_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 5 (va_get_mem va_s0) in let (old_p0_6:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0) in let (old_p0_7:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_s0) in let
    (old_p1_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0) in
    let (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_s0)
    in let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem
    va_s0) in let (old_p1_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 3
    (va_get_mem va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    4 (va_get_mem va_s0) in let (old_p1_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 5 (va_get_mem va_s0) in let (old_p1_6:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0) in let (old_p1_7:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_s0) in Vale.X64.Memory.is_initial_heap
    (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ bit_in == va_get_reg64 rRdi va_s0 /\
    va_get_reg64 rRdi va_s0 <= 1 /\ (Vale.X64.Decls.buffers_disjoint p1_b p0_b \/ p1_b == p0_b) /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) (va_get_reg64 rRsi va_s0) p0_b 8
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0)
    (va_get_reg64 rRdx va_s0) p1_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 (old_p0_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0)
    in let (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem
    va_s0) in let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 2
    (va_get_mem va_s0) in let (old_p0_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    3 (va_get_mem va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 4 (va_get_mem va_s0) in let (old_p0_5:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_s0) in let (old_p0_6:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0) in let
    (old_p0_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_s0) in
    let (old_p1_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0)
    in let (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem
    va_s0) in let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 2
    (va_get_mem va_s0) in let (old_p1_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    3 (va_get_mem va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 4 (va_get_mem va_s0) in let (old_p1_5:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_s0) in let (old_p1_6:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0) in let
    (old_p1_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_s0) in
    Vale.X64.Decls.modifies_buffer_2 p0_b p1_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (let p0_0 =
    Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_sM) in let p0_1 =
    Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_sM) in let p0_2 =
    Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_sM) in let p0_3 =
    Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_sM) in let p0_4 =
    Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_sM) in let p0_5 =
    Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_sM) in let p0_6 =
    Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_sM) in let p0_7 =
    Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_sM) in let p1_0 =
    Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_sM) in let p1_1 =
    Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_sM) in let p1_2 =
    Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_sM) in let p1_3 =
    Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_sM) in let p1_4 =
    Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_sM) in let p1_5 =
    Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_sM) in let p1_6 =
    Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_sM) in let p1_7 =
    Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_sM) in p0_0 == (if (va_get_reg64 rRdi va_s0
    = 1) then old_p1_0 else old_p0_0) /\ p0_1 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_1
    else old_p0_1) /\ p0_2 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_2 else old_p0_2) /\
    p0_3 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_3 else old_p0_3) /\ p0_4 == (if
    (va_get_reg64 rRdi va_s0 = 1) then old_p1_4 else old_p0_4) /\ p0_5 == (if (va_get_reg64 rRdi
    va_s0 = 1) then old_p1_5 else old_p0_5) /\ p0_6 == (if (va_get_reg64 rRdi va_s0 = 1) then
    old_p1_6 else old_p0_6) /\ p0_7 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p1_7 else
    old_p0_7) /\ p1_0 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_0 else old_p1_0) /\ p1_1 ==
    (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_1 else old_p1_1) /\ p1_2 == (if (va_get_reg64
    rRdi va_s0 = 1) then old_p0_2 else old_p1_2) /\ p1_3 == (if (va_get_reg64 rRdi va_s0 = 1) then
    old_p0_3 else old_p1_3) /\ p1_4 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_4 else
    old_p1_4) /\ p1_5 == (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_5 else old_p1_5) /\ p1_6 ==
    (if (va_get_reg64 rRdi va_s0 = 1) then old_p0_6 else old_p1_6) /\ p1_7 == (if (va_get_reg64
    rRdi va_s0 = 1) then old_p0_7 else old_p1_7))) /\ 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 rR10 va_sM
    (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRdi va_sM (va_update_ok
    va_sM (va_update_mem va_sM va_s0)))))))))))
[@ va_qattr]
let va_wp_Cswap2 (bit_in:nat64) (p0_b:buffer64) (p1_b:buffer64) (va_s0:va_state) (va_k:(va_state ->
  unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (old_p0_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 0
    (va_get_mem va_s0) in let (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    1 (va_get_mem va_s0) in let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 2 (va_get_mem va_s0) in let (old_p0_3:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_s0) in let
    (old_p0_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_s0) in
    let (old_p0_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_s0)
    in let (old_p0_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem
    va_s0) in let (old_p1_0:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 0
    (va_get_mem va_s0) in let (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    1 (va_get_mem va_s0) in let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 2 (va_get_mem va_s0) in let (old_p1_3:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_s0) in let
    (old_p1_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_s0) in
    let (old_p1_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_s0)
    in let (old_p1_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem
    va_s0) in Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\
    bit_in == va_get_reg64 rRdi va_s0 /\ va_get_reg64 rRdi va_s0 <= 1 /\
    (Vale.X64.Decls.buffers_disjoint p1_b p0_b \/ p1_b == p0_b) /\ Vale.X64.Decls.validDstAddrs64
    (va_get_mem va_s0) (va_get_reg64 rRsi va_s0) p0_b 8 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) (va_get_reg64 rRdx va_s0) p1_b 8
    (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_rdi:nat64)
    (va_x_r8:nat64) (va_x_r9:nat64) (va_x_r10: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 rR10
    va_x_r10 (va_upd_reg64 rR9 va_x_r9 (va_upd_reg64 rR8 va_x_r8 (va_upd_reg64 rRdi va_x_rdi
    (va_upd_mem va_x_mem va_s0))))))) in va_get_ok va_sM /\ (let (old_p0_0:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0) in let
    (old_p0_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_s0) in
    let (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_s0)
    in let (old_p0_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem
    va_s0) in let (old_p0_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 4
    (va_get_mem va_s0) in let (old_p0_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    5 (va_get_mem va_s0) in let (old_p0_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 6 (va_get_mem va_s0) in let (old_p0_7:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_s0) in let (old_p1_0:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0) in let
    (old_p1_1:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_s0) in
    let (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_s0)
    in let (old_p1_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem
    va_s0) in let (old_p1_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 4
    (va_get_mem va_s0) in let (old_p1_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    5 (va_get_mem va_s0) in let (old_p1_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 6 (va_get_mem va_s0) in let (old_p1_7:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_s0) in Vale.X64.Decls.modifies_buffer_2 p0_b
    p1_b (va_get_mem va_s0) (va_get_mem va_sM) /\ (let p0_0 = Vale.X64.Decls.buffer64_read p0_b 0
    (va_get_mem va_sM) in let p0_1 = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_sM) in let
    p0_2 = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_sM) in let p0_3 =
    Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_sM) in let p0_4 =
    Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem va_sM) in let p0_5 =
    Vale.X64.Decls.buffer64_read p0_b 5 (va_get_mem va_sM) in let p0_6 =
    Vale.X64.Decls.buffer64_read p0_b 6 (va_get_mem va_sM) in let p0_7 =
    Vale.X64.Decls.buffer64_read p0_b 7 (va_get_mem va_sM) in let p1_0 =
    Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_sM) in let p1_1 =
    Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_sM) in let p1_2 =
    Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_sM) in let p1_3 =
    Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_sM) in let p1_4 =
    Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem va_sM) in let p1_5 =
    Vale.X64.Decls.buffer64_read p1_b 5 (va_get_mem va_sM) in let p1_6 =
    Vale.X64.Decls.buffer64_read p1_b 6 (va_get_mem va_sM) in let p1_7 =
    Vale.X64.Decls.buffer64_read p1_b 7 (va_get_mem va_sM) in p0_0 == va_if (va_get_reg64 rRdi
    va_s0 = 1) (fun _ -> old_p1_0) (fun _ -> old_p0_0) /\ p0_1 == va_if (va_get_reg64 rRdi va_s0 =
    1) (fun _ -> old_p1_1) (fun _ -> old_p0_1) /\ p0_2 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun
    _ -> old_p1_2) (fun _ -> old_p0_2) /\ p0_3 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p1_3) (fun _ -> old_p0_3) /\ p0_4 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p1_4) (fun _ -> old_p0_4) /\ p0_5 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p1_5) (fun _ -> old_p0_5) /\ p0_6 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p1_6) (fun _ -> old_p0_6) /\ p0_7 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p1_7) (fun _ -> old_p0_7) /\ p1_0 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_0) (fun _ -> old_p1_0) /\ p1_1 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_1) (fun _ -> old_p1_1) /\ p1_2 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_2) (fun _ -> old_p1_2) /\ p1_3 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_3) (fun _ -> old_p1_3) /\ p1_4 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_4) (fun _ -> old_p1_4) /\ p1_5 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_5) (fun _ -> old_p1_5) /\ p1_6 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_6) (fun _ -> old_p1_6) /\ p1_7 == va_if (va_get_reg64 rRdi va_s0 = 1) (fun _ ->
    old_p0_7) (fun _ -> old_p1_7))) ==> va_k va_sM (())))

val va_wpProof_Cswap2 : bit_in:nat64 -> p0_b:buffer64 -> p1_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_Cswap2 bit_in p0_b p1_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Cswap2 ()) ([va_Mod_mem_layout;
    va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8;
    va_Mod_reg64 rRdi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_Cswap2 (bit_in:nat64) (p0_b:buffer64) (p1_b:buffer64) : (va_quickCode unit
  (va_code_Cswap2 ())) =
  (va_QProc (va_code_Cswap2 ()) ([va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags;
    va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRdi; va_Mod_mem])
    (va_wp_Cswap2 bit_in p0_b p1_b) (va_wpProof_Cswap2 bit_in p0_b p1_b))
//--
//-- Cswap2_stdcall

val va_code_Cswap2_stdcall : win:bool -> Tot va_code

val va_codegen_success_Cswap2_stdcall : win:bool -> Tot va_pbool
let va_req_Cswap2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (bit_in:nat64)
  (p0_b:buffer64) (p1_b:buffer64) : prop =
  (va_require_total va_b0 (va_code_Cswap2_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let
    (p0_in:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else
    va_get_reg64 rRsi va_s0) in let (p1_in:(va_int_range 0 18446744073709551615)) = (if win then
    va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (old_p0_0:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p0_b 0 (va_get_mem va_s0) in let (old_p0_1:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p0_b 1 (va_get_mem va_s0) in let
    (old_p0_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 2 (va_get_mem va_s0) in
    let (old_p0_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 3 (va_get_mem va_s0)
    in let (old_p0_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 4 (va_get_mem
    va_s0) in let (old_p0_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b 5
    (va_get_mem va_s0) in let (old_p0_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p0_b
    6 (va_get_mem va_s0) in let (old_p0_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p0_b 7 (va_get_mem va_s0) in let (old_p1_0:Vale.Def.Types_s.nat64) =
    Vale.X64.Decls.buffer64_read p1_b 0 (va_get_mem va_s0) in let (old_p1_1:Vale.Def.Types_s.nat64)
    = Vale.X64.Decls.buffer64_read p1_b 1 (va_get_mem va_s0) in let
    (old_p1_2:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 2 (va_get_mem va_s0) in
    let (old_p1_3:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 3 (va_get_mem va_s0)
    in let (old_p1_4:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 4 (va_get_mem
    va_s0) in let (old_p1_5:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b 5
    (va_get_mem va_s0) in let (old_p1_6:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read p1_b
    6 (va_get_mem va_s0) in let (old_p1_7:Vale.Def.Types_s.nat64) = Vale.X64.Decls.buffer64_read
    p1_b 7 (va_get_mem 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) /\
    bit_in <= 1 /\ bit_in = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) /\
    (Vale.X64.Decls.buffers_disjoint p0_b p1_b \/ p1_b == p0_b) /\ Vale.X64.Decls.validDstAddrs64
    (va_get_mem va_s0) p0_in p0_b 8 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs64 (va_get_mem va_s0) p1_in p1_b 8 (va_get_mem_layout va_s0)
    Secret))
let va_ens_Cswap2_stdcall (va_b0:va_code) (va_s0:va_state) (win:bool) (bit_in:nat64)
val va_ens_Cswap2_stdcall
      (va_b0: va_code)
      (va_s0: va_state)
      (win: bool)
      (bit_in: nat64)
      (p0_b p1_b: buffer64)
      (va_sM: va_state)
      (va_fM: va_fuel)
    : prop

    va_b0: Vale.X64.Decls.va_code ->
    va_s0: Vale.X64.Decls.va_state ->
    win: Prims.bool ->
    bit_in: Vale.X64.Memory.nat64 ->
    p0_b: Vale.X64.Memory.buffer64 ->
    p1_b: Vale.X64.Memory.buffer64 ->
    va_sM: Vale.X64.Decls.va_state ->
    va_fM: Vale.X64.Decls.va_fuel
  -> Prims.prop