val va_wpProof_AES256EncryptRound_6way : n:nat8 -> init1:quad32 -> init2:quad32 -> init3:quad32 ->
  init4:quad32 -> init5:quad32 -> init6:quad32 -> round_keys:(seq quad32) -> keys_buffer: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_AES256EncryptRound_6way n init1 init2 init3 init4 init5
    init6 round_keys keys_buffer va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_AES256EncryptRound_6way n)
    ([va_Mod_vec 6; va_Mod_vec 5; 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_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_AES256EncryptRound_6way n init1 init2 init3 init4 init5 init6 round_keys keys_buffer
  va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_AES256EncryptRound_6way (va_code_AES256EncryptRound_6way n) va_s0 n
    init1 init2 init3 init4 init5 init6 round_keys keys_buffer in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_vec 6 va_sM (va_update_vec 5 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_ok va_sM va_s0))))))))));
  va_lemma_norm_mods ([va_Mod_vec 6; va_Mod_vec 5; 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_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)
val va_wpProof_AES256EncryptRound_6way : n:nat8 -> init1:quad32 -> init2:quad32 -> init3:quad32 ->
  init4:quad32 -> init5:quad32 -> init6:quad32 -> round_keys:(seq quad32) -> keys_buffer: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_AES256EncryptRound_6way n init1 init2 init3 init4 init5
    init6 round_keys keys_buffer va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_AES256EncryptRound_6way n)
    ([va_Mod_vec 6; va_Mod_vec 5; 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_s0 va_k ((va_sM, va_f0, va_g))))
let va_wpProof_AES256EncryptRound_6way
      n
      init1
      init2
      init3
      init4
      init5
      init6
      round_keys
      keys_buffer
      va_s0
      va_k
     =
let va_sM, va_f0 =
  va_lemma_AES256EncryptRound_6way (va_code_AES256EncryptRound_6way n) va_s0 n init1 init2 init3
    init4 init5 init6 round_keys keys_buffer
in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
      (va_update_vec 6
          va_sM
          (va_update_vec 5
              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_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([
      va_Mod_vec 6;
      va_Mod_vec 5;
      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_sM
  va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
Vale.AES.PPC64LE.AES256.fst.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_common_s.fst.checked Vale.AES.AES_BE_s.fst.checked Vale.AES.AES256_helpers_BE.fsti.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.AES256.fst
Vale.PPC64LE.Memory.nat8 Vale.PPC64LE.Memory.quad32 FStar.Seq.Base.seq Vale.PPC64LE.Memory.buffer128 Vale.PPC64LE.Decls.va_state Prims.unit Vale.PPC64LE.Decls.va_fuel FStar.Pervasives.Native.Mktuple3 Vale.PPC64LE.QuickCode.va_lemma_norm_mods Prims.Cons Vale.PPC64LE.QuickCode.mod_t Vale.PPC64LE.QuickCode.va_Mod_vec Vale.PPC64LE.QuickCode.va_Mod_reg Prims.Nil Prims._assert Vale.PPC64LE.Decls.va_state_eq Vale.PPC64LE.Decls.va_update_vec Vale.PPC64LE.Decls.va_update_reg Vale.PPC64LE.Decls.va_update_ok Vale.PPC64LE.Decls.va_lemma_upd_update FStar.Pervasives.Native.tuple3 FStar.Pervasives.Native.tuple2 Vale.PPC64LE.Machine_s.state Vale.AES.PPC64LE.AES256.va_lemma_AES256EncryptRound_6way Vale.AES.PPC64LE.AES256.va_code_AES256EncryptRound_6way
module Vale.AES.PPC64LE.AES256
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.AES256_helpers_BE
#reset-options "--z3rlimit 20"
//-- KeyExpansionRoundEven256

val va_code_KeyExpansionRoundEven256 : round:nat8 -> rcon:nat8 -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_KeyExpansionRoundEven256 round rcon =
  (va_Block (va_CCons (va_code_Vspltisw (va_op_vec_opr_vec 0) 0) (va_CCons (va_code_Vspltisw
    (va_op_vec_opr_vec 4) 8) (va_CCons (va_code_Vsbox (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 3))
    (va_CCons (va_code_LoadImmShl64 (va_op_reg_opr_reg 10) rcon) (va_CCons (va_code_Mtvsrws
    (va_op_vec_opr_vec 5) (va_op_reg_opr_reg 10)) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 5)) (va_CCons (va_code_RotWord (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vspltw (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) 3) (va_CCons (va_code_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 1) 12) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 1) 12) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 1) 12) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 2)) (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply`
    (round + 1))) (va_CCons (va_code_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1)
    (va_op_vec_opr_vec 1) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret) (va_CNil
    ())))))))))))))))))))

val va_codegen_success_KeyExpansionRoundEven256 : round:nat8 -> rcon:nat8 -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_KeyExpansionRoundEven256 round rcon =
  (va_pbool_and (va_codegen_success_Vspltisw (va_op_vec_opr_vec 0) 0) (va_pbool_and
    (va_codegen_success_Vspltisw (va_op_vec_opr_vec 4) 8) (va_pbool_and (va_codegen_success_Vsbox
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 3)) (va_pbool_and (va_codegen_success_LoadImmShl64
    (va_op_reg_opr_reg 10) rcon) (va_pbool_and (va_codegen_success_Mtvsrws (va_op_vec_opr_vec 5)
    (va_op_reg_opr_reg 10)) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 5)) (va_pbool_and (va_codegen_success_RotWord
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 4)) (va_pbool_and
    (va_codegen_success_Vspltw (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) 3) (va_pbool_and
    (va_codegen_success_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 1)
    12) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 4)) (va_pbool_and (va_codegen_success_Vsldoi (va_op_vec_opr_vec 4)
    (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 1) 12) (va_pbool_and (va_codegen_success_Vxor
    (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 4)) (va_pbool_and
    (va_codegen_success_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 1)
    12) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 4)) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 2)) (va_pbool_and (va_codegen_success_LoadImm64
    (va_op_reg_opr_reg 10) (16 `op_Multiply` (round + 1))) (va_pbool_and
    (va_codegen_success_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1)
    (va_op_vec_opr_vec 1) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret) (va_ttrue
    ()))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_KeyExpansionRoundEven256 (va_mods:va_mods_t) (round:nat8) (rcon:nat8) (dst:buffer128)
  (key:(seq nat32)) : (va_quickCode unit (va_code_KeyExpansionRoundEven256 round rcon)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 67 column 13 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vspltisw (va_op_vec_opr_vec 0) 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 68 column 13 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vspltisw (va_op_vec_opr_vec 4) 8) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 69 column 10 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsbox (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 3)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 70 column 17 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImmShl64 (va_op_reg_opr_reg 10) rcon) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 71 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Mtvsrws (va_op_vec_opr_vec 5) (va_op_reg_opr_reg 10)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 72 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 5)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 73 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_RotWord (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 74 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vspltw (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) 3) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 75 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 1) 12) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 76 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 77 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 1) 12) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 78 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 79 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 1) 12) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 80 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 81 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 2)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 82 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` (round + 1))) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 83 column 33 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1) (va_op_vec_opr_vec 1)
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret dst (round + 1)) (fun (va_s:va_state) _ ->
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 85 column 22 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.Def.Types_s.quad32_xor_reveal ()) (let (va_arg27:Vale.Def.Types_s.nat8) =
    rcon in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 86 column 19 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_BE_s.lemma_shl_rcon va_arg27) (let (va_arg26:Prims.int) = round +
    1 in let (va_arg25:Vale.Def.Types_s.nat32) = rcon in let (va_arg24:Vale.Def.Types_s.quad32) =
    va_get_vec 3 va_old_s in let (va_arg23:Vale.Def.Types_s.quad32) = va_get_vec 1 va_old_s in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 87 column 25 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.lemma_simd_round_key va_arg23 va_arg24 va_arg25
    va_arg26) (va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 88 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.expand_key_256_reveal ()) (va_QEmpty
    (()))))))))))))))))))))))))


val va_lemma_KeyExpansionRoundEven256 : va_b0:va_code -> va_s0:va_state -> round:nat8 -> rcon:nat8
  -> dst:buffer128 -> key:(seq nat32)
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_KeyExpansionRoundEven256 round rcon) va_s0 /\
    va_get_ok va_s0 /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg
    3 va_s0) dst 15 (va_get_mem_layout va_s0) Secret /\ (1 <= round /\ round < 14) /\ (round + 1)
    `op_Modulus` 2 == 0 /\ rcon == Vale.AES.AES_common_s.aes_rcon ((round + 1) `op_Division` 2 - 1)
    /\ Vale.AES.AES_BE_s.is_aes_key_word AES_256 key /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key (round - 1) /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key round))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret /\ va_get_vec 1 va_sM == Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst (round + 1) (va_get_mem_heaplet 1 va_sM)) /\ va_get_vec
    1 va_sM == Vale.AES.AES256_helpers_BE.expand_key_256 key (round + 1) /\
    Vale.PPC64LE.Decls.modifies_buffer_specific128 dst (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) (round + 1) (round + 1) /\ va_state_eq va_sM (va_update_vec 5
    va_sM (va_update_vec 4 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)))))))))))
[@"opaque_to_smt"]
let va_lemma_KeyExpansionRoundEven256 va_b0 va_s0 round rcon dst key =
  let (va_mods:va_mods_t) = [va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0;
    va_Mod_reg 10; va_Mod_mem_heaplet 1; va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_KeyExpansionRoundEven256 va_mods round rcon dst key in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_KeyExpansionRoundEven256 round rcon)
    va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 43 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 54 column 64 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 63 column 74 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 1 va_sM == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read
    dst (round + 1) (va_get_mem_heaplet 1 va_sM))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 64 column 45 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 1 va_sM == Vale.AES.AES256_helpers_BE.expand_key_256 key (round + 1)) /\ label
    va_range1
    "***** POSTCONDITION NOT MET AT line 65 column 82 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer_specific128 dst (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) (round + 1) (round + 1))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0;
    va_Mod_reg 10; va_Mod_mem_heaplet 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_KeyExpansionRoundEven256 (round:nat8) (rcon:nat8) (dst:buffer128) (key:(seq nat32))
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg
    3 va_s0) dst 15 (va_get_mem_layout va_s0) Secret /\ (1 <= round /\ round < 14) /\ (round + 1)
    `op_Modulus` 2 == 0 /\ rcon == Vale.AES.AES_common_s.aes_rcon ((round + 1) `op_Division` 2 - 1)
    /\ Vale.AES.AES_BE_s.is_aes_key_word AES_256 key /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key (round - 1) /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key round /\ (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_v4:quad32) (va_x_v5:quad32) . let va_sM = va_upd_vec 5 va_x_v5 (va_upd_vec 4 va_x_v4
    (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 /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret /\ va_get_vec 1 va_sM == Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst (round + 1) (va_get_mem_heaplet 1 va_sM)) /\ va_get_vec
    1 va_sM == Vale.AES.AES256_helpers_BE.expand_key_256 key (round + 1) /\
    Vale.PPC64LE.Decls.modifies_buffer_specific128 dst (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) (round + 1) (round + 1) ==> va_k va_sM (())))


val va_wpProof_KeyExpansionRoundEven256 : round:nat8 -> rcon:nat8 -> dst:buffer128 -> key:(seq
  nat32) -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_KeyExpansionRoundEven256 round rcon dst key va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_KeyExpansionRoundEven256 round rcon)
    ([va_Mod_vec 5; va_Mod_vec 4; 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"]
let va_wpProof_KeyExpansionRoundEven256 round rcon dst key va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_KeyExpansionRoundEven256 (va_code_KeyExpansionRoundEven256 round
    rcon) va_s0 round rcon dst key in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_vec 5 va_sM (va_update_vec 4 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_lemma_norm_mods ([va_Mod_vec 5; va_Mod_vec 4; 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_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_KeyExpansionRoundEven256 (round:nat8) (rcon:nat8) (dst:buffer128) (key:(seq nat32)) :
  (va_quickCode unit (va_code_KeyExpansionRoundEven256 round rcon)) =
  (va_QProc (va_code_KeyExpansionRoundEven256 round rcon) ([va_Mod_vec 5; va_Mod_vec 4; 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_KeyExpansionRoundEven256 round rcon dst key) (va_wpProof_KeyExpansionRoundEven256 round
    rcon dst key))
//--
//-- KeyExpansionRoundOdd256

val va_code_KeyExpansionRoundOdd256 : round:nat8 -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_KeyExpansionRoundOdd256 round =
  (va_Block (va_CCons (va_code_Vspltisw (va_op_vec_opr_vec 0) 0) (va_CCons (va_code_Vsbox
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 1)) (va_CCons (va_code_Vspltw (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) 3) (va_CCons (va_code_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 3) 12) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 3) 12) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 3) 12) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 4)) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 2)) (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply`
    (round + 1))) (va_CCons (va_code_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1)
    (va_op_vec_opr_vec 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret) (va_CNil
    ()))))))))))))))

val va_codegen_success_KeyExpansionRoundOdd256 : round:nat8 -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_KeyExpansionRoundOdd256 round =
  (va_pbool_and (va_codegen_success_Vspltisw (va_op_vec_opr_vec 0) 0) (va_pbool_and
    (va_codegen_success_Vsbox (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 1)) (va_pbool_and
    (va_codegen_success_Vspltw (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) 3) (va_pbool_and
    (va_codegen_success_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 3)
    12) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 4)) (va_pbool_and (va_codegen_success_Vsldoi (va_op_vec_opr_vec 4)
    (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 3) 12) (va_pbool_and (va_codegen_success_Vxor
    (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 4)) (va_pbool_and
    (va_codegen_success_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 3)
    12) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 4)) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 2)) (va_pbool_and (va_codegen_success_LoadImm64
    (va_op_reg_opr_reg 10) (16 `op_Multiply` (round + 1))) (va_pbool_and
    (va_codegen_success_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1)
    (va_op_vec_opr_vec 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret) (va_ttrue
    ())))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_KeyExpansionRoundOdd256 (va_mods:va_mods_t) (round:nat8) (dst:buffer128) (key:(seq
  nat32)) : (va_quickCode unit (va_code_KeyExpansionRoundOdd256 round)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 114 column 13 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vspltisw (va_op_vec_opr_vec 0) 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 115 column 10 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsbox (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 1)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 116 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vspltw (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) 3) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 117 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 3) 12) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 118 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 119 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 3) 12) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 120 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 121 column 11 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vsldoi (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 3) 12) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 122 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 4)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 123 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 2)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 124 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` (round + 1))) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 125 column 33 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1) (va_op_vec_opr_vec 3)
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret dst (round + 1)) (fun (va_s:va_state) _ ->
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 127 column 22 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.Def.Types_s.quad32_xor_reveal ()) (let (va_arg23:Prims.int) = round + 1
    in let (va_arg22:Vale.Def.Types_s.quad32) = va_get_vec 1 va_old_s in let
    (va_arg21:Vale.Def.Types_s.quad32) = va_get_vec 3 va_old_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 128 column 25 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.lemma_simd_round_key va_arg21 va_arg22 0 va_arg23)
    (let (va_arg20:Prims.int) = round + 1 in let (va_arg19:Vale.Def.Types_s.quad32) = va_get_vec 1
    va_old_s in let (va_arg18:Vale.Def.Types_s.quad32) = va_get_vec 3 va_old_s in va_qPURE
    va_range1
    "***** PRECONDITION NOT MET AT line 129 column 33 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.lemma_round_key_256_rcon_odd va_arg18 va_arg19 0
    va_arg20) (va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 130 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.expand_key_256_reveal ()) (va_QEmpty
    (())))))))))))))))))))


val va_lemma_KeyExpansionRoundOdd256 : va_b0:va_code -> va_s0:va_state -> round:nat8 ->
  dst:buffer128 -> key:(seq nat32)
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_KeyExpansionRoundOdd256 round) va_s0 /\ va_get_ok
    va_s0 /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg 3 va_s0)
    dst 15 (va_get_mem_layout va_s0) Secret /\ (1 <= round /\ round < 14) /\ (round + 1)
    `op_Modulus` 2 =!= 0 /\ Vale.AES.AES_BE_s.is_aes_key_word AES_256 key /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key (round - 1) /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key round))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret /\ va_get_vec 3 va_sM == Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst (round + 1) (va_get_mem_heaplet 1 va_sM)) /\ va_get_vec
    3 va_sM == Vale.AES.AES256_helpers_BE.expand_key_256 key (round + 1) /\
    Vale.PPC64LE.Decls.modifies_buffer_specific128 dst (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) (round + 1) (round + 1) /\ 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 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))))))))))
[@"opaque_to_smt"]
let va_lemma_KeyExpansionRoundOdd256 va_b0 va_s0 round dst key =
  let (va_mods:va_mods_t) = [va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10;
    va_Mod_mem_heaplet 1; va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_KeyExpansionRoundOdd256 va_mods round dst key in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_KeyExpansionRoundOdd256 round) va_qc
    va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 92 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 102 column 64 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 110 column 74 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 3 va_sM == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read
    dst (round + 1) (va_get_mem_heaplet 1 va_sM))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 111 column 45 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 3 va_sM == Vale.AES.AES256_helpers_BE.expand_key_256 key (round + 1)) /\ label
    va_range1
    "***** POSTCONDITION NOT MET AT line 112 column 82 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer_specific128 dst (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) (round + 1) (round + 1))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10;
    va_Mod_mem_heaplet 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_KeyExpansionRoundOdd256 (round:nat8) (dst:buffer128) (key:(seq nat32)) (va_s0:va_state)
  (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg
    3 va_s0) dst 15 (va_get_mem_layout va_s0) Secret /\ (1 <= round /\ round < 14) /\ (round + 1)
    `op_Modulus` 2 =!= 0 /\ Vale.AES.AES_BE_s.is_aes_key_word AES_256 key /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key (round - 1) /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key round /\ (forall (va_x_mem:vale_heap)
    (va_x_heap1:vale_heap) (va_x_r10:nat64) (va_x_v0: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 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 /\ Vale.PPC64LE.Decls.validDstAddrs128
    (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15 (va_get_mem_layout va_sM) Secret /\
    va_get_vec 3 va_sM == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read
    dst (round + 1) (va_get_mem_heaplet 1 va_sM)) /\ va_get_vec 3 va_sM ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key (round + 1) /\
    Vale.PPC64LE.Decls.modifies_buffer_specific128 dst (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM) (round + 1) (round + 1) ==> va_k va_sM (())))


val va_wpProof_KeyExpansionRoundOdd256 : round:nat8 -> dst:buffer128 -> key:(seq nat32) ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_KeyExpansionRoundOdd256 round dst key va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_KeyExpansionRoundOdd256 round)
    ([va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; 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"]
let va_wpProof_KeyExpansionRoundOdd256 round dst key va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_KeyExpansionRoundOdd256 (va_code_KeyExpansionRoundOdd256 round)
    va_s0 round dst key in
  va_lemma_upd_update va_sM;
  assert (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 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_lemma_norm_mods ([va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10;
    va_Mod_mem_heaplet 1; va_Mod_mem]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_KeyExpansionRoundOdd256 (round:nat8) (dst:buffer128) (key:(seq nat32)) : (va_quickCode
  unit (va_code_KeyExpansionRoundOdd256 round)) =
  (va_QProc (va_code_KeyExpansionRoundOdd256 round) ([va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2;
    va_Mod_vec 0; va_Mod_reg 10; va_Mod_mem_heaplet 1; va_Mod_mem]) (va_wp_KeyExpansionRoundOdd256
    round dst key) (va_wpProof_KeyExpansionRoundOdd256 round dst key))
//--
//-- KeyExpansionRoundUnrolledRecursive256

val va_code_KeyExpansionRoundUnrolledRecursive256 : n:int -> Tot va_code(decreases %[n])
[@ "opaque_to_smt"]
let rec va_code_KeyExpansionRoundUnrolledRecursive256 n =
  (va_Block (va_CCons (if (1 < n && n <= 14) then va_Block (va_CCons
    (va_code_KeyExpansionRoundUnrolledRecursive256 (n - 1)) (va_CCons (if (n `op_Modulus` 2 = 0)
    then va_Block (va_CCons (va_code_KeyExpansionRoundEven256 (n - 1)
    (Vale.AES.AES_common_s.aes_rcon (n `op_Division` 2 - 1))) (va_CNil ())) else va_Block (va_CCons
    (va_code_KeyExpansionRoundOdd256 (n - 1)) (va_CNil ()))) (va_CNil ()))) else va_Block (va_CNil
    ())) (va_CNil ())))

val va_codegen_success_KeyExpansionRoundUnrolledRecursive256 : n:int -> Tot va_pbool(decreases %[n])
[@ "opaque_to_smt"]
let rec va_codegen_success_KeyExpansionRoundUnrolledRecursive256 n =
  (va_pbool_and (if (1 < n && n <= 14) then va_pbool_and
    (va_codegen_success_KeyExpansionRoundUnrolledRecursive256 (n - 1)) (va_pbool_and (if (n
    `op_Modulus` 2 = 0) then va_pbool_and (va_codegen_success_KeyExpansionRoundEven256 (n - 1)
    (Vale.AES.AES_common_s.aes_rcon (n `op_Division` 2 - 1))) (va_ttrue ()) else va_pbool_and
    (va_codegen_success_KeyExpansionRoundOdd256 (n - 1)) (va_ttrue ())) (va_ttrue ())) else
    va_ttrue ()) (va_ttrue ()))


val va_lemma_KeyExpansionRoundUnrolledRecursive256 : va_b0:va_code -> va_s0:va_state -> key:(seq
  nat32) -> dst:buffer128 -> n:int
  -> Ghost (va_state & va_fuel)(decreases %[n])
  (requires (va_require_total va_b0 (va_code_KeyExpansionRoundUnrolledRecursive256 n) va_s0 /\
    va_get_ok va_s0 /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg
    3 va_s0) dst 15 (va_get_mem_layout va_s0) Secret /\ (0 < n /\ n <= 14) /\
    Vale.AES.AES_BE_s.is_aes_key_word AES_256 key /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key 0 /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key 1 /\ va_get_vec 1 va_s0 ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read dst 0
    (va_get_mem_heaplet 1 va_s0)) /\ va_get_vec 3 va_s0 == Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst 1 (va_get_mem_heaplet 1 va_s0)) /\ va_get_reg 3 va_s0 ==
    Vale.PPC64LE.Memory.buffer_addr #Vale.PPC64LE.Memory.vuint128 dst (va_get_mem_heaplet 1 va_s0)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret /\ Vale.PPC64LE.Decls.modifies_buffer128 dst
    (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1 va_sM) /\
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read dst n
    (va_get_mem_heaplet 1 va_sM)) == (if (n `op_Modulus` 2 = 0) then va_get_vec 1 va_sM else
    va_get_vec 3 va_sM) /\ Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read
    dst (n - 1) (va_get_mem_heaplet 1 va_sM)) == (if ((n - 1) `op_Modulus` 2 = 0) then va_get_vec 1
    va_sM else va_get_vec 3 va_sM) /\ (forall j . {:pattern(reverse_bytes_quad32 (buffer128_read
    dst j (va_get_mem_heaplet 1 va_sM)))}0 <= j /\ j <= n ==> Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst j (va_get_mem_heaplet 1 va_sM)) ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key j) /\ va_state_eq va_sM (va_update_vec 5 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))))))))))))
[@"opaque_to_smt"]
let rec va_lemma_KeyExpansionRoundUnrolledRecursive256 va_b0 va_s0 key dst n =
  va_reveal_opaque (`%va_code_KeyExpansionRoundUnrolledRecursive256)
    (va_code_KeyExpansionRoundUnrolledRecursive256 n);
  let (va_old_s:va_state) = va_s0 in
  let (va_b1:va_codes) = va_get_block va_b0 in
  let va_b2 = va_tl va_b1 in
  let va_c2 = va_hd va_b1 in
  let (va_fc2, va_s2) =
  (
    if (1 < n && n <= 14) then
    (
      let va_b3 = va_get_block va_c2 in
      let (va_s4, va_fc4) = va_lemma_KeyExpansionRoundUnrolledRecursive256 (va_hd va_b3) va_s0 key
        dst (n - 1) in
      let va_b4 = va_tl va_b3 in
      let (old_mem:vale_heap) = va_get_mem_heaplet 1 va_s4 in
      let va_b6 = va_tl va_b4 in
      let va_c6 = va_hd va_b4 in
      let (va_fc6, va_s6) =
      (
        if (n `op_Modulus` 2 = 0) then
        (
          let va_b7 = va_get_block va_c6 in
          let (va_s8, va_fc8) = va_lemma_KeyExpansionRoundEven256 (va_hd va_b7) va_s4 (n - 1)
            (Vale.AES.AES_common_s.aes_rcon (n `op_Division` 2 - 1)) dst key in
          let va_b8 = va_tl va_b7 in
          let (va_s6, va_f8) = va_lemma_empty_total va_s8 va_b8 in
          let va_fc6 = va_lemma_merge_total va_b7 va_s4 va_fc8 va_s8 va_f8 va_s6 in
          (va_fc6, va_s6)
        )
        else
        (
          let va_b9 = va_get_block va_c6 in
          let (va_s10, va_fc10) = va_lemma_KeyExpansionRoundOdd256 (va_hd va_b9) va_s4 (n - 1) dst
            key in
          let va_b10 = va_tl va_b9 in
          let (va_s6, va_f10) = va_lemma_empty_total va_s10 va_b10 in
          let va_fc6 = va_lemma_merge_total va_b9 va_s4 va_fc10 va_s10 va_f10 va_s6 in
          (va_fc6, va_s6)
        )
      ) in
      assert (forall j . {:pattern(reverse_bytes_quad32 (buffer128_read dst j (va_get_mem_heaplet 1
        va_s6)))}0 <= j /\ j < n ==> Vale.Def.Types_s.reverse_bytes_quad32
        (Vale.PPC64LE.Decls.buffer128_read dst j (va_get_mem_heaplet 1 va_s6)) ==
        Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read dst j old_mem));
      let (va_s2, va_f6) = va_lemma_empty_total va_s6 va_b6 in
      let va_f4 = va_lemma_merge_total va_b4 va_s4 va_fc6 va_s6 va_f6 va_s2 in
      let va_fc2 = va_lemma_merge_total va_b3 va_s0 va_fc4 va_s4 va_f4 va_s2 in
      (va_fc2, va_s2)
    )
    else
    (
      let va_b12 = va_get_block va_c2 in
      let (va_s2, va_fc2) = va_lemma_empty_total va_s0 va_b12 in
      (va_fc2, va_s2)
    )
  ) in
  let (va_sM, va_f2) = va_lemma_empty_total va_s2 va_b2 in
  let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc2 va_s2 va_f2 va_sM in
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_KeyExpansionRoundUnrolledRecursive256 (key:(seq nat32)) (dst:buffer128) (n:int)
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg
    3 va_s0) dst 15 (va_get_mem_layout va_s0) Secret /\ (0 < n /\ n <= 14) /\
    Vale.AES.AES_BE_s.is_aes_key_word AES_256 key /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key 0 /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES256_helpers_BE.expand_key_256 key 1 /\ va_get_vec 1 va_s0 ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read dst 0
    (va_get_mem_heaplet 1 va_s0)) /\ va_get_vec 3 va_s0 == Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst 1 (va_get_mem_heaplet 1 va_s0)) /\ va_get_reg 3 va_s0 ==
    Vale.PPC64LE.Memory.buffer_addr #Vale.PPC64LE.Memory.vuint128 dst (va_get_mem_heaplet 1 va_s0)
    /\ (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) (va_x_v5:quad32) . let
    va_sM = va_upd_vec 5 va_x_v5 (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 /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM) dst 15
    (va_get_mem_layout va_sM) Secret /\ Vale.PPC64LE.Decls.modifies_buffer128 dst
    (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1 va_sM) /\
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read dst n
    (va_get_mem_heaplet 1 va_sM)) == va_if (n `op_Modulus` 2 = 0) (fun _ -> va_get_vec 1 va_sM)
    (fun _ -> va_get_vec 3 va_sM) /\ Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read dst (n - 1) (va_get_mem_heaplet 1 va_sM)) == va_if ((n - 1)
    `op_Modulus` 2 = 0) (fun _ -> va_get_vec 1 va_sM) (fun _ -> va_get_vec 3 va_sM) /\ (forall j .
    {:pattern(reverse_bytes_quad32 (buffer128_read dst j (va_get_mem_heaplet 1 va_sM)))}0 <= j /\ j
    <= n ==> Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read dst j
    (va_get_mem_heaplet 1 va_sM)) == Vale.AES.AES256_helpers_BE.expand_key_256 key j) ==> va_k
    va_sM (())))


val va_wpProof_KeyExpansionRoundUnrolledRecursive256 : key:(seq nat32) -> dst:buffer128 -> n:int ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_KeyExpansionRoundUnrolledRecursive256 key dst n va_s0
    va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_KeyExpansionRoundUnrolledRecursive256
    n) ([va_Mod_vec 5; 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"]
let va_wpProof_KeyExpansionRoundUnrolledRecursive256 key dst n va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_KeyExpansionRoundUnrolledRecursive256
    (va_code_KeyExpansionRoundUnrolledRecursive256 n) va_s0 key dst n in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_vec 5 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_lemma_norm_mods ([va_Mod_vec 5; 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_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_KeyExpansionRoundUnrolledRecursive256 (key:(seq nat32)) (dst:buffer128) (n:int) :
  (va_quickCode unit (va_code_KeyExpansionRoundUnrolledRecursive256 n)) =
  (va_QProc (va_code_KeyExpansionRoundUnrolledRecursive256 n) ([va_Mod_vec 5; 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_KeyExpansionRoundUnrolledRecursive256 key dst n)
    (va_wpProof_KeyExpansionRoundUnrolledRecursive256 key dst n))
//--
//-- KeyExpansion256Stdcall

[@ "opaque_to_smt" va_qattr]
let va_code_KeyExpansion256Stdcall () =
  (va_Block (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10) 16) (va_CCons
    (va_code_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 1)
    (va_op_reg_opr_reg 4) Secret) (va_CCons (va_code_Load128_byte16_buffer_index
    (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg
    10) Secret) (va_CCons (va_code_Store128_byte16_buffer (va_op_heaplet_mem_heaplet 1)
    (va_op_vec_opr_vec 1) (va_op_reg_opr_reg 3) Secret) (va_CCons
    (va_code_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1) (va_op_vec_opr_vec 3)
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret) (va_CCons
    (va_code_KeyExpansionRoundUnrolledRecursive256 14) (va_CCons (va_code_Vxor (va_op_vec_opr_vec
    1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2)) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)) (va_CCons (va_code_Vxor (va_op_vec_opr_vec 4)
    (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4)) (va_CNil ()))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_codegen_success_KeyExpansion256Stdcall () =
  (va_pbool_and (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 10) 16) (va_pbool_and
    (va_codegen_success_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 1)
    (va_op_reg_opr_reg 4) Secret) (va_pbool_and (va_codegen_success_Load128_byte16_buffer_index
    (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg
    10) Secret) (va_pbool_and (va_codegen_success_Store128_byte16_buffer (va_op_heaplet_mem_heaplet
    1) (va_op_vec_opr_vec 1) (va_op_reg_opr_reg 3) Secret) (va_pbool_and
    (va_codegen_success_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1)
    (va_op_vec_opr_vec 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret) (va_pbool_and
    (va_codegen_success_KeyExpansionRoundUnrolledRecursive256 14) (va_pbool_and
    (va_codegen_success_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1))
    (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2)) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 3)
    (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)) (va_pbool_and (va_codegen_success_Vxor
    (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4)) (va_ttrue ())))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_KeyExpansion256Stdcall (va_mods:va_mods_t) (input_key_b:buffer128)
  (output_key_expansion_b:buffer128) : (va_quickCode unit (va_code_KeyExpansion256Stdcall ())) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let
    (key:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) = Vale.AES.AES256_helpers_BE.make_AES256_key
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read input_key_b 0
    (va_get_mem_heaplet 0 va_s))) (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 1 (va_get_mem_heaplet 0 va_s))) in va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 193 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) 16) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 194 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 1)
    (va_op_reg_opr_reg 4) Secret input_key_b 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 195 column 32 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 3)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret input_key_b 1) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 197 column 27 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Store128_byte16_buffer (va_op_heaplet_mem_heaplet 1) (va_op_vec_opr_vec 1)
    (va_op_reg_opr_reg 3) Secret output_key_expansion_b 0) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 198 column 33 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Store128_byte16_buffer_index (va_op_heaplet_mem_heaplet 1) (va_op_vec_opr_vec 3)
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 10) Secret output_key_expansion_b 1) (fun
    (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 200 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.expand_key_256_reveal ()) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 201 column 42 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_KeyExpansionRoundUnrolledRecursive256 key output_key_expansion_b 14) (fun
    (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 202 column 25 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES256_helpers_BE.lemma_expand_key_256 key 15) (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 203 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    true (fun _ -> va_reveal_eq (`%key_to_round_keys_word) key_to_round_keys_word
    key_to_round_keys_word) (fun _ -> va_reveal_opaque (`%key_to_round_keys_word)
    key_to_round_keys_word) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 206 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 207 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 208 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 209 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4)) (va_QEmpty
    (()))))))))))))))))

[@"opaque_to_smt"]
let va_lemma_KeyExpansion256Stdcall va_b0 va_s0 input_key_b output_key_expansion_b =
  let (va_mods:va_mods_t) = [va_Mod_vec 5; 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_ok; va_Mod_mem] in
  let va_qc = va_qcode_KeyExpansion256Stdcall va_mods input_key_b output_key_expansion_b in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_KeyExpansion256Stdcall ()) va_qc va_s0
    (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 174 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_ok va_sM) /\ (let (key:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) =
    Vale.AES.AES256_helpers_BE.make_AES256_key (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 0 (va_get_mem_heaplet 0 va_s0)))
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read input_key_b 1
    (va_get_mem_heaplet 0 va_s0))) in label va_range1
    "***** POSTCONDITION NOT MET AT line 186 column 71 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg 4 va_sM)
    input_key_b 2 (va_get_mem_layout va_sM) Secret) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 187 column 83 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_sM) (va_get_reg 3 va_sM)
    output_key_expansion_b 15 (va_get_mem_layout va_sM) Secret)) /\ (let (key:(FStar.Seq.Base.seq
    Vale.Def.Types_s.nat32)) = Vale.AES.AES256_helpers_BE.make_AES256_key
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read input_key_b 0
    (va_get_mem_heaplet 0 va_s0))) (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read input_key_b 1 (va_get_mem_heaplet 0 va_s0))) in label
    va_range1
    "***** POSTCONDITION NOT MET AT line 189 column 70 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 output_key_expansion_b (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 191 column 133 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (forall (j:nat) . {:pattern(reverse_bytes_quad32 (buffer128_read output_key_expansion_b j
    (va_get_mem_heaplet 1 va_sM)))}j <= 14 ==> 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_256
    key) j))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_vec 5; 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_ok; va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)


[@"opaque_to_smt"]
let va_wpProof_KeyExpansion256Stdcall input_key_b output_key_expansion_b va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_KeyExpansion256Stdcall (va_code_KeyExpansion256Stdcall ()) va_s0
    input_key_b output_key_expansion_b in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_vec 5 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_lemma_norm_mods ([va_Mod_vec 5; 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_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

//--
//-- AES256EncryptRound

val va_code_AES256EncryptRound : n:nat8 -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_AES256EncryptRound n =
  (va_Block (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` n)) (va_CCons
    (va_code_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 2)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2)) (va_CNil ())))))

val va_codegen_success_AES256EncryptRound : n:nat8 -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_AES256EncryptRound n =
  (va_pbool_and (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` n))
    (va_pbool_and (va_codegen_success_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0)
    (va_op_vec_opr_vec 2) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_pbool_and
    (va_codegen_success_Vcipher (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2))
    (va_ttrue ()))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_AES256EncryptRound (va_mods:va_mods_t) (n:nat8) (init:quad32) (round_keys:(seq
  quad32)) (keys_buffer:buffer128) : (va_quickCode unit (va_code_AES256EncryptRound n)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 235 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` n)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 236 column 32 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 2)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret keys_buffer n) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 237 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2)) (va_QEmpty
    (()))))))


val va_lemma_AES256EncryptRound : va_b0:va_code -> va_s0:va_state -> n:nat8 -> init:quad32 ->
  round_keys:(seq quad32) -> keys_buffer:buffer128
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_AES256EncryptRound n) va_s0 /\ va_get_ok va_s0 /\ (1
    <= n /\ n < 14 /\ 14 <= FStar.Seq.Base.length #quad32 round_keys) /\ va_get_vec 0 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init round_keys (n - 1) /\ va_get_reg 4 va_s0 ==
    Vale.PPC64LE.Memory.buffer_addr #Vale.PPC64LE.Memory.vuint128 keys_buffer (va_get_mem_heaplet 0
    va_s0) /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 4 va_s0)
    keys_buffer 15 (va_get_mem_layout va_s0) Secret /\ Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read keys_buffer n (va_get_mem_heaplet 0 va_s0)) ==
    FStar.Seq.Base.index #quad32 round_keys n))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    va_get_vec 0 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init round_keys n /\ va_state_eq va_sM
    (va_update_vec 2 va_sM (va_update_vec 0 va_sM (va_update_reg 10 va_sM (va_update_ok va_sM
    va_s0))))))
[@"opaque_to_smt"]
let va_lemma_AES256EncryptRound va_b0 va_s0 n init round_keys keys_buffer =
  let (va_mods:va_mods_t) = [va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10; va_Mod_ok] in
  let va_qc = va_qcode_AES256EncryptRound va_mods n init round_keys keys_buffer in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_AES256EncryptRound n) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 216 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 233 column 51 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 0 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init round_keys n)) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10; va_Mod_ok]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_AES256EncryptRound (n:nat8) (init:quad32) (round_keys:(seq quad32))
  (keys_buffer:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (1 <= n /\ n < 14 /\ 14 <= FStar.Seq.Base.length #quad32 round_keys) /\
    va_get_vec 0 va_s0 == Vale.AES.AES_BE_s.eval_rounds_def init round_keys (n - 1) /\ va_get_reg 4
    va_s0 == Vale.PPC64LE.Memory.buffer_addr #Vale.PPC64LE.Memory.vuint128 keys_buffer
    (va_get_mem_heaplet 0 va_s0) /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0
    va_s0) (va_get_reg 4 va_s0) keys_buffer 15 (va_get_mem_layout va_s0) Secret /\
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read keys_buffer n
    (va_get_mem_heaplet 0 va_s0)) == FStar.Seq.Base.index #quad32 round_keys n /\ (forall
    (va_x_r10:nat64) (va_x_v0:quad32) (va_x_v2:quad32) . let va_sM = va_upd_vec 2 va_x_v2
    (va_upd_vec 0 va_x_v0 (va_upd_reg 10 va_x_r10 va_s0)) in va_get_ok va_sM /\ va_get_vec 0 va_sM
    == Vale.AES.AES_BE_s.eval_rounds_def init round_keys n ==> va_k va_sM (())))


val va_wpProof_AES256EncryptRound : n:nat8 -> init:quad32 -> round_keys:(seq quad32) ->
  keys_buffer: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_AES256EncryptRound n init round_keys keys_buffer va_s0
    va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_AES256EncryptRound n) ([va_Mod_vec 2;
    va_Mod_vec 0; va_Mod_reg 10]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_AES256EncryptRound n init round_keys keys_buffer va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_AES256EncryptRound (va_code_AES256EncryptRound n) va_s0 n init
    round_keys keys_buffer in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_vec 2 va_sM (va_update_vec 0 va_sM (va_update_reg 10 va_sM
    (va_update_ok va_sM va_s0)))));
  va_lemma_norm_mods ([va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_AES256EncryptRound (n:nat8) (init:quad32) (round_keys:(seq quad32))
  (keys_buffer:buffer128) : (va_quickCode unit (va_code_AES256EncryptRound n)) =
  (va_QProc (va_code_AES256EncryptRound n) ([va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10])
    (va_wp_AES256EncryptRound n init round_keys keys_buffer) (va_wpProof_AES256EncryptRound n init
    round_keys keys_buffer))
//--
//-- AES256EncryptBlock

[@ "opaque_to_smt" va_qattr]
let va_code_AES256EncryptBlock () =
  (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10)
    0) (va_CCons (va_code_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0)
    (va_op_vec_opr_vec 2) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_CCons
    (va_code_Vxor (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2)) (va_CCons
    (va_code_AES256EncryptRound 1) (va_CCons (va_code_AES256EncryptRound 2) (va_CCons
    (va_code_AES256EncryptRound 3) (va_CCons (va_code_AES256EncryptRound 4) (va_CCons
    (va_code_AES256EncryptRound 5) (va_CCons (va_code_AES256EncryptRound 6) (va_CCons
    (va_code_AES256EncryptRound 7) (va_CCons (va_code_AES256EncryptRound 8) (va_CCons
    (va_code_AES256EncryptRound 9) (va_CCons (va_code_AES256EncryptRound 10) (va_CCons
    (va_code_AES256EncryptRound 11) (va_CCons (va_code_AES256EncryptRound 12) (va_CCons
    (va_code_AES256EncryptRound 13) (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10) (16
    `op_Multiply` 14)) (va_CCons (va_code_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0)
    (va_op_vec_opr_vec 2) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_CCons
    (va_code_Vcipherlast (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2))
    (va_CCons (va_code_Vxor (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2))
    (va_CNil ())))))))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_codegen_success_AES256EncryptBlock () =
  (va_pbool_and (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 10) 0) (va_pbool_and
    (va_codegen_success_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0)
    (va_op_vec_opr_vec 2) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_pbool_and
    (va_codegen_success_Vxor (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2))
    (va_pbool_and (va_codegen_success_AES256EncryptRound 1) (va_pbool_and
    (va_codegen_success_AES256EncryptRound 2) (va_pbool_and (va_codegen_success_AES256EncryptRound
    3) (va_pbool_and (va_codegen_success_AES256EncryptRound 4) (va_pbool_and
    (va_codegen_success_AES256EncryptRound 5) (va_pbool_and (va_codegen_success_AES256EncryptRound
    6) (va_pbool_and (va_codegen_success_AES256EncryptRound 7) (va_pbool_and
    (va_codegen_success_AES256EncryptRound 8) (va_pbool_and (va_codegen_success_AES256EncryptRound
    9) (va_pbool_and (va_codegen_success_AES256EncryptRound 10) (va_pbool_and
    (va_codegen_success_AES256EncryptRound 11) (va_pbool_and (va_codegen_success_AES256EncryptRound
    12) (va_pbool_and (va_codegen_success_AES256EncryptRound 13) (va_pbool_and
    (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` 14)) (va_pbool_and
    (va_codegen_success_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0)
    (va_op_vec_opr_vec 2) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_pbool_and
    (va_codegen_success_Vcipherlast (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec
    2)) (va_pbool_and (va_codegen_success_Vxor (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2)) (va_ttrue ())))))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_AES256EncryptBlock (va_mods:va_mods_t) (input:quad32) (key:(seq nat32))
  (round_keys:(seq quad32)) (keys_buffer:buffer128) : (va_quickCode unit
  (va_code_AES256EncryptBlock ())) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash
    va_range1
    "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 262 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) =
    i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337)))
    Vale.Def.Types_s.quad32 round_keys 0) (fun _ -> let (init:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.quad32_xor input (FStar.Seq.Base.index #Vale.Def.Types_s.quad32 round_keys 0)
    in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 264 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 265 column 32 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 2)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret keys_buffer 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 266 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 267 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 1 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 268 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 2 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 269 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 3 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 270 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 4 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 271 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 5 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 272 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 6 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 273 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 7 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 274 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 8 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 275 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 9 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 276 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 10 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 277 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 11 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 12 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_AES256EncryptRound 13 init round_keys keys_buffer) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 280 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` 14)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 281 column 32 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 2)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret keys_buffer 14) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 282 column 16 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipherlast (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 2))
    (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 285 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2)) (fun
    (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 286 column 28 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_BE_s.aes_encrypt_word_reveal ()) (va_QEmpty
    (())))))))))))))))))))))))))

[@"opaque_to_smt"]
let va_lemma_AES256EncryptBlock va_b0 va_s0 input key round_keys keys_buffer =
  let (va_mods:va_mods_t) = [va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10; va_Mod_ok] in
  let va_qc = va_qcode_AES256EncryptBlock va_mods input key round_keys keys_buffer in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_AES256EncryptBlock ()) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 260 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 0 va_sM == Vale.AES.AES_BE_s.aes_encrypt_word AES_256 key input)) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10; va_Mod_ok]) va_sM va_s0;
  (va_sM, va_fM)


[@"opaque_to_smt"]
let va_wpProof_AES256EncryptBlock input key round_keys keys_buffer va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_AES256EncryptBlock (va_code_AES256EncryptBlock ()) va_s0 input key
    round_keys keys_buffer in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_vec 2 va_sM (va_update_vec 0 va_sM (va_update_reg 10 va_sM
    (va_update_ok va_sM va_s0)))));
  va_lemma_norm_mods ([va_Mod_vec 2; va_Mod_vec 0; va_Mod_reg 10]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

//--
//-- AES256EncryptRound_6way

val va_code_AES256EncryptRound_6way : n:nat8 -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_AES256EncryptRound_6way n =
  (va_Block (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` n)) (va_CCons
    (va_code_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 6)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 6)) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 6)) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 6)) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 6)) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 6)) (va_CCons (va_code_Vcipher
    (va_op_vec_opr_vec 5) (va_op_vec_opr_vec 5) (va_op_vec_opr_vec 6)) (va_CNil ()))))))))))

val va_codegen_success_AES256EncryptRound_6way : n:nat8 -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_AES256EncryptRound_6way n =
  (va_pbool_and (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` n))
    (va_pbool_and (va_codegen_success_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0)
    (va_op_vec_opr_vec 6) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret) (va_pbool_and
    (va_codegen_success_Vcipher (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 6))
    (va_pbool_and (va_codegen_success_Vcipher (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1)
    (va_op_vec_opr_vec 6)) (va_pbool_and (va_codegen_success_Vcipher (va_op_vec_opr_vec 2)
    (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 6)) (va_pbool_and (va_codegen_success_Vcipher
    (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 6)) (va_pbool_and
    (va_codegen_success_Vcipher (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 6))
    (va_pbool_and (va_codegen_success_Vcipher (va_op_vec_opr_vec 5) (va_op_vec_opr_vec 5)
    (va_op_vec_opr_vec 6)) (va_ttrue ())))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_AES256EncryptRound_6way (va_mods:va_mods_t) (n:nat8) (init1:quad32) (init2:quad32)
  (init3:quad32) (init4:quad32) (init5:quad32) (init6:quad32) (round_keys:(seq quad32))
  (keys_buffer:buffer128) : (va_quickCode unit (va_code_AES256EncryptRound_6way n)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 323 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) (16 `op_Multiply` n)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 324 column 32 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Load128_byte16_buffer_index (va_op_heaplet_mem_heaplet 0) (va_op_vec_opr_vec 6)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 10) Secret keys_buffer n) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 325 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 6)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 326 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 6)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 327 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 2) (va_op_vec_opr_vec 6)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 328 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 3) (va_op_vec_opr_vec 6)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 329 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 4) (va_op_vec_opr_vec 6)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 330 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_quick_Vcipher (va_op_vec_opr_vec 5) (va_op_vec_opr_vec 5) (va_op_vec_opr_vec 6)) (va_QEmpty
    (())))))))))))


val va_lemma_AES256EncryptRound_6way : va_b0:va_code -> va_s0:va_state -> n:nat8 -> init1:quad32 ->
  init2:quad32 -> init3:quad32 -> init4:quad32 -> init5:quad32 -> init6:quad32 -> round_keys:(seq
  quad32) -> keys_buffer:buffer128
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_AES256EncryptRound_6way n) va_s0 /\ va_get_ok va_s0 /\
    (1 <= n /\ n < 14 /\ 14 <= FStar.Seq.Base.length #quad32 round_keys) /\ va_get_vec 0 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init1 round_keys (n - 1) /\ va_get_vec 1 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init2 round_keys (n - 1) /\ va_get_vec 2 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init3 round_keys (n - 1) /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init4 round_keys (n - 1) /\ va_get_vec 4 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init5 round_keys (n - 1) /\ va_get_vec 5 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init6 round_keys (n - 1) /\ va_get_reg 4 va_s0 ==
    Vale.PPC64LE.Memory.buffer_addr #Vale.PPC64LE.Memory.vuint128 keys_buffer (va_get_mem_heaplet 0
    va_s0) /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 4 va_s0)
    keys_buffer 15 (va_get_mem_layout va_s0) Secret /\ Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read keys_buffer n (va_get_mem_heaplet 0 va_s0)) ==
    FStar.Seq.Base.index #quad32 round_keys n))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    va_get_vec 0 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init1 round_keys n /\ va_get_vec 1
    va_sM == Vale.AES.AES_BE_s.eval_rounds_def init2 round_keys n /\ va_get_vec 2 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init3 round_keys n /\ va_get_vec 3 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init4 round_keys n /\ va_get_vec 4 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init5 round_keys n /\ va_get_vec 5 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init6 round_keys n /\ va_state_eq va_sM (va_update_vec 6
    va_sM (va_update_vec 5 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_ok va_sM
    va_s0)))))))))))
[@"opaque_to_smt"]
let va_lemma_AES256EncryptRound_6way va_b0 va_s0 n init1 init2 init3 init4 init5 init6 round_keys
  keys_buffer =
  let (va_mods:va_mods_t) = [va_Mod_vec 6; va_Mod_vec 5; 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_ok] in
  let va_qc = va_qcode_AES256EncryptRound_6way va_mods n init1 init2 init3 init4 init5 init6
    round_keys keys_buffer in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_AES256EncryptRound_6way n) va_qc va_s0
    (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 289 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 316 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 0 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init1 round_keys n) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 317 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 1 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init2 round_keys n) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 318 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 2 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init3 round_keys n) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 319 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 3 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init4 round_keys n) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 320 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 4 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init5 round_keys n) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 321 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.AES256.vaf *****"
    (va_get_vec 5 va_sM == Vale.AES.AES_BE_s.eval_rounds_def init6 round_keys n)) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_vec 6; va_Mod_vec 5; 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_ok]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_AES256EncryptRound_6way (n:nat8) (init1:quad32) (init2:quad32) (init3:quad32)
  (init4:quad32) (init5:quad32) (init6:quad32) (round_keys:(seq quad32)) (keys_buffer:buffer128)
  (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (1 <= n /\ n < 14 /\ 14 <= FStar.Seq.Base.length #quad32 round_keys) /\
    va_get_vec 0 va_s0 == Vale.AES.AES_BE_s.eval_rounds_def init1 round_keys (n - 1) /\ va_get_vec
    1 va_s0 == Vale.AES.AES_BE_s.eval_rounds_def init2 round_keys (n - 1) /\ va_get_vec 2 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init3 round_keys (n - 1) /\ va_get_vec 3 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init4 round_keys (n - 1) /\ va_get_vec 4 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init5 round_keys (n - 1) /\ va_get_vec 5 va_s0 ==
    Vale.AES.AES_BE_s.eval_rounds_def init6 round_keys (n - 1) /\ va_get_reg 4 va_s0 ==
    Vale.PPC64LE.Memory.buffer_addr #Vale.PPC64LE.Memory.vuint128 keys_buffer (va_get_mem_heaplet 0
    va_s0) /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 4 va_s0)
    keys_buffer 15 (va_get_mem_layout va_s0) Secret /\ Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read keys_buffer n (va_get_mem_heaplet 0 va_s0)) ==
    FStar.Seq.Base.index #quad32 round_keys n /\ (forall (va_x_r10:nat64) (va_x_v0:quad32)
    (va_x_v1:quad32) (va_x_v2:quad32) (va_x_v3:quad32) (va_x_v4:quad32) (va_x_v5:quad32)
    (va_x_v6:quad32) . let va_sM = va_upd_vec 6 va_x_v6 (va_upd_vec 5 va_x_v5 (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_s0))))))) in va_get_ok va_sM /\ va_get_vec 0 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init1 round_keys n /\ va_get_vec 1 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init2 round_keys n /\ va_get_vec 2 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init3 round_keys n /\ va_get_vec 3 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init4 round_keys n /\ va_get_vec 4 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init5 round_keys n /\ va_get_vec 5 va_sM ==
    Vale.AES.AES_BE_s.eval_rounds_def init6 round_keys n ==> va_k va_sM (())))


val va_wpProof_AES256EncryptRound_6way : n:nat8 -> init1:quad32 -> init2:quad32 -> init3:quad32 ->
  init4:quad32 -> init5:quad32 -> init6:quad32 -> round_keys:(seq quad32) -> keys_buffer: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_AES256EncryptRound_6way n init1 init2 init3 init4 init5
    init6 round_keys keys_buffer va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_AES256EncryptRound_6way n)
    ([va_Mod_vec 6; va_Mod_vec 5; 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_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
val va_wpProof_AES256EncryptRound_6way : n:nat8 -> init1:quad32 -> init2:quad32 -> init3:quad32 ->
  init4:quad32 -> init5:quad32 -> init6:quad32 -> round_keys:(seq quad32) -> keys_buffer: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_AES256EncryptRound_6way n init1 init2 init3 init4 init5
    init6 round_keys keys_buffer va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_AES256EncryptRound_6way n)
    ([va_Mod_vec 6; va_Mod_vec 5; 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_s0 va_k ((va_sM, va_f0, va_g))))

    n: Vale.PPC64LE.Memory.nat8 ->
    init1: Vale.PPC64LE.Memory.quad32 ->
    init2: Vale.PPC64LE.Memory.quad32 ->
    init3: Vale.PPC64LE.Memory.quad32 ->
    init4: Vale.PPC64LE.Memory.quad32 ->
    init5: Vale.PPC64LE.Memory.quad32 ->
    init6: Vale.PPC64LE.Memory.quad32 ->
    round_keys: FStar.Seq.Base.seq Vale.PPC64LE.Memory.quad32 ->
    keys_buffer: Vale.PPC64LE.Memory.buffer128 ->
    va_s0: Vale.PPC64LE.Decls.va_state ->
    va_k: (_: Vale.PPC64LE.Decls.va_state -> _: Prims.unit -> Type0)
  -> Prims.Ghost ((Vale.PPC64LE.Decls.va_state * Vale.PPC64LE.Decls.va_fuel) * Prims.unit)