val va_quick_KeyExpansion128Stdcall (input_key_b output_key_expansion_b: buffer128)
    : (va_quickCode unit (va_code_KeyExpansion128Stdcall ()))
let va_quick_KeyExpansion128Stdcall (input_key_b:buffer128) (output_key_expansion_b:buffer128) :
  (va_quickCode unit (va_code_KeyExpansion128Stdcall ())) =
  (va_QProc (va_code_KeyExpansion128Stdcall ()) ([va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2;
    va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10; va_Mod_mem_heaplet 1; va_Mod_mem])
    (va_wp_KeyExpansion128Stdcall input_key_b output_key_expansion_b)
    (va_wpProof_KeyExpansion128Stdcall input_key_b output_key_expansion_b))
val va_quick_KeyExpansion128Stdcall (input_key_b output_key_expansion_b: buffer128)
    : (va_quickCode unit (va_code_KeyExpansion128Stdcall ()))
let va_quick_KeyExpansion128Stdcall (input_key_b output_key_expansion_b: buffer128)
    : (va_quickCode unit (va_code_KeyExpansion128Stdcall ())) =
(va_QProc (va_code_KeyExpansion128Stdcall ())
    ([
        va_Mod_vec 4;
        va_Mod_vec 3;
        va_Mod_vec 2;
        va_Mod_vec 1;
        va_Mod_vec 0;
        va_Mod_reg 10;
        va_Mod_mem_heaplet 1;
        va_Mod_mem
      ])
    (va_wp_KeyExpansion128Stdcall input_key_b output_key_expansion_b)
    (va_wpProof_KeyExpansion128Stdcall input_key_b output_key_expansion_b))
Vale.AES.PPC64LE.AES128.fsti.checked
Vale.PPC64LE.State.fsti.checked Vale.PPC64LE.QuickCodes.fsti.checked Vale.PPC64LE.QuickCode.fst.checked Vale.PPC64LE.Memory.fsti.checked Vale.PPC64LE.Machine_s.fst.checked Vale.PPC64LE.InsVector.fsti.checked Vale.PPC64LE.InsMem.fsti.checked Vale.PPC64LE.InsBasic.fsti.checked Vale.PPC64LE.Decls.fsti.checked Vale.Def.Types_s.fst.checked Vale.Def.Opaque_s.fsti.checked Vale.Arch.Types.fsti.checked Vale.AES.AES_helpers_BE.fsti.checked Vale.AES.AES_BE_s.fst.checked prims.fst.checked FStar.Seq.Base.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked
Vale.AES.PPC64LE.AES128.fsti
Vale.PPC64LE.Memory.buffer128 Vale.PPC64LE.QuickCode.va_QProc Prims.unit Vale.AES.PPC64LE.AES128.va_code_KeyExpansion128Stdcall Prims.Cons Vale.PPC64LE.QuickCode.mod_t Vale.PPC64LE.QuickCode.va_Mod_vec Vale.PPC64LE.QuickCode.va_Mod_reg Vale.PPC64LE.QuickCode.va_Mod_mem_heaplet Vale.PPC64LE.QuickCode.va_Mod_mem Prims.Nil Vale.AES.PPC64LE.AES128.va_wp_KeyExpansion128Stdcall Vale.AES.PPC64LE.AES128.va_wpProof_KeyExpansion128Stdcall Vale.PPC64LE.QuickCode.va_quickCode
module Vale.AES.PPC64LE.AES128
open Vale.Def.Opaque_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.AES.AES_BE_s
open Vale.PPC64LE.Machine_s
open Vale.PPC64LE.Memory
open Vale.PPC64LE.State
open Vale.PPC64LE.Decls
open Vale.PPC64LE.InsBasic
open Vale.PPC64LE.InsMem
open Vale.PPC64LE.InsVector
open Vale.PPC64LE.QuickCode
open Vale.PPC64LE.QuickCodes
open Vale.Arch.Types
open Vale.AES.AES_helpers_BE
#reset-options "--z3rlimit 20"
//-- KeyExpansion128Stdcall

val va_code_KeyExpansion128Stdcall : va_dummy:unit -> Tot va_code

val va_codegen_success_KeyExpansion128Stdcall : va_dummy:unit -> Tot va_pbool

val va_lemma_KeyExpansion128Stdcall : va_b0:va_code -> va_s0:va_state -> input_key_b:buffer128 ->
  output_key_expansion_b:buffer128
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_KeyExpansion128Stdcall ()) va_s0 /\ va_get_ok va_s0 /\
    (let (key:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) =
    Vale.AES.AES_helpers_BE.be_quad32_to_seq (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 0 (va_get_mem_heaplet 0 va_s0))) in
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 4 va_s0)
    input_key_b 1 (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128
    (va_get_mem_heaplet 1 va_s0) (va_get_reg 3 va_s0) output_key_expansion_b 11 (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 (key:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) =
    Vale.AES.AES_helpers_BE.be_quad32_to_seq (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 0 (va_get_mem_heaplet 0 va_s0))) in
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg 4 va_sM)
    input_key_b 1 (va_get_mem_layout va_sM) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128
    (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) output_key_expansion_b 11 (va_get_mem_layout
    va_sM) Secret) /\ (let (key:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) =
    Vale.AES.AES_helpers_BE.be_quad32_to_seq (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 0 (va_get_mem_heaplet 0 va_s0))) in
    Vale.PPC64LE.Decls.modifies_buffer128 output_key_expansion_b (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) /\ (forall j . {:pattern(reverse_bytes_quad32 (buffer128_read
    output_key_expansion_b j (va_get_mem_heaplet 1 va_sM)))}0 <= j /\ j <= 10 ==>
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read output_key_expansion_b
    j (va_get_mem_heaplet 1 va_sM)) == FStar.Seq.Base.index #Vale.Def.Types_s.quad32
    (Vale.AES.AES_BE_s.key_to_round_keys_word AES_128 key) j)) /\ va_state_eq va_sM (va_update_vec
    4 va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0
    va_sM (va_update_reg 10 va_sM (va_update_mem_heaplet 1 va_sM (va_update_ok va_sM (va_update_mem
    va_sM va_s0)))))))))))
[@ va_qattr]
let va_wp_KeyExpansion128Stdcall (input_key_b:buffer128) (output_key_expansion_b:buffer128)
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (key:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) =
    Vale.AES.AES_helpers_BE.be_quad32_to_seq (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 0 (va_get_mem_heaplet 0 va_s0))) in
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 4 va_s0)
    input_key_b 1 (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128
    (va_get_mem_heaplet 1 va_s0) (va_get_reg 3 va_s0) output_key_expansion_b 11 (va_get_mem_layout
    va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_heap1:vale_heap) (va_x_r10:nat64)
    (va_x_v0:quad32) (va_x_v1:quad32) (va_x_v2:quad32) (va_x_v3:quad32) (va_x_v4:quad32) . let
    va_sM = va_upd_vec 4 va_x_v4 (va_upd_vec 3 va_x_v3 (va_upd_vec 2 va_x_v2 (va_upd_vec 1 va_x_v1
    (va_upd_vec 0 va_x_v0 (va_upd_reg 10 va_x_r10 (va_upd_mem_heaplet 1 va_x_heap1 (va_upd_mem
    va_x_mem va_s0))))))) in va_get_ok va_sM /\ (let (key:(FStar.Seq.Base.seq
    Vale.Def.Types_s.nat32)) = Vale.AES.AES_helpers_BE.be_quad32_to_seq
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read input_key_b 0
    (va_get_mem_heaplet 0 va_s0))) in Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0
    va_sM) (va_get_reg 4 va_sM) input_key_b 1 (va_get_mem_layout va_sM) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM)
    output_key_expansion_b 11 (va_get_mem_layout va_sM) Secret) /\ (let (key:(FStar.Seq.Base.seq
    Vale.Def.Types_s.nat32)) = Vale.AES.AES_helpers_BE.be_quad32_to_seq
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read input_key_b 0
    (va_get_mem_heaplet 0 va_s0))) in Vale.PPC64LE.Decls.modifies_buffer128 output_key_expansion_b
    (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1 va_sM) /\ (forall j .
    {:pattern(reverse_bytes_quad32 (buffer128_read output_key_expansion_b j (va_get_mem_heaplet 1
    va_sM)))}0 <= j /\ j <= 10 ==> Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read output_key_expansion_b j (va_get_mem_heaplet 1 va_sM)) ==
    FStar.Seq.Base.index #Vale.Def.Types_s.quad32 (Vale.AES.AES_BE_s.key_to_round_keys_word AES_128
    key) j)) ==> va_k va_sM (())))

val va_wpProof_KeyExpansion128Stdcall : input_key_b:buffer128 -> output_key_expansion_b:buffer128
  -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_KeyExpansion128Stdcall input_key_b output_key_expansion_b
    va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_KeyExpansion128Stdcall ())
    ([va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10;
    va_Mod_mem_heaplet 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@ "opaque_to_smt" va_qattr]
let va_quick_KeyExpansion128Stdcall (input_key_b:buffer128) (output_key_expansion_b:buffer128) :
val va_quick_KeyExpansion128Stdcall (input_key_b output_key_expansion_b: buffer128)
    : (va_quickCode unit (va_code_KeyExpansion128Stdcall ()))
input_key_b: Vale.PPC64LE.Memory.buffer128 -> output_key_expansion_b: Vale.PPC64LE.Memory.buffer128
  -> Vale.PPC64LE.QuickCode.va_quickCode Prims.unit
      (Vale.AES.PPC64LE.AES128.va_code_KeyExpansion128Stdcall ())