val va_wp_KeyExpansion128Stdcall
      (input_key_b output_key_expansion_b: buffer128)
      (va_s0: va_state)
      (va_k: (va_state -> unit -> Type0))
    : Type0
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_wp_KeyExpansion128Stdcall
      (input_key_b output_key_expansion_b: buffer128)
      (va_s0: va_state)
      (va_k: (va_state -> unit -> Type0))
    : Type0
let va_wp_KeyExpansion128Stdcall
      (input_key_b 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 (())))
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.Decls.va_state Prims.unit Prims.l_and Prims.b2t Vale.PPC64LE.Decls.va_get_ok Vale.PPC64LE.Decls.validSrcAddrs128 Vale.PPC64LE.Decls.va_get_mem_heaplet Vale.PPC64LE.Decls.va_get_reg Vale.PPC64LE.Decls.va_get_mem_layout Vale.Arch.HeapTypes_s.Secret Vale.PPC64LE.Decls.validDstAddrs128 FStar.Seq.Base.seq Vale.Def.Words_s.nat32 Vale.AES.AES_helpers_BE.be_quad32_to_seq Vale.Def.Types_s.reverse_bytes_quad32 Vale.PPC64LE.Decls.buffer128_read Prims.l_Forall Vale.PPC64LE.InsBasic.vale_heap Vale.PPC64LE.Memory.nat64 Vale.PPC64LE.Memory.quad32 Prims.l_imp Vale.PPC64LE.Decls.modifies_buffer128 Prims.int Prims.op_GreaterThanOrEqual Prims.op_LessThan FStar.Seq.Base.length Vale.Def.Types_s.quad32 Vale.AES.AES_BE_s.key_to_round_keys_word Vale.AES.AES_common_s.AES_128 Prims.op_LessThanOrEqual Prims.eq2 FStar.Seq.Base.index Vale.PPC64LE.Machine_s.state Vale.PPC64LE.Decls.va_upd_vec Vale.PPC64LE.Decls.va_upd_reg Vale.PPC64LE.Decls.va_upd_mem_heaplet Vale.PPC64LE.Decls.va_upd_mem
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)
val va_wp_KeyExpansion128Stdcall
      (input_key_b output_key_expansion_b: buffer128)
      (va_s0: va_state)
      (va_k: (va_state -> unit -> Type0))
    : Type0

    input_key_b: Vale.PPC64LE.Memory.buffer128 ->
    output_key_expansion_b: Vale.PPC64LE.Memory.buffer128 ->
    va_s0: Vale.PPC64LE.Decls.va_state ->
    va_k: (_: Vale.PPC64LE.Decls.va_state -> _: Prims.unit -> Type0)
  -> Type0