val va_code_Loop6x_partial : alg:algorithm -> Tot va_code
let va_code_Loop6x_partial alg =
  (va_get_result (va_transform_Loop6x_partial alg))
val va_code_Loop6x_partial : alg:algorithm -> Tot va_code
let va_code_Loop6x_partial alg =
(va_get_result (va_transform_Loop6x_partial alg))
Vale.AES.X64.AESopt.fst.checked
Vale.X64.State.fsti.checked Vale.X64.QuickCodes.fsti.checked Vale.X64.QuickCode.fst.checked Vale.X64.Memory.fsti.checked Vale.X64.Machine_s.fst.checked Vale.X64.InsVector.fsti.checked Vale.X64.InsMem.fsti.checked Vale.X64.InsBasic.fsti.checked Vale.X64.InsAes.fsti.checked Vale.X64.Flags.fsti.checked Vale.X64.Decls.fsti.checked Vale.X64.CPU_Features_s.fst.checked Vale.Transformers.Transform.fsti.checked Vale.Math.Poly2_s.fsti.checked Vale.Math.Poly2.Bits_s.fsti.checked Vale.Math.Poly2.Bits.fsti.checked Vale.Def.Words_s.fsti.checked Vale.Def.Types_s.fst.checked Vale.Def.Prop_s.fst.checked Vale.Def.Opaque_s.fsti.checked Vale.Arch.TypesNative.fsti.checked Vale.Arch.Types.fsti.checked Vale.Arch.HeapImpl.fsti.checked Vale.AES.X64.PolyOps.fsti.checked Vale.AES.X64.AESopt2.fsti.checked Vale.AES.X64.AESGCM_expected_code.fsti.checked Vale.AES.GHash.fsti.checked Vale.AES.GF128_s.fsti.checked Vale.AES.GF128.fsti.checked Vale.AES.GCTR_s.fst.checked Vale.AES.GCTR.fsti.checked Vale.AES.GCM_helpers.fsti.checked Vale.AES.AES_s.fst.checked Vale.AES.AES_helpers.fsti.checked Vale.AES.AES_common_s.fst.checked prims.fst.checked FStar.Seq.Base.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Mul.fst.checked
Vale.AES.X64.AESopt.fst
Vale.AES.AES_common_s.algorithm Vale.X64.Decls.va_get_result Vale.AES.X64.AESopt.va_transform_Loop6x_partial Vale.X64.Decls.va_code
module Vale.AES.X64.AESopt
open FStar.Mul
open Vale.Def.Prop_s
open Vale.Def.Opaque_s
open Vale.Def.Words_s
open Vale.Def.Types_s
open FStar.Seq
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.AES.AES_s
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.InsMem
open Vale.X64.InsVector
open Vale.X64.InsAes
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.AES.AES_helpers
//open Vale.Poly1305.Math    // For lemma_poly_bits64()
open Vale.AES.GCM_helpers
open Vale.AES.GCTR_s
open Vale.AES.GCTR
open Vale.Arch.TypesNative
open Vale.X64.CPU_Features_s
open Vale.Math.Poly2_s
open Vale.AES.GF128_s
open Vale.AES.GF128
open Vale.AES.GHash
open Vale.AES.X64.PolyOps
open Vale.AES.X64.AESopt2
open Vale.AES.X64.AESGCM_expected_code
open Vale.Transformers.Transform
open FStar.Mul
let add = Vale.Math.Poly2_s.add
#reset-options "--z3rlimit 30"
//-- finish_aes_encrypt_le


val finish_aes_encrypt_le : alg:algorithm -> input_LE:quad32 -> key:(seq nat32)
  -> Lemma
  (requires (Vale.AES.AES_s.is_aes_key_LE alg key))
  (ensures (Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg
    input_LE (Vale.AES.AES_s.key_to_round_keys_LE alg key)))
let finish_aes_encrypt_le alg input_LE key =
  Vale.AES.AES_s.aes_encrypt_LE_reveal ();
  Vale.AES.AES_s.eval_cipher_reveal ();
  ()
//--
//-- Load_two_lsb

[@ "opaque_to_smt"]
let va_code_Load_two_lsb dst =
  (va_Block (va_CCons (va_code_ZeroXmm dst) (va_CCons (va_code_PinsrqImm dst 2 0
    (va_op_reg_opr64_reg64 rR11)) (va_CNil ()))))

[@ "opaque_to_smt"]
let va_codegen_success_Load_two_lsb dst =
  (va_pbool_and (va_codegen_success_ZeroXmm dst) (va_pbool_and (va_codegen_success_PinsrqImm dst 2
    0 (va_op_reg_opr64_reg64 rR11)) (va_ttrue ())))

[@"opaque_to_smt"]
let va_lemma_Load_two_lsb va_b0 va_s0 dst =
  va_reveal_opaque (`%va_code_Load_two_lsb) (va_code_Load_two_lsb dst);
  let (va_old_s:va_state) = va_s0 in
  let (va_b1:va_codes) = va_get_block va_b0 in
  let (va_s3, va_fc3) = va_lemma_ZeroXmm (va_hd va_b1) va_s0 dst in
  let va_b3 = va_tl va_b1 in
  Vale.Arch.Types.lemma_insert_nat64_nat32s (va_eval_xmm va_s3 dst) 2 0;
  assert (Vale.Arch.Types.two_to_nat32 (Vale.Def.Words_s.Mktwo #Vale.Def.Words_s.nat32 2 0) == 2);
  let (va_s6, va_fc6) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 2 0 (va_op_reg_opr64_reg64 rR11)
    in
  let va_b6 = va_tl va_b3 in
  let (va_sM, va_f6) = va_lemma_empty_total va_s6 va_b6 in
  let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc6 va_s6 va_f6 va_sM in
  let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in
  (va_sM, va_fM)


[@"opaque_to_smt"]
let va_wpProof_Load_two_lsb dst va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Load_two_lsb (va_code_Load_two_lsb dst) va_s0 dst in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_ok va_sM
    (va_update_operand_xmm dst va_sM va_s0)))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_mod_xmm dst]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

//--
//-- Load_0xc2_msb

val va_code_Load_0xc2_msb : dst:va_operand_xmm -> Tot va_code
[@ "opaque_to_smt"]
let va_code_Load_0xc2_msb dst =
  (va_Block (va_CCons (va_code_ZeroXmm dst) (va_CCons (va_code_PinsrqImm dst 13979173243358019584 1
    (va_op_reg_opr64_reg64 rR11)) (va_CNil ()))))

val va_codegen_success_Load_0xc2_msb : dst:va_operand_xmm -> Tot va_pbool
[@ "opaque_to_smt"]
let va_codegen_success_Load_0xc2_msb dst =
  (va_pbool_and (va_codegen_success_ZeroXmm dst) (va_pbool_and (va_codegen_success_PinsrqImm dst
    13979173243358019584 1 (va_op_reg_opr64_reg64 rR11)) (va_ttrue ())))


val va_lemma_Load_0xc2_msb : va_b0:va_code -> va_s0:va_state -> dst:va_operand_xmm
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Load_0xc2_msb dst) va_s0 /\ va_is_dst_xmm dst va_s0 /\
    va_get_ok va_s0 /\ sse_enabled))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    va_eval_xmm va_sM dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 3254779904 /\
    va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_ok va_sM
    (va_update_operand_xmm dst va_sM va_s0))))))
[@"opaque_to_smt"]
let va_lemma_Load_0xc2_msb va_b0 va_s0 dst =
  va_reveal_opaque (`%va_code_Load_0xc2_msb) (va_code_Load_0xc2_msb dst);
  let (va_old_s:va_state) = va_s0 in
  let (va_b1:va_codes) = va_get_block va_b0 in
  let (va_s3, va_fc3) = va_lemma_ZeroXmm (va_hd va_b1) va_s0 dst in
  let va_b3 = va_tl va_b1 in
  assert (Vale.Arch.Types.two_to_nat32 (Vale.Def.Words_s.Mktwo #Vale.Def.Words_s.nat32 0
    3254779904) == 13979173243358019584);
  Vale.Arch.Types.lemma_insert_nat64_nat32s (va_eval_xmm va_s3 dst) 0 3254779904;
  let (va_s6, va_fc6) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 13979173243358019584 1
    (va_op_reg_opr64_reg64 rR11) in
  let va_b6 = va_tl va_b3 in
  let (va_sM, va_f6) = va_lemma_empty_total va_s6 va_b6 in
  let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc6 va_s6 va_f6 va_sM in
  let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Load_0xc2_msb (dst:va_operand_xmm) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) :
  Type0 =
  (va_is_dst_xmm dst va_s0 /\ va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_dst:va_value_xmm)
    (va_x_r11:nat64) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_reg64
    rR11 va_x_r11 (va_upd_operand_xmm dst va_x_dst va_s0)) in va_get_ok va_sM /\ va_eval_xmm va_sM
    dst == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 3254779904 ==> va_k va_sM (())))


val va_wpProof_Load_0xc2_msb : dst:va_operand_xmm -> va_s0:va_state -> va_k:(va_state -> unit ->
  Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Load_0xc2_msb dst va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Load_0xc2_msb dst) ([va_Mod_flags;
    va_Mod_reg64 rR11; va_mod_xmm dst]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Load_0xc2_msb dst va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Load_0xc2_msb (va_code_Load_0xc2_msb dst) va_s0 dst in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_ok va_sM
    (va_update_operand_xmm dst va_sM va_s0)))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_mod_xmm dst]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_Load_0xc2_msb (dst:va_operand_xmm) : (va_quickCode unit (va_code_Load_0xc2_msb dst)) =
  (va_QProc (va_code_Load_0xc2_msb dst) ([va_Mod_flags; va_Mod_reg64 rR11; va_mod_xmm dst])
    (va_wp_Load_0xc2_msb dst) (va_wpProof_Load_0xc2_msb dst))
//--
//-- Load_one_lsb

[@ "opaque_to_smt"]
let va_code_Load_one_lsb dst =
  (va_Block (va_CCons (va_code_ZeroXmm dst) (va_CCons (va_code_PinsrqImm dst 1 0
    (va_op_reg_opr64_reg64 rR11)) (va_CNil ()))))

[@ "opaque_to_smt"]
let va_codegen_success_Load_one_lsb dst =
  (va_pbool_and (va_codegen_success_ZeroXmm dst) (va_pbool_and (va_codegen_success_PinsrqImm dst 1
    0 (va_op_reg_opr64_reg64 rR11)) (va_ttrue ())))

[@"opaque_to_smt"]
let va_lemma_Load_one_lsb va_b0 va_s0 dst =
  va_reveal_opaque (`%va_code_Load_one_lsb) (va_code_Load_one_lsb dst);
  let (va_old_s:va_state) = va_s0 in
  let (va_b1:va_codes) = va_get_block va_b0 in
  let (va_s3, va_fc3) = va_lemma_ZeroXmm (va_hd va_b1) va_s0 dst in
  let va_b3 = va_tl va_b1 in
  Vale.Arch.Types.lemma_insert_nat64_nat32s (va_eval_xmm va_s3 dst) 1 0;
  assert (Vale.Arch.Types.two_to_nat32 (Vale.Def.Words_s.Mktwo #Vale.Def.Words_s.nat32 1 0) == 1);
  let (va_s6, va_fc6) = va_lemma_PinsrqImm (va_hd va_b3) va_s3 dst 1 0 (va_op_reg_opr64_reg64 rR11)
    in
  let va_b6 = va_tl va_b3 in
  let (va_sM, va_f6) = va_lemma_empty_total va_s6 va_b6 in
  let va_f3 = va_lemma_merge_total va_b3 va_s3 va_fc6 va_s6 va_f6 va_sM in
  let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc3 va_s3 va_f3 va_sM in
  (va_sM, va_fM)


[@"opaque_to_smt"]
let va_wpProof_Load_one_lsb dst va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Load_one_lsb (va_code_Load_one_lsb dst) va_s0 dst in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_ok va_sM
    (va_update_operand_xmm dst va_sM va_s0)))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_mod_xmm dst]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

//--
//-- Handle_ctr32

val va_code_Handle_ctr32 : va_dummy:unit -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Handle_ctr32 () =
  (va_Block (va_CCons (va_code_InitPshufbMask (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rR11))
    (va_CCons (va_code_VPshufb (va_op_xmm_xmm 6) (va_op_xmm_xmm 1) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_Load_one_lsb (va_op_xmm_xmm 5)) (va_CCons (va_code_VPaddd (va_op_xmm_xmm 10)
    (va_op_xmm_xmm 6) (va_op_xmm_xmm 5)) (va_CCons (va_code_Load_two_lsb (va_op_xmm_xmm 5))
    (va_CCons (va_code_VPaddd (va_op_xmm_xmm 11) (va_op_xmm_xmm 6) (va_op_xmm_xmm 5)) (va_CCons
    (va_code_VPaddd (va_op_xmm_xmm 12) (va_op_xmm_xmm 10) (va_op_xmm_xmm 5)) (va_CCons
    (va_code_VPshufb (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_VPaddd (va_op_xmm_xmm 13) (va_op_xmm_xmm 11) (va_op_xmm_xmm 5)) (va_CCons
    (va_code_VPshufb (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_VPxor (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_opr128_xmm 15)) (va_CCons
    (va_code_VPaddd (va_op_xmm_xmm 14) (va_op_xmm_xmm 12) (va_op_xmm_xmm 5)) (va_CCons
    (va_code_VPshufb (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_VPxor (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_opr128_xmm 15)) (va_CCons
    (va_code_VPaddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 13) (va_op_xmm_xmm 5)) (va_CCons
    (va_code_VPshufb (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_VPshufb (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_VPshufb (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) (va_op_xmm_xmm 0)) (va_CNil
    ()))))))))))))))))))))

val va_codegen_success_Handle_ctr32 : va_dummy:unit -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Handle_ctr32 () =
  (va_pbool_and (va_codegen_success_InitPshufbMask (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rR11))
    (va_pbool_and (va_codegen_success_VPshufb (va_op_xmm_xmm 6) (va_op_xmm_xmm 1) (va_op_xmm_xmm
    0)) (va_pbool_and (va_codegen_success_Load_one_lsb (va_op_xmm_xmm 5)) (va_pbool_and
    (va_codegen_success_VPaddd (va_op_xmm_xmm 10) (va_op_xmm_xmm 6) (va_op_xmm_xmm 5))
    (va_pbool_and (va_codegen_success_Load_two_lsb (va_op_xmm_xmm 5)) (va_pbool_and
    (va_codegen_success_VPaddd (va_op_xmm_xmm 11) (va_op_xmm_xmm 6) (va_op_xmm_xmm 5))
    (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm 12) (va_op_xmm_xmm 10) (va_op_xmm_xmm
    5)) (va_pbool_and (va_codegen_success_VPshufb (va_op_xmm_xmm 10) (va_op_xmm_xmm 10)
    (va_op_xmm_xmm 0)) (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm 13) (va_op_xmm_xmm
    11) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_VPshufb (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 11) (va_op_xmm_xmm 0)) (va_pbool_and (va_codegen_success_VPxor (va_op_xmm_xmm
    10) (va_op_xmm_xmm 10) (va_op_opr128_xmm 15)) (va_pbool_and (va_codegen_success_VPaddd
    (va_op_xmm_xmm 14) (va_op_xmm_xmm 12) (va_op_xmm_xmm 5)) (va_pbool_and
    (va_codegen_success_VPshufb (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 0))
    (va_pbool_and (va_codegen_success_VPxor (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_opr128_xmm
    15)) (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_VPshufb (va_op_xmm_xmm 13) (va_op_xmm_xmm
    13) (va_op_xmm_xmm 0)) (va_pbool_and (va_codegen_success_VPshufb (va_op_xmm_xmm 14)
    (va_op_xmm_xmm 14) (va_op_xmm_xmm 0)) (va_pbool_and (va_codegen_success_VPshufb (va_op_xmm_xmm
    1) (va_op_xmm_xmm 1) (va_op_xmm_xmm 0)) (va_ttrue ())))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Handle_ctr32 (va_mods:va_mods_t) (ctr_BE:quad32) : (va_quickCode unit
  (va_code_Handle_ctr32 ())) =
  (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 256 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_InitPshufbMask (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rR11)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 257 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 6) (va_op_xmm_xmm 1) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 261 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load_one_lsb (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 262 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 10) (va_op_xmm_xmm 6) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 263 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load_two_lsb (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 264 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 11) (va_op_xmm_xmm 6) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 12) (va_op_xmm_xmm 10) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 266 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 267 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 13) (va_op_xmm_xmm 11) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 268 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 269 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_opr128_xmm 15)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 270 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 14) (va_op_xmm_xmm 12) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 271 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 272 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_opr128_xmm 15)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 273 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 13) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 274 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 275 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 276 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPshufb (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) (va_op_xmm_xmm 0)) (va_QEmpty
    (())))))))))))))))))))))


val va_lemma_Handle_ctr32 : va_b0:va_code -> va_s0:va_state -> ctr_BE:quad32
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Handle_ctr32 ()) va_s0 /\ va_get_ok va_s0 /\
    (avx_enabled /\ sse_enabled /\ va_get_xmm 1 va_s0 == Vale.Def.Types_s.reverse_bytes_quad32
    ctr_BE)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm 13 va_sM, va_get_xmm
    14 va_sM, va_get_xmm 1 va_sM) == xor_reverse_inc32lite_6 2 1 ctr_BE (va_get_xmm 15 va_sM) /\
    va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM
    (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 6 va_sM
    (va_update_xmm 5 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM
    (va_update_reg64 rR11 va_sM (va_update_ok va_sM va_s0)))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Handle_ctr32 va_b0 va_s0 ctr_BE =
  let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm
    11; va_Mod_xmm 10; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0;
    va_Mod_reg64 rR11; va_Mod_ok] in
  let va_qc = va_qcode_Handle_ctr32 va_mods ctr_BE in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Handle_ctr32 ()) va_qc va_s0 (fun va_s0
    va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 234 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 254 column 107 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm 13 va_sM,
    va_get_xmm 14 va_sM, va_get_xmm 1 va_sM) == xor_reverse_inc32lite_6 2 1 ctr_BE (va_get_xmm 15
    va_sM))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11;
    va_Mod_xmm 10; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0;
    va_Mod_reg64 rR11; va_Mod_ok]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Handle_ctr32 (ctr_BE:quad32) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (avx_enabled /\ sse_enabled /\ va_get_xmm 1 va_s0 ==
    Vale.Def.Types_s.reverse_bytes_quad32 ctr_BE) /\ (forall (va_x_r11:nat64) (va_x_xmm0:quad32)
    (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm10:quad32)
    (va_x_xmm11:quad32) (va_x_xmm12:quad32) (va_x_xmm13:quad32) (va_x_xmm14:quad32)
    (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 14 va_x_xmm14
    (va_upd_xmm 13 va_x_xmm13 (va_upd_xmm 12 va_x_xmm12 (va_upd_xmm 11 va_x_xmm11 (va_upd_xmm 10
    va_x_xmm10 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm
    1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rR11 va_x_r11 va_s0))))))))))) in va_get_ok
    va_sM /\ (va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm 13 va_sM,
    va_get_xmm 14 va_sM, va_get_xmm 1 va_sM) == xor_reverse_inc32lite_6 2 1 ctr_BE (va_get_xmm 15
    va_sM) ==> va_k va_sM (())))


val va_wpProof_Handle_ctr32 : ctr_BE:quad32 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Handle_ctr32 ctr_BE va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Handle_ctr32 ()) ([va_Mod_flags;
    va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 6;
    va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR11]) va_s0 va_k ((va_sM,
    va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Handle_ctr32 ctr_BE va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Handle_ctr32 (va_code_Handle_ctr32 ()) va_s0 ctr_BE in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM
    (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 6 va_sM
    (va_update_xmm 5 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM
    (va_update_reg64 rR11 va_sM (va_update_ok va_sM va_s0))))))))))))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11;
    va_Mod_xmm 10; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0;
    va_Mod_reg64 rR11]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_Handle_ctr32 (ctr_BE:quad32) : (va_quickCode unit (va_code_Handle_ctr32 ())) =
  (va_QProc (va_code_Handle_ctr32 ()) ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12;
    va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1;
    va_Mod_xmm 0; va_Mod_reg64 rR11]) (va_wp_Handle_ctr32 ctr_BE) (va_wpProof_Handle_ctr32 ctr_BE))
//--
//-- Loop6x_ctr_update

val va_code_Loop6x_ctr_update : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Loop6x_ctr_update alg =
  (va_Block (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 6)) (va_CCons
    (va_IfElse (va_cmp_ge (va_op_cmp_reg64 rRbx) (va_const_cmp 256)) (va_Block (va_CCons
    (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64
    rR9) (0 - 32) Secret) (va_CCons (va_code_Handle_ctr32 ()) (va_CCons (va_code_Sub64
    (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CNil ()))))) (va_Block (va_CCons
    (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64
    rR9) (0 - 32) Secret) (va_CCons (va_code_VPaddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)
    (va_op_xmm_xmm 14)) (va_CCons (va_code_VPxor (va_op_xmm_xmm 10) (va_op_xmm_xmm 10)
    (va_op_opr128_xmm 15)) (va_CCons (va_code_VPxor (va_op_xmm_xmm 11) (va_op_xmm_xmm 11)
    (va_op_opr128_xmm 15)) (va_CNil ()))))))) (va_CNil ()))))

val va_codegen_success_Loop6x_ctr_update : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Loop6x_ctr_update alg =
  (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 6))
    (va_pbool_and (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0)
    (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rR9) (0 - 32) Secret) (va_pbool_and
    (va_codegen_success_Handle_ctr32 ()) (va_pbool_and (va_codegen_success_Sub64
    (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and
    (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3)
    (va_op_reg_opr64_reg64 rR9) (0 - 32) Secret) (va_pbool_and (va_codegen_success_VPaddd
    (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 14)) (va_pbool_and (va_codegen_success_VPxor
    (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_opr128_xmm 15)) (va_codegen_success_VPxor
    (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_opr128_xmm 15)))))))) (va_ttrue ())))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Loop6x_ctr_update (va_mods:va_mods_t) (alg:algorithm) (h_LE:quad32) (key_words:(seq
  nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (ctr_BE:quad32) :
  (va_quickCode unit (va_code_Loop6x_ctr_update alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let
    (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Add64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 6)) (fun (va_s:va_state) _ ->
    va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 340 column 8 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_qIf va_mods (Cmp_ge (va_op_cmp_reg64 rRbx) (va_const_cmp 256)) (qblock va_mods (fun
    (va_s:va_state) -> va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 341 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64
    rR9) (0 - 32) Secret hkeys_b 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 342 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Handle_ctr32 ctr_BE) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 343 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Sub64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_QEmpty (())))))) (qblock
    va_mods (fun (va_s:va_state) -> va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 345 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64
    rR9) (0 - 32) Secret hkeys_b 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 346 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 14)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 347 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_opr128_xmm 15)) (va_QBind
    va_range1
    "***** PRECONDITION NOT MET AT line 348 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_opr128_xmm 15)) (fun
    (va_s:va_state) _ -> let (va_arg36:Prims.nat) = va_get_reg64 rRbx va_old_s in let
    (va_arg35:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let
    (va_arg34:Vale.Def.Types_s.quad32) = va_get_xmm 14 va_s in let
    (va_arg33:Vale.Def.Types_s.quad32) = ctr_BE in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 349 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.lemma_msb_in_bounds va_arg33 va_arg34 va_arg35 va_arg36)
    (va_QEmpty (()))))))))) (fun (va_s:va_state) va_g -> va_QEmpty (())))))


val va_lemma_Loop6x_ctr_update : va_b0:va_code -> va_s0:va_state -> alg:algorithm -> h_LE:quad32 ->
  key_words:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 -> hkeys_b:buffer128 ->
  ctr_BE:quad32
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Loop6x_ctr_update alg) va_s0 /\ va_get_ok va_s0 /\
    (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in sse_enabled /\ aes_reqs_offset alg key_words
    round_keys keys_b (va_get_reg64 rRcx va_s0) (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout
    va_s0) /\ va_get_xmm 2 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 16777216
    /\ va_get_xmm 1 va_s0 == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE
    0) /\ va_get_reg64 rRbx va_s0 == Vale.Def.Words_s.__proj__Mkfour__item__lo0 ctr_BE `op_Modulus`
    256 /\ va_get_xmm 9 va_s0 == Vale.Def.Types_s.quad32_xor (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.AES.GCTR.inc32lite ctr_BE 0)) (va_get_xmm 15 va_s0) /\ (va_get_reg64 rRbx va_s0 + 6 < 256
    ==> (va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm 12 va_s0,
    va_get_xmm 13 va_s0, va_get_xmm 14 va_s0) == xor_reverse_inc32lite_6 1 0 ctr_BE (va_get_xmm 15
    va_s0)) /\ hkeys_b_powers hkeys_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0)
    (va_get_reg64 rR9 va_s0 - 32) h)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in va_get_xmm 1 va_sM ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 6) /\ (0 <= va_get_reg64
    rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ va_get_reg64 rRbx va_sM ==
    Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite ctr_BE 6) `op_Modulus` 256
    /\ (va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM,
    va_get_xmm 13 va_sM, va_get_xmm 14 va_sM) == xor_reverse_inc32lite_6 3 0 ctr_BE (va_get_xmm 15
    va_sM) /\ va_get_xmm 3 va_sM == Vale.X64.Decls.buffer128_read hkeys_b 0 (va_get_mem_heaplet 0
    va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 14 va_sM (va_update_xmm 13
    va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9
    va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1
    va_sM (va_update_xmm 0 va_sM (va_update_xmm 3 va_sM (va_update_reg64 rR11 va_sM
    (va_update_reg64 rRbx va_sM (va_update_ok va_sM va_s0))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Loop6x_ctr_update va_b0 va_s0 alg h_LE key_words round_keys keys_b hkeys_b ctr_BE =
  let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm
    11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1;
    va_Mod_xmm 0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx; va_Mod_ok] in
  let va_qc = va_qcode_Loop6x_ctr_update va_mods alg h_LE key_words round_keys keys_b hkeys_b
    ctr_BE in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop6x_ctr_update alg) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 279 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in label va_range1
    "***** POSTCONDITION NOT MET AT line 330 column 57 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 1 va_sM == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE
    6)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 331 column 27 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (0 <= va_get_reg64 rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 332 column 50 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rRbx va_sM == Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite
    ctr_BE 6) `op_Modulus` 256) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 334 column 58 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm
    13 va_sM, va_get_xmm 14 va_sM) == xor_reverse_inc32lite_6 3 0 ctr_BE (va_get_xmm 15 va_sM)) /\
    label va_range1
    "***** POSTCONDITION NOT MET AT line 335 column 50 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 3 va_sM == Vale.X64.Decls.buffer128_read hkeys_b 0 (va_get_mem_heaplet 0 va_sM))))
    in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11;
    va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm
    0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx; va_Mod_ok]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Loop6x_ctr_update (alg:algorithm) (h_LE:quad32) (key_words:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (ctr_BE:quad32) (va_s0:va_state) (va_k:(va_state
  -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in sse_enabled /\ aes_reqs_offset alg key_words
    round_keys keys_b (va_get_reg64 rRcx va_s0) (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout
    va_s0) /\ va_get_xmm 2 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 16777216
    /\ va_get_xmm 1 va_s0 == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE
    0) /\ va_get_reg64 rRbx va_s0 == Vale.Def.Words_s.__proj__Mkfour__item__lo0 ctr_BE `op_Modulus`
    256 /\ va_get_xmm 9 va_s0 == Vale.Def.Types_s.quad32_xor (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.AES.GCTR.inc32lite ctr_BE 0)) (va_get_xmm 15 va_s0) /\ (va_get_reg64 rRbx va_s0 + 6 < 256
    ==> (va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm 12 va_s0,
    va_get_xmm 13 va_s0, va_get_xmm 14 va_s0) == xor_reverse_inc32lite_6 1 0 ctr_BE (va_get_xmm 15
    va_s0)) /\ hkeys_b_powers hkeys_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0)
    (va_get_reg64 rR9 va_s0 - 32) h) /\ (forall (va_x_rbx:nat64) (va_x_r11:nat64)
    (va_x_xmm3:quad32) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm5:quad32)
    (va_x_xmm6:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_xmm11:quad32)
    (va_x_xmm12:quad32) (va_x_xmm13:quad32) (va_x_xmm14:quad32) (va_x_efl:Vale.X64.Flags.t) . let
    va_sM = va_upd_flags va_x_efl (va_upd_xmm 14 va_x_xmm14 (va_upd_xmm 13 va_x_xmm13 (va_upd_xmm
    12 va_x_xmm12 (va_upd_xmm 11 va_x_xmm11 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9
    (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1
    (va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 3 va_x_xmm3 (va_upd_reg64 rR11 va_x_r11 (va_upd_reg64 rRbx
    va_x_rbx va_s0)))))))))))))) in va_get_ok va_sM /\ (let (h:Vale.Math.Poly2_s.poly) =
    Vale.Math.Poly2.Bits_s.of_quad32 (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in va_get_xmm 1
    va_sM == Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 6) /\ (0 <=
    va_get_reg64 rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ va_get_reg64 rRbx va_sM ==
    Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite ctr_BE 6) `op_Modulus` 256
    /\ (va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM,
    va_get_xmm 13 va_sM, va_get_xmm 14 va_sM) == xor_reverse_inc32lite_6 3 0 ctr_BE (va_get_xmm 15
    va_sM) /\ va_get_xmm 3 va_sM == Vale.X64.Decls.buffer128_read hkeys_b 0 (va_get_mem_heaplet 0
    va_sM)) ==> va_k va_sM (())))


val va_wpProof_Loop6x_ctr_update : alg:algorithm -> h_LE:quad32 -> key_words:(seq nat32) ->
  round_keys:(seq quad32) -> keys_b:buffer128 -> hkeys_b:buffer128 -> ctr_BE:quad32 ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Loop6x_ctr_update alg h_LE key_words round_keys keys_b
    hkeys_b ctr_BE va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop6x_ctr_update alg) ([va_Mod_flags;
    va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9;
    va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_xmm 3;
    va_Mod_reg64 rR11; va_Mod_reg64 rRbx]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Loop6x_ctr_update alg h_LE key_words round_keys keys_b hkeys_b ctr_BE va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_ctr_update (va_code_Loop6x_ctr_update alg) va_s0 alg h_LE
    key_words round_keys keys_b hkeys_b ctr_BE in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM
    (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM
    (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM
    (va_update_xmm 0 va_sM (va_update_xmm 3 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rRbx
    va_sM (va_update_ok va_sM va_s0)))))))))))))))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11;
    va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm
    0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_Loop6x_ctr_update (alg:algorithm) (h_LE:quad32) (key_words:(seq nat32))
  (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (ctr_BE:quad32) : (va_quickCode
  unit (va_code_Loop6x_ctr_update alg)) =
  (va_QProc (va_code_Loop6x_ctr_update alg) ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13;
    va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5;
    va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx])
    (va_wp_Loop6x_ctr_update alg h_LE key_words round_keys keys_b hkeys_b ctr_BE)
    (va_wpProof_Loop6x_ctr_update alg h_LE key_words round_keys keys_b hkeys_b ctr_BE))
//--
//-- Loop6x_plain

val va_code_Loop6x_plain : alg:algorithm -> rnd:nat -> rndkey:va_operand_xmm -> Tot va_code
[@ "opaque_to_smt"]
let va_code_Loop6x_plain alg rnd rndkey =
  (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) rndkey
    (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` (rnd + 1) - 128) Secret) (va_CCons
    (va_code_VAESNI_enc (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) rndkey) (va_CCons (va_code_VAESNI_enc
    (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) rndkey) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 11) rndkey) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 12) (va_op_xmm_xmm 12)
    rndkey) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) rndkey) (va_CCons
    (va_code_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) rndkey) (va_CNil ())))))))))

val va_codegen_success_Loop6x_plain : alg:algorithm -> rnd:nat -> rndkey:va_operand_xmm -> Tot
  va_pbool
[@ "opaque_to_smt"]
let va_codegen_success_Loop6x_plain alg rnd rndkey =
  (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) rndkey
    (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` (rnd + 1) - 128) Secret) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) rndkey) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) rndkey) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) rndkey) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) rndkey) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) rndkey) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) rndkey) (va_ttrue
    ()))))))))


val va_lemma_Loop6x_plain : va_b0:va_code -> va_s0:va_state -> alg:algorithm -> rnd:nat ->
  key_words:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 -> init:quad32_6 ->
  rndkey:va_operand_xmm
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Loop6x_plain alg rnd rndkey) va_s0 /\ va_is_dst_xmm
    rndkey va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ (rndkey == 1 \/ rndkey == 2 \/ rndkey == 15)
    /\ aes_reqs_offset alg key_words round_keys keys_b (va_get_reg64 rRcx va_s0)
    (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\ rnd + 1 < FStar.Seq.Base.length
    #quad32 round_keys /\ (va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm
    12 va_s0, va_get_xmm 13 va_s0, va_get_xmm 14 va_s0) == rounds_opaque_6 init round_keys rnd)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm
    13 va_sM, va_get_xmm 14 va_sM) == rounds_opaque_6 init round_keys (rnd + 1) /\ va_state_eq
    va_sM (va_update_flags va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12
    va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_ok
    va_sM (va_update_operand_xmm rndkey va_sM va_s0)))))))))))
[@"opaque_to_smt"]
let va_lemma_Loop6x_plain va_b0 va_s0 alg rnd key_words round_keys keys_b init rndkey =
  va_reveal_opaque (`%va_code_Loop6x_plain) (va_code_Loop6x_plain alg rnd rndkey);
  let (va_old_s:va_state) = va_s0 in
  let (va_b1:va_codes) = va_get_block va_b0 in
  let (va_s9, va_fc9) = va_lemma_Load128_buffer (va_hd va_b1) va_s0 (va_op_heaplet_mem_heaplet 0)
    rndkey (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` (rnd + 1) - 128) Secret keys_b (rnd + 1)
    in
  let va_b9 = va_tl va_b1 in
  let (va_s10, va_fc10) = va_lemma_VAESNI_enc (va_hd va_b9) va_s9 (va_op_xmm_xmm 9) (va_op_xmm_xmm
    9) rndkey in
  let va_b10 = va_tl va_b9 in
  let (va_s11, va_fc11) = va_lemma_VAESNI_enc (va_hd va_b10) va_s10 (va_op_xmm_xmm 10)
    (va_op_xmm_xmm 10) rndkey in
  let va_b11 = va_tl va_b10 in
  let (va_s12, va_fc12) = va_lemma_VAESNI_enc (va_hd va_b11) va_s11 (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 11) rndkey in
  let va_b12 = va_tl va_b11 in
  let (va_s13, va_fc13) = va_lemma_VAESNI_enc (va_hd va_b12) va_s12 (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 12) rndkey in
  let va_b13 = va_tl va_b12 in
  let (va_s14, va_fc14) = va_lemma_VAESNI_enc (va_hd va_b13) va_s13 (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 13) rndkey in
  let va_b14 = va_tl va_b13 in
  let (va_s15, va_fc15) = va_lemma_VAESNI_enc (va_hd va_b14) va_s14 (va_op_xmm_xmm 14)
    (va_op_xmm_xmm 14) rndkey in
  let va_b15 = va_tl va_b14 in
  Vale.AES.AES_s.eval_rounds_reveal ();
  Vale.AES.AES_helpers.commute_sub_bytes_shift_rows_forall ();
  let (va_sM, va_f15) = va_lemma_empty_total va_s15 va_b15 in
  let va_f14 = va_lemma_merge_total va_b14 va_s14 va_fc15 va_s15 va_f15 va_sM in
  let va_f13 = va_lemma_merge_total va_b13 va_s13 va_fc14 va_s14 va_f14 va_sM in
  let va_f12 = va_lemma_merge_total va_b12 va_s12 va_fc13 va_s13 va_f13 va_sM in
  let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc12 va_s12 va_f12 va_sM in
  let va_f10 = va_lemma_merge_total va_b10 va_s10 va_fc11 va_s11 va_f11 va_sM in
  let va_f9 = va_lemma_merge_total va_b9 va_s9 va_fc10 va_s10 va_f10 va_sM in
  let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc9 va_s9 va_f9 va_sM in
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Loop6x_plain (alg:algorithm) (rnd:nat) (key_words:(seq nat32)) (round_keys:(seq quad32))
  (keys_b:buffer128) (init:quad32_6) (rndkey:va_operand_xmm) (va_s0:va_state) (va_k:(va_state ->
  unit -> Type0)) : Type0 =
  (va_is_dst_xmm rndkey va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ (rndkey == 1 \/ rndkey == 2 \/
    rndkey == 15) /\ aes_reqs_offset alg key_words round_keys keys_b (va_get_reg64 rRcx va_s0)
    (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\ rnd + 1 < FStar.Seq.Base.length
    #quad32 round_keys /\ (va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm
    12 va_s0, va_get_xmm 13 va_s0, va_get_xmm 14 va_s0) == rounds_opaque_6 init round_keys rnd) /\
    (forall (va_x_rndkey:va_value_xmm) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_xmm11:quad32)
    (va_x_xmm12:quad32) (va_x_xmm13:quad32) (va_x_xmm14:quad32) (va_x_efl:Vale.X64.Flags.t) . let
    va_sM = va_upd_flags va_x_efl (va_upd_xmm 14 va_x_xmm14 (va_upd_xmm 13 va_x_xmm13 (va_upd_xmm
    12 va_x_xmm12 (va_upd_xmm 11 va_x_xmm11 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9
    (va_upd_operand_xmm rndkey va_x_rndkey va_s0))))))) in va_get_ok va_sM /\ (va_get_xmm 9 va_sM,
    va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm 13 va_sM, va_get_xmm
    14 va_sM) == rounds_opaque_6 init round_keys (rnd + 1) ==> va_k va_sM (())))


val va_wpProof_Loop6x_plain : alg:algorithm -> rnd:nat -> key_words:(seq nat32) -> round_keys:(seq
  quad32) -> keys_b:buffer128 -> init:quad32_6 -> rndkey:va_operand_xmm -> va_s0:va_state ->
  va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Loop6x_plain alg rnd key_words round_keys keys_b init
    rndkey va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop6x_plain alg rnd rndkey)
    ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10;
    va_Mod_xmm 9; va_mod_xmm rndkey]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Loop6x_plain alg rnd key_words round_keys keys_b init rndkey va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_plain (va_code_Loop6x_plain alg rnd rndkey) va_s0 alg rnd
    key_words round_keys keys_b init rndkey in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM
    (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM
    (va_update_ok va_sM (va_update_operand_xmm rndkey va_sM va_s0))))))))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11;
    va_Mod_xmm 10; va_Mod_xmm 9; va_mod_xmm rndkey]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_Loop6x_plain (alg:algorithm) (rnd:nat) (key_words:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (init:quad32_6) (rndkey:va_operand_xmm) : (va_quickCode unit
  (va_code_Loop6x_plain alg rnd rndkey)) =
  (va_QProc (va_code_Loop6x_plain alg rnd rndkey) ([va_Mod_flags; va_Mod_xmm 14; va_Mod_xmm 13;
    va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_mod_xmm rndkey])
    (va_wp_Loop6x_plain alg rnd key_words round_keys keys_b init rndkey) (va_wpProof_Loop6x_plain
    alg rnd key_words round_keys keys_b init rndkey))
//--
//-- Loop6x_preamble

val va_code_Loop6x_preamble : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Loop6x_preamble alg =
  (va_Block (va_CCons (va_code_Loop6x_ctr_update alg) (va_CCons (va_code_Store128_buffer
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp) (va_op_xmm_xmm 1) 128 Secret)
    (va_CCons (va_code_VPxor (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_opr128_xmm 15)) (va_CCons
    (va_code_VPxor (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_opr128_xmm 15)) (va_CCons
    (va_code_VPxor (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_opr128_xmm 15)) (va_CNil ())))))))

val va_codegen_success_Loop6x_preamble : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Loop6x_preamble alg =
  (va_pbool_and (va_codegen_success_Loop6x_ctr_update alg) (va_pbool_and
    (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_xmm_xmm 1) 128 Secret) (va_pbool_and (va_codegen_success_VPxor (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 12) (va_op_opr128_xmm 15)) (va_pbool_and (va_codegen_success_VPxor
    (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_opr128_xmm 15)) (va_pbool_and
    (va_codegen_success_VPxor (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_opr128_xmm 15))
    (va_ttrue ()))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Loop6x_preamble (va_mods:va_mods_t) (alg:algorithm) (h_LE:quad32) (iv_b:buffer128)
  (scratch_b:buffer128) (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128)
  (hkeys_b:buffer128) (ctr_BE:quad32) : (va_quickCode unit (va_code_Loop6x_preamble alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let
    (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 477 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_ctr_update alg h_LE key_words round_keys keys_b hkeys_b ctr_BE) (fun
    (va_s:va_state) _ -> let (va_arg43:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys
    in let (va_arg42:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 479 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.init_rounds_opaque va_arg42 va_arg43) (let
    (va_arg41:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys in let
    (va_arg40:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 480 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.init_rounds_opaque va_arg40 va_arg41) (let
    (va_arg39:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys in let
    (va_arg38:Vale.Def.Types_s.quad32) = va_get_xmm 11 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 481 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.init_rounds_opaque va_arg38 va_arg39) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 498 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_xmm_xmm 1) 128 Secret scratch_b 8) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 499 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_opr128_xmm 15)) (fun
    (va_s:va_state) _ -> let (va_arg37:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys
    in let (va_arg36:Vale.Def.Types_s.quad32) = va_get_xmm 12 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 499 column 54 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.init_rounds_opaque va_arg36 va_arg37) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 500 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_opr128_xmm 15)) (fun
    (va_s:va_state) _ -> let (va_arg35:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys
    in let (va_arg34:Vale.Def.Types_s.quad32) = va_get_xmm 13 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 500 column 54 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.init_rounds_opaque va_arg34 va_arg35) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 501 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_opr128_xmm 15)) (fun
    (va_s:va_state) _ -> let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys
    in let (va_arg32:Vale.Def.Types_s.quad32) = va_get_xmm 14 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 501 column 54 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.init_rounds_opaque va_arg32 va_arg33) (va_QEmpty
    (()))))))))))))))


val va_lemma_Loop6x_preamble : va_b0:va_code -> va_s0:va_state -> alg:algorithm -> h_LE:quad32 ->
  iv_b:buffer128 -> scratch_b:buffer128 -> key_words:(seq nat32) -> round_keys:(seq quad32) ->
  keys_b:buffer128 -> hkeys_b:buffer128 -> ctr_BE:quad32
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Loop6x_preamble alg) va_s0 /\ va_get_ok va_s0 /\ (let
    (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in sse_enabled /\ Vale.X64.Decls.validDstAddrs128
    (va_get_mem_heaplet 3 va_s0) (va_get_reg64 rRbp va_s0) scratch_b 9 (va_get_mem_layout va_s0)
    Secret /\ aes_reqs_offset alg key_words round_keys keys_b (va_get_reg64 rRcx va_s0)
    (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\ va_get_xmm 15 va_s0 ==
    FStar.Seq.Base.index #quad32 round_keys 0 /\ va_get_xmm 2 va_s0 == Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 16777216 /\ va_get_xmm 1 va_s0 ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 0) /\ va_get_reg64 rRbx
    va_s0 == Vale.Def.Words_s.__proj__Mkfour__item__lo0 ctr_BE `op_Modulus` 256 /\ va_get_xmm 9
    va_s0 == Vale.Def.Types_s.quad32_xor (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.AES.GCTR.inc32lite ctr_BE 0)) (va_get_xmm 15 va_s0) /\ (va_get_reg64 rRbx va_s0 + 6 < 256
    ==> (va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm 12 va_s0,
    va_get_xmm 13 va_s0, va_get_xmm 14 va_s0) == xor_reverse_inc32lite_6 1 0 ctr_BE (va_get_xmm 15
    va_s0)) /\ hkeys_b_powers hkeys_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0)
    (va_get_reg64 rR9 va_s0 - 32) h)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in Vale.X64.Decls.modifies_buffer_specific128
    scratch_b (va_get_mem_heaplet 3 va_s0) (va_get_mem_heaplet 3 va_sM) 8 8 /\ (let init =
    make_six_of #Vale.Def.Types_s.quad32 (fun (n:(va_int_range 0 5)) -> Vale.Def.Types_s.quad32_xor
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE n)) (va_get_xmm 15
    va_sM)) in (va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM,
    va_get_xmm 13 va_sM, va_get_xmm 14 va_sM) == rounds_opaque_6 init round_keys 0 /\
    Vale.X64.Decls.buffer128_read scratch_b 8 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 6) /\ (0 <= va_get_reg64
    rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ va_get_reg64 rRbx va_sM ==
    Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite ctr_BE 6) `op_Modulus` 256
    /\ va_get_xmm 3 va_sM == Vale.X64.Decls.buffer128_read hkeys_b 0 (va_get_mem_heaplet 0 va_s0)))
    /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 3 va_sM (va_update_xmm 14
    va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10
    va_sM (va_update_xmm 9 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 2
    va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_xmm 3 va_sM (va_update_reg64
    rR11 va_sM (va_update_reg64 rRbx va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Loop6x_preamble va_b0 va_s0 alg h_LE iv_b scratch_b key_words round_keys keys_b
  hkeys_b ctr_BE =
  let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 3; va_Mod_xmm 14; va_Mod_xmm 13;
    va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5;
    va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx;
    va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_Loop6x_preamble va_mods alg h_LE iv_b scratch_b key_words round_keys keys_b
    hkeys_b ctr_BE in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop6x_preamble alg) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 402 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in label va_range1
    "***** POSTCONDITION NOT MET AT line 459 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) 8 8) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 464 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (let init = make_six_of #Vale.Def.Types_s.quad32 (fun (n:(va_int_range 0 5)) ->
    Vale.Def.Types_s.quad32_xor (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite
    ctr_BE n)) (va_get_xmm 15 va_sM)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 466 column 102 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm
    13 va_sM, va_get_xmm 14 va_sM) == rounds_opaque_6 init round_keys 0) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 469 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 8 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 6)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 472 column 27 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (0 <= va_get_reg64 rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 473 column 50 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rRbx va_sM == Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite
    ctr_BE 6) `op_Modulus` 256) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 475 column 55 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 3 va_sM == Vale.X64.Decls.buffer128_read hkeys_b 0 (va_get_mem_heaplet 0 va_s0)))))
    in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 3; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm
    12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2;
    va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx; va_Mod_ok;
    va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Loop6x_preamble (alg:algorithm) (h_LE:quad32) (iv_b:buffer128) (scratch_b:buffer128)
  (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128)
  (ctr_BE:quad32) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in sse_enabled /\ Vale.X64.Decls.validDstAddrs128
    (va_get_mem_heaplet 3 va_s0) (va_get_reg64 rRbp va_s0) scratch_b 9 (va_get_mem_layout va_s0)
    Secret /\ aes_reqs_offset alg key_words round_keys keys_b (va_get_reg64 rRcx va_s0)
    (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\ va_get_xmm 15 va_s0 ==
    FStar.Seq.Base.index #quad32 round_keys 0 /\ va_get_xmm 2 va_s0 == Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 16777216 /\ va_get_xmm 1 va_s0 ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 0) /\ va_get_reg64 rRbx
    va_s0 == Vale.Def.Words_s.__proj__Mkfour__item__lo0 ctr_BE `op_Modulus` 256 /\ va_get_xmm 9
    va_s0 == Vale.Def.Types_s.quad32_xor (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.AES.GCTR.inc32lite ctr_BE 0)) (va_get_xmm 15 va_s0) /\ (va_get_reg64 rRbx va_s0 + 6 < 256
    ==> (va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm 12 va_s0,
    va_get_xmm 13 va_s0, va_get_xmm 14 va_s0) == xor_reverse_inc32lite_6 1 0 ctr_BE (va_get_xmm 15
    va_s0)) /\ hkeys_b_powers hkeys_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0)
    (va_get_reg64 rR9 va_s0 - 32) h) /\ (forall (va_x_mem:vale_heap) (va_x_rbx:nat64)
    (va_x_r11:nat64) (va_x_xmm3:quad32) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32)
    (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32)
    (va_x_xmm11:quad32) (va_x_xmm12:quad32) (va_x_xmm13:quad32) (va_x_xmm14:quad32)
    (va_x_heap3:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl
    (va_upd_mem_heaplet 3 va_x_heap3 (va_upd_xmm 14 va_x_xmm14 (va_upd_xmm 13 va_x_xmm13
    (va_upd_xmm 12 va_x_xmm12 (va_upd_xmm 11 va_x_xmm11 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9
    va_x_xmm9 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1
    va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 3 va_x_xmm3 (va_upd_reg64 rR11 va_x_r11
    (va_upd_reg64 rRbx va_x_rbx (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\
    (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in Vale.X64.Decls.modifies_buffer_specific128
    scratch_b (va_get_mem_heaplet 3 va_s0) (va_get_mem_heaplet 3 va_sM) 8 8 /\ (let init =
    make_six_of #Vale.Def.Types_s.quad32 (fun (n:(va_int_range 0 5)) -> Vale.Def.Types_s.quad32_xor
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE n)) (va_get_xmm 15
    va_sM)) in (va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM,
    va_get_xmm 13 va_sM, va_get_xmm 14 va_sM) == rounds_opaque_6 init round_keys 0 /\
    Vale.X64.Decls.buffer128_read scratch_b 8 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 6) /\ (0 <= va_get_reg64
    rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ va_get_reg64 rRbx va_sM ==
    Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite ctr_BE 6) `op_Modulus` 256
    /\ va_get_xmm 3 va_sM == Vale.X64.Decls.buffer128_read hkeys_b 0 (va_get_mem_heaplet 0 va_s0)))
    ==> va_k va_sM (())))


val va_wpProof_Loop6x_preamble : alg:algorithm -> h_LE:quad32 -> iv_b:buffer128 ->
  scratch_b:buffer128 -> key_words:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 ->
  hkeys_b:buffer128 -> ctr_BE:quad32 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Loop6x_preamble alg h_LE iv_b scratch_b key_words
    round_keys keys_b hkeys_b ctr_BE va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop6x_preamble alg) ([va_Mod_flags;
    va_Mod_mem_heaplet 3; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm
    10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0;
    va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0,
    va_g))))
[@"opaque_to_smt"]
let va_wpProof_Loop6x_preamble alg h_LE iv_b scratch_b key_words round_keys keys_b hkeys_b ctr_BE
  va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_preamble (va_code_Loop6x_preamble alg) va_s0 alg h_LE iv_b
    scratch_b key_words round_keys keys_b hkeys_b ctr_BE in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 3 va_sM (va_update_xmm 14
    va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10
    va_sM (va_update_xmm 9 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 2
    va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_xmm 3 va_sM (va_update_reg64
    rR11 va_sM (va_update_reg64 rRbx va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0)))))))))))))))))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 3; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm
    12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 2;
    va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_xmm 3; va_Mod_reg64 rR11; va_Mod_reg64 rRbx; 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_Loop6x_preamble (alg:algorithm) (h_LE:quad32) (iv_b:buffer128) (scratch_b:buffer128)
  (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128)
  (ctr_BE:quad32) : (va_quickCode unit (va_code_Loop6x_preamble alg)) =
  (va_QProc (va_code_Loop6x_preamble alg) ([va_Mod_flags; va_Mod_mem_heaplet 3; va_Mod_xmm 14;
    va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 6;
    va_Mod_xmm 5; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_xmm 3; va_Mod_reg64 rR11;
    va_Mod_reg64 rRbx; va_Mod_mem]) (va_wp_Loop6x_preamble alg h_LE iv_b scratch_b key_words
    round_keys keys_b hkeys_b ctr_BE) (va_wpProof_Loop6x_preamble alg h_LE iv_b scratch_b key_words
    round_keys keys_b hkeys_b ctr_BE))
//--
//-- Loop6x_reverse128

val va_code_Loop6x_reverse128 : in0_offset:nat -> stack_offset:nat -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Loop6x_reverse128 in0_offset stack_offset =
  (va_Block (va_CCons (va_code_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rR13) (va_op_reg_opr64_reg64 rR14) (in0_offset `op_Multiply` 16 + 8)
    Secret true) (va_CCons (va_code_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rR12) (va_op_reg_opr64_reg64 rR14) (in0_offset `op_Multiply` 16) Secret
    false) (va_CCons (va_code_Store64_buffer128 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr64_reg64 rRbp) (va_op_reg_opr64_reg64 rR13) (stack_offset `op_Multiply` 16)
    Secret false) (va_CCons (va_code_Store64_buffer128 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr64_reg64 rRbp) (va_op_reg_opr64_reg64 rR12) (stack_offset `op_Multiply` 16 + 8)
    Secret true) (va_CNil ()))))))

val va_codegen_success_Loop6x_reverse128 : in0_offset:nat -> stack_offset:nat -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Loop6x_reverse128 in0_offset stack_offset =
  (va_pbool_and (va_codegen_success_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rR13) (va_op_reg_opr64_reg64 rR14) (in0_offset `op_Multiply` 16 + 8)
    Secret true) (va_pbool_and (va_codegen_success_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rR12) (va_op_reg_opr64_reg64 rR14) (in0_offset `op_Multiply` 16) Secret
    false) (va_pbool_and (va_codegen_success_Store64_buffer128 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr64_reg64 rRbp) (va_op_reg_opr64_reg64 rR13) (stack_offset `op_Multiply` 16)
    Secret false) (va_pbool_and (va_codegen_success_Store64_buffer128 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr64_reg64 rRbp) (va_op_reg_opr64_reg64 rR12) (stack_offset `op_Multiply` 16 + 8)
    Secret true) (va_ttrue ())))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Loop6x_reverse128 (va_mods:va_mods_t) (in0_offset:nat) (stack_offset:nat) (start:nat)
  (in0_b:buffer128) (scratch_b:buffer128) : (va_quickCode unit (va_code_Loop6x_reverse128
  in0_offset stack_offset)) =
  (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 527 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR13)
    (va_op_reg_opr64_reg64 rR14) (in0_offset `op_Multiply` 16 + 8) Secret true in0_b (start +
    in0_offset)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 528 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR12)
    (va_op_reg_opr64_reg64 rR14) (in0_offset `op_Multiply` 16) Secret false in0_b (start +
    in0_offset)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 529 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_reg_opr64_reg64 rR13) (stack_offset `op_Multiply` 16) Secret false scratch_b
    stack_offset) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 530 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_reg_opr64_reg64 rR12) (stack_offset `op_Multiply` 16 + 8) Secret true scratch_b
    stack_offset) (fun (va_s:va_state) _ -> let (va_arg10:Vale.Def.Types_s.quad32) =
    Vale.X64.Decls.buffer128_read scratch_b stack_offset (va_get_mem_heaplet 3 va_s) in let
    (va_arg9:Vale.Def.Types_s.quad32) = Vale.X64.Decls.buffer128_read scratch_b stack_offset
    (va_get_mem_heaplet 3 va_old_s) in let (va_arg8:Vale.Def.Types_s.quad32) =
    Vale.X64.Decls.buffer128_read in0_b (start + in0_offset) (va_get_mem_heaplet 6 va_old_s) in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 531 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.Arch.Types.lemma_reverse_bytes_quad32_64 va_arg8 va_arg9 va_arg10)
    (va_QEmpty (()))))))))


val va_lemma_Loop6x_reverse128 : va_b0:va_code -> va_s0:va_state -> in0_offset:nat ->
  stack_offset:nat -> start:nat -> in0_b:buffer128 -> scratch_b:buffer128
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Loop6x_reverse128 in0_offset stack_offset) va_s0 /\
    va_get_ok va_s0 /\ (sse_enabled /\ movbe_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128
    (va_get_mem_heaplet 6 va_s0) (va_get_reg64 rR14 va_s0) in0_b start (in0_offset + 1)
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 3
    va_s0) (va_get_reg64 rRbp va_s0) scratch_b (stack_offset + 1) (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 /\
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) stack_offset stack_offset /\ Vale.X64.Decls.buffer128_read
    scratch_b stack_offset (va_get_mem_heaplet 3 va_sM) == Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.X64.Decls.buffer128_read in0_b (start + in0_offset) (va_get_mem_heaplet 6 va_s0))) /\
    va_state_eq va_sM (va_update_mem_heaplet 3 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64
    rR12 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))
[@"opaque_to_smt"]
let va_lemma_Loop6x_reverse128 va_b0 va_s0 in0_offset stack_offset start in0_b scratch_b =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 3; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_ok;
    va_Mod_mem] in
  let va_qc = va_qcode_Loop6x_reverse128 va_mods in0_offset stack_offset start in0_b scratch_b in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop6x_reverse128 in0_offset
    stack_offset) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 504 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (label va_range1
    "***** POSTCONDITION NOT MET AT line 523 column 94 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) stack_offset stack_offset) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 525 column 88 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b stack_offset (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (start + in0_offset)
    (va_get_mem_heaplet 6 va_s0))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 3; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_ok;
    va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Loop6x_reverse128 (in0_offset:nat) (stack_offset:nat) (start:nat) (in0_b:buffer128)
  (scratch_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (sse_enabled /\ movbe_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128
    (va_get_mem_heaplet 6 va_s0) (va_get_reg64 rR14 va_s0) in0_b start (in0_offset + 1)
    (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 3
    va_s0) (va_get_reg64 rRbp va_s0) scratch_b (stack_offset + 1) (va_get_mem_layout va_s0) Secret)
    /\ (forall (va_x_mem:vale_heap) (va_x_r12:nat64) (va_x_r13:nat64) (va_x_heap3:vale_heap) . let
    va_sM = va_upd_mem_heaplet 3 va_x_heap3 (va_upd_reg64 rR13 va_x_r13 (va_upd_reg64 rR12 va_x_r12
    (va_upd_mem va_x_mem va_s0))) in va_get_ok va_sM /\ (Vale.X64.Decls.modifies_buffer_specific128
    scratch_b (va_get_mem_heaplet 3 va_s0) (va_get_mem_heaplet 3 va_sM) stack_offset stack_offset
    /\ Vale.X64.Decls.buffer128_read scratch_b stack_offset (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (start + in0_offset)
    (va_get_mem_heaplet 6 va_s0))) ==> va_k va_sM (())))


val va_wpProof_Loop6x_reverse128 : in0_offset:nat -> stack_offset:nat -> start:nat ->
  in0_b:buffer128 -> scratch_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Loop6x_reverse128 in0_offset stack_offset start in0_b
    scratch_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop6x_reverse128 in0_offset
    stack_offset) ([va_Mod_mem_heaplet 3; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_mem]) va_s0
    va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Loop6x_reverse128 in0_offset stack_offset start in0_b scratch_b va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_reverse128 (va_code_Loop6x_reverse128 in0_offset
    stack_offset) va_s0 in0_offset stack_offset start in0_b scratch_b in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 3 va_sM (va_update_reg64 rR13 va_sM
    (va_update_reg64 rR12 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 3; va_Mod_reg64 rR13; va_Mod_reg64 rR12; 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_Loop6x_reverse128 (in0_offset:nat) (stack_offset:nat) (start:nat) (in0_b:buffer128)
  (scratch_b:buffer128) : (va_quickCode unit (va_code_Loop6x_reverse128 in0_offset stack_offset)) =
  (va_QProc (va_code_Loop6x_reverse128 in0_offset stack_offset) ([va_Mod_mem_heaplet 3;
    va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_mem]) (va_wp_Loop6x_reverse128 in0_offset
    stack_offset start in0_b scratch_b) (va_wpProof_Loop6x_reverse128 in0_offset stack_offset start
    in0_b scratch_b))
//--
//-- Loop6x_round9

val va_code_Loop6x_round9 : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Loop6x_round9 alg =
  (va_Block (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64
    rRbp) (va_op_xmm_xmm 7) 16 Secret) (va_CCons (va_code_Mem128_lemma ()) (va_CCons (va_code_VPxor
    (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6)
    (va_op_reg64_reg64 rRdi) 0 Secret)) (va_CCons (va_code_Mem128_lemma ()) (va_CCons
    (va_code_VPxor (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 16 Secret)) (va_CCons
    (va_code_Mem128_lemma ()) (va_CCons (va_code_VPxor (va_op_xmm_xmm 5) (va_op_xmm_xmm 1)
    (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 32 Secret))
    (va_CCons (va_code_Mem128_lemma ()) (va_CCons (va_code_VPxor (va_op_xmm_xmm 6) (va_op_xmm_xmm
    1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 48 Secret))
    (va_CCons (va_code_Mem128_lemma ()) (va_CCons (va_code_VPxor (va_op_xmm_xmm 7) (va_op_xmm_xmm
    1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 64 Secret))
    (va_CCons (va_code_Mem128_lemma ()) (va_CCons (va_code_VPxor (va_op_xmm_xmm 3) (va_op_xmm_xmm
    1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 80 Secret))
    (va_CNil ())))))))))))))))

val va_codegen_success_Loop6x_round9 : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Loop6x_round9 alg =
  (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr64_reg64 rRbp) (va_op_xmm_xmm 7) 16 Secret) (va_pbool_and
    (va_codegen_success_Mem128_lemma ()) (va_pbool_and (va_codegen_success_VPxor (va_op_xmm_xmm 2)
    (va_op_xmm_xmm 1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 0
    Secret)) (va_pbool_and (va_codegen_success_Mem128_lemma ()) (va_pbool_and
    (va_codegen_success_VPxor (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 16 Secret)) (va_pbool_and
    (va_codegen_success_Mem128_lemma ()) (va_pbool_and (va_codegen_success_VPxor (va_op_xmm_xmm 5)
    (va_op_xmm_xmm 1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 32
    Secret)) (va_pbool_and (va_codegen_success_Mem128_lemma ()) (va_pbool_and
    (va_codegen_success_VPxor (va_op_xmm_xmm 6) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 48 Secret)) (va_pbool_and
    (va_codegen_success_Mem128_lemma ()) (va_pbool_and (va_codegen_success_VPxor (va_op_xmm_xmm 7)
    (va_op_xmm_xmm 1) (va_opr_code_Mem128 (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 64
    Secret)) (va_pbool_and (va_codegen_success_Mem128_lemma ()) (va_pbool_and
    (va_codegen_success_VPxor (va_op_xmm_xmm 3) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 80 Secret)) (va_ttrue ()))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Loop6x_round9 (va_mods:va_mods_t) (alg:algorithm) (count:nat) (in_b:buffer128)
  (scratch_b:buffer128) (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) :
  (va_quickCode unit (va_code_Loop6x_round9 alg)) =
  (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 567 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_xmm_xmm 7) 16 Secret scratch_b 1) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 568 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mem128_lemma (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 0 Secret in_b
    (count `op_Multiply` 6 + 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 568 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 0 Secret)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 569 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mem128_lemma (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 16 Secret in_b
    (count `op_Multiply` 6 + 1)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 569 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 16 Secret)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 570 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mem128_lemma (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 32 Secret in_b
    (count `op_Multiply` 6 + 2)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 570 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 32 Secret)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 571 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mem128_lemma (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 48 Secret in_b
    (count `op_Multiply` 6 + 3)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 571 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 6) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 48 Secret)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 572 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mem128_lemma (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 64 Secret in_b
    (count `op_Multiply` 6 + 4)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 572 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 64 Secret)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 573 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mem128_lemma (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 80 Secret in_b
    (count `op_Multiply` 6 + 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 573 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 3) (va_op_xmm_xmm 1) (va_opr_code_Mem128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg64_reg64 rRdi) 80 Secret)) (va_QEmpty
    (()))))))))))))))))


val va_lemma_Loop6x_round9 : va_b0:va_code -> va_s0:va_state -> alg:algorithm -> count:nat ->
  in_b:buffer128 -> scratch_b:buffer128 -> key_words:(seq nat32) -> round_keys:(seq quad32) ->
  keys_b:buffer128
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Loop6x_round9 alg) va_s0 /\ va_get_ok va_s0 /\
    (sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 6 va_s0)
    (va_get_reg64 rRdi va_s0) in_b (count `op_Multiply` 6) 6 (va_get_mem_layout va_s0) Secret /\
    Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 3 va_s0) (va_get_reg64 rRbp va_s0)
    scratch_b 8 (va_get_mem_layout va_s0) Secret /\ aes_reqs_offset alg key_words round_keys keys_b
    (va_get_reg64 rRcx va_s0) (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\ va_get_xmm
    1 va_s0 == Vale.X64.Decls.buffer128_read keys_b (Vale.AES.AES_common_s.nr alg)
    (va_get_mem_heaplet 0 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.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) 1 1 /\ (va_get_xmm 2 va_sM, va_get_xmm 0 va_sM, va_get_xmm 5
    va_sM, va_get_xmm 6 va_sM, va_get_xmm 7 va_sM, va_get_xmm 3 va_sM) == make_six_of #quad32 (fun
    (i:(va_int_range 0 5)) -> Vale.Def.Types_s.quad32_xor (FStar.Seq.Base.index
    #Vale.Def.Types_s.quad32 round_keys (Vale.AES.AES_common_s.nr alg))
    (Vale.X64.Decls.buffer128_read in_b (count `op_Multiply` 6 + i) (va_get_mem_heaplet 6 va_sM)))
    /\ Vale.X64.Decls.buffer128_read scratch_b 1 (va_get_mem_heaplet 3 va_sM) == va_get_xmm 7
    va_s0) /\ va_state_eq va_sM (va_update_mem_heaplet 3 va_sM (va_update_flags va_sM
    (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 3 va_sM
    (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM
    (va_update_mem va_sM va_s0)))))))))))))
[@"opaque_to_smt"]
let va_lemma_Loop6x_round9 va_b0 va_s0 alg count in_b scratch_b key_words round_keys keys_b =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6;
    va_Mod_xmm 5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_Loop6x_round9 va_mods alg count in_b scratch_b key_words round_keys keys_b in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop6x_round9 alg) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 535 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (label va_range1
    "***** POSTCONDITION NOT MET AT line 561 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) 1 1) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 563 column 102 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 2 va_sM, va_get_xmm 0 va_sM, va_get_xmm 5 va_sM, va_get_xmm 6 va_sM, va_get_xmm 7
    va_sM, va_get_xmm 3 va_sM) == make_six_of #quad32 (fun (i:(va_int_range 0 5)) ->
    Vale.Def.Types_s.quad32_xor (FStar.Seq.Base.index #Vale.Def.Types_s.quad32 round_keys
    (Vale.AES.AES_common_s.nr alg)) (Vale.X64.Decls.buffer128_read in_b (count `op_Multiply` 6 + i)
    (va_get_mem_heaplet 6 va_sM)))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 564 column 55 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 1 (va_get_mem_heaplet 3 va_sM) == va_get_xmm 7
    va_s0))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm
    5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok; va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Loop6x_round9 (alg:algorithm) (count:nat) (in_b:buffer128) (scratch_b:buffer128)
  (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) (va_s0:va_state)
  (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 6
    va_s0) (va_get_reg64 rRdi va_s0) in_b (count `op_Multiply` 6) 6 (va_get_mem_layout va_s0)
    Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 3 va_s0) (va_get_reg64 rRbp
    va_s0) scratch_b 8 (va_get_mem_layout va_s0) Secret /\ aes_reqs_offset alg key_words round_keys
    keys_b (va_get_reg64 rRcx va_s0) (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\
    va_get_xmm 1 va_s0 == Vale.X64.Decls.buffer128_read keys_b (Vale.AES.AES_common_s.nr alg)
    (va_get_mem_heaplet 0 va_s0)) /\ (forall (va_x_mem:vale_heap) (va_x_xmm0:quad32)
    (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32)
    (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) (va_x_heap3:vale_heap) . let va_sM =
    va_upd_mem_heaplet 3 va_x_heap3 (va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6
    va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1
    va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_mem va_x_mem va_s0))))))))) in va_get_ok va_sM /\
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) 1 1 /\ (va_get_xmm 2 va_sM, va_get_xmm 0 va_sM, va_get_xmm 5
    va_sM, va_get_xmm 6 va_sM, va_get_xmm 7 va_sM, va_get_xmm 3 va_sM) == make_six_of #quad32 (fun
    (i:(va_int_range 0 5)) -> Vale.Def.Types_s.quad32_xor (FStar.Seq.Base.index
    #Vale.Def.Types_s.quad32 round_keys (Vale.AES.AES_common_s.nr alg))
    (Vale.X64.Decls.buffer128_read in_b (count `op_Multiply` 6 + i) (va_get_mem_heaplet 6 va_sM)))
    /\ Vale.X64.Decls.buffer128_read scratch_b 1 (va_get_mem_heaplet 3 va_sM) == va_get_xmm 7
    va_s0) ==> va_k va_sM (())))


val va_wpProof_Loop6x_round9 : alg:algorithm -> count:nat -> in_b:buffer128 -> scratch_b:buffer128
  -> key_words:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 -> va_s0:va_state ->
  va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Loop6x_round9 alg count in_b scratch_b key_words
    round_keys keys_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop6x_round9 alg)
    ([va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 3;
    va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Loop6x_round9 alg count in_b scratch_b key_words round_keys keys_b va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_round9 (va_code_Loop6x_round9 alg) va_s0 alg count in_b
    scratch_b key_words round_keys keys_b in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 3 va_sM (va_update_flags va_sM (va_update_xmm 7
    va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2
    va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0))))))))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm
    5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; 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_Loop6x_round9 (alg:algorithm) (count:nat) (in_b:buffer128) (scratch_b:buffer128)
  (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) : (va_quickCode unit
  (va_code_Loop6x_round9 alg)) =
  (va_QProc (va_code_Loop6x_round9 alg) ([va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 7;
    va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0;
    va_Mod_mem]) (va_wp_Loop6x_round9 alg count in_b scratch_b key_words round_keys keys_b)
    (va_wpProof_Loop6x_round9 alg count in_b scratch_b key_words round_keys keys_b))
//--
//-- load_one_msb

val va_code_load_one_msb : va_dummy:unit -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_load_one_msb () =
  (va_Block (va_CCons (va_code_ZeroXmm (va_op_xmm_xmm 2)) (va_CCons (va_code_PinsrqImm
    (va_op_xmm_xmm 2) 72057594037927936 1 (va_op_reg_opr64_reg64 rR11)) (va_CNil ()))))

val va_codegen_success_load_one_msb : va_dummy:unit -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_load_one_msb () =
  (va_pbool_and (va_codegen_success_ZeroXmm (va_op_xmm_xmm 2)) (va_pbool_and
    (va_codegen_success_PinsrqImm (va_op_xmm_xmm 2) 72057594037927936 1 (va_op_reg_opr64_reg64
    rR11)) (va_ttrue ())))

[@ "opaque_to_smt" va_qattr]
let va_qcode_load_one_msb (va_mods:va_mods_t) : (va_quickCode unit (va_code_load_one_msb ())) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 583 column 12 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_ZeroXmm (va_op_xmm_xmm 2)) (fun (va_s:va_state) _ -> va_qAssert va_range1
    "***** PRECONDITION NOT MET AT line 584 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.Arch.Types.two_to_nat32 (Vale.Def.Words_s.Mktwo #Vale.Def.Words_s.nat32 0 16777216) ==
    72057594037927936) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 585 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_PinsrqImm (va_op_xmm_xmm 2) 72057594037927936 1 (va_op_reg_opr64_reg64 rR11)) (fun
    (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 586 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.Def.Types_s.insert_nat64_reveal ()) (va_QEmpty (())))))))


val va_lemma_load_one_msb : va_b0:va_code -> va_s0:va_state
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_load_one_msb ()) va_s0 /\ va_get_ok va_s0 /\
    sse_enabled))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 16777216 /\
    va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 2 va_sM (va_update_reg64 rR11 va_sM
    (va_update_ok va_sM va_s0))))))
[@"opaque_to_smt"]
let va_lemma_load_one_msb va_b0 va_s0 =
  let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 2; va_Mod_reg64 rR11; va_Mod_ok] in
  let va_qc = va_qcode_load_one_msb va_mods in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_load_one_msb ()) va_qc va_s0 (fun va_s0
    va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 576 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 581 column 46 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 16777216)) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 2; va_Mod_reg64 rR11; va_Mod_ok]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_load_one_msb (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_r11:nat64) (va_x_xmm2:quad32)
    (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 2 va_x_xmm2
    (va_upd_reg64 rR11 va_x_r11 va_s0)) in va_get_ok va_sM /\ va_get_xmm 2 va_sM ==
    Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 16777216 ==> va_k va_sM (())))


val va_wpProof_load_one_msb : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_load_one_msb va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_load_one_msb ()) ([va_Mod_flags;
    va_Mod_xmm 2; va_Mod_reg64 rR11]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_load_one_msb va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_load_one_msb (va_code_load_one_msb ()) va_s0 in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 2 va_sM (va_update_reg64 rR11
    va_sM (va_update_ok va_sM va_s0)))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 2; va_Mod_reg64 rR11]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

[@ "opaque_to_smt" va_qattr]
let va_quick_load_one_msb () : (va_quickCode unit (va_code_load_one_msb ())) =
  (va_QProc (va_code_load_one_msb ()) ([va_Mod_flags; va_Mod_xmm 2; va_Mod_reg64 rR11])
    va_wp_load_one_msb va_wpProof_load_one_msb)
//--
//-- Loop6x_final

[@ "opaque_to_smt" va_qattr]
let va_code_Loop6x_final alg =
  (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRbp) 128 Secret) (va_CCons (va_code_VAESNI_enc_last (va_op_xmm_xmm 9)
    (va_op_xmm_xmm 9) (va_op_xmm_xmm 2)) (va_CCons (va_code_load_one_msb ()) (va_CCons
    (va_code_VAESNI_enc_last (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_VPaddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons
    (va_code_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_reg_opr64_reg64 rR13) (7 `op_Multiply` 16) Secret false) (va_CCons (va_code_AddLea64
    (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRdi) (va_const_opr64 96)) (va_CCons
    (va_code_VAESNI_enc_last (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_xmm_xmm 5)) (va_CCons
    (va_code_VPaddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 0) (va_op_xmm_xmm 2)) (va_CCons
    (va_code_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_reg_opr64_reg64 rR12) (7 `op_Multiply` 16 + 8) Secret true) (va_CCons (va_code_AddLea64
    (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRsi) (va_const_opr64 96)) (va_CCons
    (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64
    rRcx) (0 - 128) Secret) (va_CCons (va_code_VAESNI_enc_last (va_op_xmm_xmm 12) (va_op_xmm_xmm
    12) (va_op_xmm_xmm 6)) (va_CCons (va_code_VPaddd (va_op_xmm_xmm 6) (va_op_xmm_xmm 5)
    (va_op_xmm_xmm 2)) (va_CCons (va_code_VAESNI_enc_last (va_op_xmm_xmm 13) (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 7)) (va_CCons (va_code_VPaddd (va_op_xmm_xmm 7) (va_op_xmm_xmm 6) (va_op_xmm_xmm
    2)) (va_CCons (va_code_VAESNI_enc_last (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 3))
    (va_CCons (va_code_VPaddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7) (va_op_xmm_xmm 2)) (va_CNil
    ()))))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Loop6x_final alg =
  (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRbp) 128 Secret) (va_pbool_and (va_codegen_success_VAESNI_enc_last
    (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) (va_op_xmm_xmm 2)) (va_pbool_and
    (va_codegen_success_load_one_msb ()) (va_pbool_and (va_codegen_success_VAESNI_enc_last
    (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_pbool_and
    (va_codegen_success_VPaddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and
    (va_codegen_success_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64
    rRbp) (va_op_reg_opr64_reg64 rR13) (7 `op_Multiply` 16) Secret false) (va_pbool_and
    (va_codegen_success_AddLea64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRdi)
    (va_const_opr64 96)) (va_pbool_and (va_codegen_success_VAESNI_enc_last (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 11) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm
    5) (va_op_xmm_xmm 0) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Store64_buffer128
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp) (va_op_reg_opr64_reg64 rR12) (7
    `op_Multiply` 16 + 8) Secret true) (va_pbool_and (va_codegen_success_AddLea64
    (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRsi) (va_const_opr64 96)) (va_pbool_and
    (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 15)
    (va_op_reg_opr64_reg64 rRcx) (0 - 128) Secret) (va_pbool_and
    (va_codegen_success_VAESNI_enc_last (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 6))
    (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm 6) (va_op_xmm_xmm 5) (va_op_xmm_xmm 2))
    (va_pbool_and (va_codegen_success_VAESNI_enc_last (va_op_xmm_xmm 13) (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)
    (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_VAESNI_enc_last (va_op_xmm_xmm 14)
    (va_op_xmm_xmm 14) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_VPaddd (va_op_xmm_xmm
    3) (va_op_xmm_xmm 7) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Loop6x_final (va_mods:va_mods_t) (alg:algorithm) (iv_b:buffer128)
  (scratch_b:buffer128) (key_words:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128)
  (ctr_orig:quad32) (init:quad32_6) (ctrs:quad32_6) (plain:quad32_6) (inb:quad32) : (va_quickCode
  unit (va_code_Loop6x_final alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 667 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.Arch.TypesNative.lemma_quad32_xor_commutes_forall ()) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 669 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 3) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRbp) 128 Secret scratch_b 8) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 671 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc_last (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) (va_op_xmm_xmm 2)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 672 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_load_one_msb ()) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 673 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc_last (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 674 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 675 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_reg_opr64_reg64 rR13) (7 `op_Multiply` 16) Secret false scratch_b 7) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 676 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_AddLea64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRdi) (va_const_opr64 96))
    (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 677 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc_last (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_xmm_xmm 5)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 678 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 0) (va_op_xmm_xmm 2)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 679 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store64_buffer128 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr64_reg64 rRbp)
    (va_op_reg_opr64_reg64 rR12) (7 `op_Multiply` 16 + 8) Secret true scratch_b 7) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 680 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_AddLea64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRsi) (va_const_opr64 96))
    (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 681 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 15)
    (va_op_reg_opr64_reg64 rRcx) (0 - 128) Secret keys_b 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 683 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc_last (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 6)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 684 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 6) (va_op_xmm_xmm 5) (va_op_xmm_xmm 2)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 685 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc_last (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 7)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 686 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 7) (va_op_xmm_xmm 6) (va_op_xmm_xmm 2)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 687 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc_last (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 3)) (va_QBind
    va_range1
    "***** PRECONDITION NOT MET AT line 688 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPaddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7) (va_op_xmm_xmm 2)) (fun (va_s:va_state) _
    -> let (va_arg117:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = round_keys in let
    (va_arg116:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let
    (va_arg115:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_old_s in let
    (va_arg114:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___1 #quad32 #quad32 #quad32
    #quad32 #quad32 #quad32 init in let (va_arg113:Vale.Def.Types_s.quad32) =
    __proj__Mktuple6__item___1 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 plain in let
    (va_arg112:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___1 #quad32 #quad32 #quad32
    #quad32 #quad32 #quad32 ctrs in let (va_arg111:Vale.AES.AES_common_s.algorithm) = alg in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 690 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.finish_cipher_opt va_arg111 va_arg112 va_arg113 va_arg114
    va_arg115 va_arg116 va_arg117) (let (va_arg110:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    round_keys in let (va_arg109:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let
    (va_arg108:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_old_s in let
    (va_arg107:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___2 #quad32 #quad32 #quad32
    #quad32 #quad32 #quad32 init in let (va_arg106:Vale.Def.Types_s.quad32) =
    __proj__Mktuple6__item___2 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 plain in let
    (va_arg105:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___2 #quad32 #quad32 #quad32
    #quad32 #quad32 #quad32 ctrs in let (va_arg104:Vale.AES.AES_common_s.algorithm) = alg in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 691 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.finish_cipher_opt va_arg104 va_arg105 va_arg106 va_arg107
    va_arg108 va_arg109 va_arg110) (let (va_arg103:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    round_keys in let (va_arg102:Vale.Def.Types_s.quad32) = va_get_xmm 11 va_s in let
    (va_arg101:Vale.Def.Types_s.quad32) = va_get_xmm 11 va_old_s in let
    (va_arg100:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___3 #quad32 #quad32 #quad32
    #quad32 #quad32 #quad32 init in let (va_arg99:Vale.Def.Types_s.quad32) =
    __proj__Mktuple6__item___3 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 plain in let
    (va_arg98:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___3 #quad32 #quad32 #quad32 #quad32
    #quad32 #quad32 ctrs in let (va_arg97:Vale.AES.AES_common_s.algorithm) = alg in va_qPURE
    va_range1
    "***** PRECONDITION NOT MET AT line 692 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.finish_cipher_opt va_arg97 va_arg98 va_arg99 va_arg100
    va_arg101 va_arg102 va_arg103) (let (va_arg96:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    round_keys in let (va_arg95:Vale.Def.Types_s.quad32) = va_get_xmm 12 va_s in let
    (va_arg94:Vale.Def.Types_s.quad32) = va_get_xmm 12 va_old_s in let
    (va_arg93:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___4 #quad32 #quad32 #quad32 #quad32
    #quad32 #quad32 init in let (va_arg92:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___4
    #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 plain in let (va_arg91:Vale.Def.Types_s.quad32)
    = __proj__Mktuple6__item___4 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs in let
    (va_arg90:Vale.AES.AES_common_s.algorithm) = alg in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 693 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.finish_cipher_opt va_arg90 va_arg91 va_arg92 va_arg93
    va_arg94 va_arg95 va_arg96) (let (va_arg89:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    round_keys in let (va_arg88:Vale.Def.Types_s.quad32) = va_get_xmm 13 va_s in let
    (va_arg87:Vale.Def.Types_s.quad32) = va_get_xmm 13 va_old_s in let
    (va_arg86:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___5 #quad32 #quad32 #quad32 #quad32
    #quad32 #quad32 init in let (va_arg85:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___5
    #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 plain in let (va_arg84:Vale.Def.Types_s.quad32)
    = __proj__Mktuple6__item___5 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs in let
    (va_arg83:Vale.AES.AES_common_s.algorithm) = alg in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 694 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.finish_cipher_opt va_arg83 va_arg84 va_arg85 va_arg86
    va_arg87 va_arg88 va_arg89) (let (va_arg82:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    round_keys in let (va_arg81:Vale.Def.Types_s.quad32) = va_get_xmm 14 va_s in let
    (va_arg80:Vale.Def.Types_s.quad32) = va_get_xmm 14 va_old_s in let
    (va_arg79:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___6 #quad32 #quad32 #quad32 #quad32
    #quad32 #quad32 init in let (va_arg78:Vale.Def.Types_s.quad32) = __proj__Mktuple6__item___6
    #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 plain in let (va_arg77:Vale.Def.Types_s.quad32)
    = __proj__Mktuple6__item___6 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs in let
    (va_arg76:Vale.AES.AES_common_s.algorithm) = alg in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 695 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.finish_cipher_opt va_arg76 va_arg77 va_arg78 va_arg79
    va_arg80 va_arg81 va_arg82) (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 696 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) -> Vale.AES.AES_s.is_aes_key_LE alg
    key) alg (__proj__Mktuple6__item___1 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs)
    key_words) (fun _ -> (fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) ->
    Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg input_LE
    (Vale.AES.AES_s.key_to_round_keys_LE alg key)) alg (__proj__Mktuple6__item___1 #quad32 #quad32
    #quad32 #quad32 #quad32 #quad32 ctrs) key_words) (fun (_:unit) -> finish_aes_encrypt_le alg
    (__proj__Mktuple6__item___1 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs) key_words)
    (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 697 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) -> Vale.AES.AES_s.is_aes_key_LE alg
    key) alg (__proj__Mktuple6__item___2 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs)
    key_words) (fun _ -> (fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) ->
    Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg input_LE
    (Vale.AES.AES_s.key_to_round_keys_LE alg key)) alg (__proj__Mktuple6__item___2 #quad32 #quad32
    #quad32 #quad32 #quad32 #quad32 ctrs) key_words) (fun (_:unit) -> finish_aes_encrypt_le alg
    (__proj__Mktuple6__item___2 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs) key_words)
    (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 698 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) -> Vale.AES.AES_s.is_aes_key_LE alg
    key) alg (__proj__Mktuple6__item___3 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs)
    key_words) (fun _ -> (fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) ->
    Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg input_LE
    (Vale.AES.AES_s.key_to_round_keys_LE alg key)) alg (__proj__Mktuple6__item___3 #quad32 #quad32
    #quad32 #quad32 #quad32 #quad32 ctrs) key_words) (fun (_:unit) -> finish_aes_encrypt_le alg
    (__proj__Mktuple6__item___3 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs) key_words)
    (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 699 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) -> Vale.AES.AES_s.is_aes_key_LE alg
    key) alg (__proj__Mktuple6__item___4 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs)
    key_words) (fun _ -> (fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) ->
    Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg input_LE
    (Vale.AES.AES_s.key_to_round_keys_LE alg key)) alg (__proj__Mktuple6__item___4 #quad32 #quad32
    #quad32 #quad32 #quad32 #quad32 ctrs) key_words) (fun (_:unit) -> finish_aes_encrypt_le alg
    (__proj__Mktuple6__item___4 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs) key_words)
    (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 700 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) -> Vale.AES.AES_s.is_aes_key_LE alg
    key) alg (__proj__Mktuple6__item___5 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs)
    key_words) (fun _ -> (fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) ->
    Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg input_LE
    (Vale.AES.AES_s.key_to_round_keys_LE alg key)) alg (__proj__Mktuple6__item___5 #quad32 #quad32
    #quad32 #quad32 #quad32 #quad32 ctrs) key_words) (fun (_:unit) -> finish_aes_encrypt_le alg
    (__proj__Mktuple6__item___5 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs) key_words)
    (va_QLemma va_range1
    "***** PRECONDITION NOT MET AT line 701 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) -> Vale.AES.AES_s.is_aes_key_LE alg
    key) alg (__proj__Mktuple6__item___6 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs)
    key_words) (fun _ -> (fun (alg:algorithm) (input_LE:quad32) (key:(seq nat32)) ->
    Vale.AES.AES_s.aes_encrypt_LE alg key input_LE == Vale.AES.AES_s.eval_cipher alg input_LE
    (Vale.AES.AES_s.key_to_round_keys_LE alg key)) alg (__proj__Mktuple6__item___6 #quad32 #quad32
    #quad32 #quad32 #quad32 #quad32 ctrs) key_words) (fun (_:unit) -> finish_aes_encrypt_le alg
    (__proj__Mktuple6__item___6 #quad32 #quad32 #quad32 #quad32 #quad32 #quad32 ctrs) key_words)
    (let (va_arg75:Vale.Def.Types_s.quad32) = Vale.X64.Decls.buffer128_read scratch_b 7
    (va_get_mem_heaplet 3 va_s) in let (va_arg74:Vale.Def.Types_s.quad32) =
    Vale.X64.Decls.buffer128_read scratch_b 7 (va_get_mem_heaplet 3 va_old_s) in let
    (va_arg73:Vale.Def.Types_s.quad32) = inb in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 703 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.Arch.Types.lemma_reverse_bytes_quad32_64 va_arg73 va_arg74 va_arg75) (let
    (va_arg72:Vale.Def.Types_s.quad32) = va_get_xmm 0 va_s in let
    (va_arg71:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let
    (va_arg70:Vale.Def.Types_s.quad32) = ctr_orig in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 705 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.lemma_incr_msb va_arg70 va_arg71 va_arg72 1) (let
    (va_arg69:Vale.Def.Types_s.quad32) = va_get_xmm 5 va_s in let
    (va_arg68:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let
    (va_arg67:Vale.Def.Types_s.quad32) = ctr_orig in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 706 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.lemma_incr_msb va_arg67 va_arg68 va_arg69 2) (let
    (va_arg66:Vale.Def.Types_s.quad32) = va_get_xmm 6 va_s in let
    (va_arg65:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let
    (va_arg64:Vale.Def.Types_s.quad32) = ctr_orig in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 707 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.lemma_incr_msb va_arg64 va_arg65 va_arg66 3) (let
    (va_arg63:Vale.Def.Types_s.quad32) = va_get_xmm 7 va_s in let
    (va_arg62:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let
    (va_arg61:Vale.Def.Types_s.quad32) = ctr_orig in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 708 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.lemma_incr_msb va_arg61 va_arg62 va_arg63 4) (let
    (va_arg60:Vale.Def.Types_s.quad32) = va_get_xmm 3 va_s in let
    (va_arg59:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let
    (va_arg58:Vale.Def.Types_s.quad32) = ctr_orig in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 709 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.lemma_incr_msb va_arg58 va_arg59 va_arg60 5) (va_QEmpty
    (()))))))))))))))))))))))))))))))))))))))))

[@"opaque_to_smt"]
let va_lemma_Loop6x_final va_b0 va_s0 alg iv_b scratch_b key_words round_keys keys_b ctr_orig init
  ctrs plain inb =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14;
    va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7;
    va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0;
    va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi;
    va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_Loop6x_final va_mods alg iv_b scratch_b key_words round_keys keys_b ctr_orig
    init ctrs plain inb in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop6x_final alg) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 589 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (label va_range1
    "***** POSTCONDITION NOT MET AT line 649 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) 7 7) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 652 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 7 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 inb) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 654 column 111 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm
    13 va_sM, va_get_xmm 14 va_sM) == map2_six_of #quad32 #quad32 #quad32 plain ctrs (fun
    (p:quad32) (c:quad32) -> Vale.Def.Types_s.quad32_xor p (Vale.AES.AES_s.aes_encrypt_LE alg
    key_words c))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 655 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 15 va_sM == FStar.Seq.Base.index #quad32 round_keys 0) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 657 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0 + 96) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 658 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 96) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 660 column 41 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0 0 16777216) /\ label
    va_range1
    "***** POSTCONDITION NOT MET AT line 662 column 55 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_xmm 1 va_sM == Vale.X64.Decls.buffer128_read scratch_b 8 (va_get_mem_heaplet 3 va_s0))
    /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 663 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (let ctr = Vale.Def.Words_s.__proj__Mkfour__item__lo0 ctr_orig `op_Modulus` 256 in label
    va_range1
    "***** POSTCONDITION NOT MET AT line 665 column 60 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (ctr + 6 < 256 ==> (va_get_xmm 1 va_sM, va_get_xmm 0 va_sM, va_get_xmm 5 va_sM, va_get_xmm 6
    va_sM, va_get_xmm 7 va_sM, va_get_xmm 3 va_sM) == xor_reverse_inc32lite_6 0 0 ctr_orig
    (va_get_xmm 15 va_sM))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm
    13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6;
    va_Mod_xmm 5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR13;
    va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi; va_Mod_ok;
    va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)


[@"opaque_to_smt"]
let va_wpProof_Loop6x_final alg iv_b scratch_b key_words round_keys keys_b ctr_orig init ctrs plain
  inb va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_final (va_code_Loop6x_final alg) va_s0 alg iv_b scratch_b
    key_words round_keys keys_b ctr_orig init ctrs plain inb in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 3 va_sM (va_update_flags va_sM (va_update_xmm 15
    va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11
    va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6
    va_sM (va_update_xmm 5 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1
    va_sM (va_update_xmm 0 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM
    (va_update_reg64 rR11 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdi va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 3; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm
    13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6;
    va_Mod_xmm 5; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR13;
    va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rRsi; va_Mod_reg64 rRdi; va_Mod_mem]) va_sM
    va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

//--
//-- Loop6x_save_output

[@ "opaque_to_smt" va_qattr]
let va_code_Loop6x_save_output () =
  (va_Block (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64
    rRsi) (va_op_xmm_xmm 9) (0 - 96) Secret) (va_CCons (va_code_VPxor (va_op_xmm_xmm 9)
    (va_op_xmm_xmm 1) (va_op_opr128_xmm 15)) (va_CCons (va_code_Store128_buffer
    (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 10) (0 - 80) Secret)
    (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_CCons
    (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 11) (0 - 64) Secret) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 11) (va_op_xmm_xmm
    5)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64
    rRsi) (va_op_xmm_xmm 12) (0 - 48) Secret) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 6)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 13) (0 - 32) Secret) (va_CCons (va_code_Mov128
    (va_op_xmm_xmm 13) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer
    (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 14) (0 - 16) Secret)
    (va_CCons (va_code_Mov128 (va_op_xmm_xmm 14) (va_op_xmm_xmm 3)) (va_CNil ()))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Loop6x_save_output () =
  (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 9) (0 - 96) Secret) (va_pbool_and
    (va_codegen_success_VPxor (va_op_xmm_xmm 9) (va_op_xmm_xmm 1) (va_op_opr128_xmm 15))
    (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 6)
    (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 10) (0 - 80) Secret) (va_pbool_and
    (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_pbool_and
    (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 11) (0 - 64) Secret) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet
    6) (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 12) (0 - 48) Secret) (va_pbool_and
    (va_codegen_success_Mov128 (va_op_xmm_xmm 12) (va_op_xmm_xmm 6)) (va_pbool_and
    (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 13) (0 - 32) Secret) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet
    6) (va_op_reg_opr64_reg64 rRsi) (va_op_xmm_xmm 14) (0 - 16) Secret) (va_pbool_and
    (va_codegen_success_Mov128 (va_op_xmm_xmm 14) (va_op_xmm_xmm 3)) (va_ttrue ())))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Loop6x_save_output (va_mods:va_mods_t) (count:nat) (out_b:buffer128) : (va_quickCode
  unit (va_code_Loop6x_save_output ())) =
  (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 744 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 9) (0 - 96) Secret out_b (count `op_Multiply` 6 + 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 745 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VPxor (va_op_xmm_xmm 9) (va_op_xmm_xmm 1) (va_op_opr128_xmm 15)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 746 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 10) (0 - 80) Secret out_b (count `op_Multiply` 6 + 1)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 747 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 748 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 11) (0 - 64) Secret out_b (count `op_Multiply` 6 + 2)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 749 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mov128 (va_op_xmm_xmm 11) (va_op_xmm_xmm 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 750 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 12) (0 - 48) Secret out_b (count `op_Multiply` 6 + 3)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 751 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mov128 (va_op_xmm_xmm 12) (va_op_xmm_xmm 6)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 752 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 13) (0 - 32) Secret out_b (count `op_Multiply` 6 + 4)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 753 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mov128 (va_op_xmm_xmm 13) (va_op_xmm_xmm 7)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 754 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rRsi)
    (va_op_xmm_xmm 14) (0 - 16) Secret out_b (count `op_Multiply` 6 + 5)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 755 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Mov128 (va_op_xmm_xmm 14) (va_op_xmm_xmm 3)) (va_QEmpty (())))))))))))))))

[@"opaque_to_smt"]
let va_lemma_Loop6x_save_output va_b0 va_s0 count out_b =
  let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 6; va_Mod_xmm 14; va_Mod_xmm 13;
    va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_Loop6x_save_output va_mods count out_b in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop6x_save_output ()) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 712 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (label va_range1
    "***** POSTCONDITION NOT MET AT line 737 column 84 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 out_b (va_get_mem_heaplet 6 va_s0)
    (va_get_mem_heaplet 6 va_sM) (count `op_Multiply` 6 + 0) (count `op_Multiply` 6 + 5)) /\ label
    va_range1
    "***** POSTCONDITION NOT MET AT line 738 column 120 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq
    (va_get_mem_heaplet 6 va_sM) out_b) 0 (6 `op_Multiply` count) == FStar.Seq.Base.slice
    #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 6 va_s0) out_b) 0
    (6 `op_Multiply` count)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 740 column 92 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 9 va_s0, va_get_xmm 10 va_s0, va_get_xmm 11 va_s0, va_get_xmm 12 va_s0, va_get_xmm
    13 va_s0, va_get_xmm 14 va_s0) == make_six_of #quad32 (fun (i:(va_int_range 0 5)) ->
    Vale.X64.Decls.buffer128_read out_b (count `op_Multiply` 6 + i) (va_get_mem_heaplet 6 va_sM)))
    /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 742 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm
    13 va_sM, va_get_xmm 14 va_sM) == (Vale.Def.Types_s.quad32_xor (va_get_xmm 1 va_sM) (va_get_xmm
    15 va_sM), va_get_xmm 0 va_sM, va_get_xmm 5 va_sM, va_get_xmm 6 va_sM, va_get_xmm 7 va_sM,
    va_get_xmm 3 va_sM)))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 6; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm
    12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_ok; va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)


[@"opaque_to_smt"]
let va_wpProof_Loop6x_save_output count out_b va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Loop6x_save_output (va_code_Loop6x_save_output ()) va_s0 count
    out_b in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 6 va_sM (va_update_xmm 14
    va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10
    va_sM (va_update_xmm 9 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))));
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 6; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm
    12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_mem]) va_sM va_s0;
  let va_g = () in
  (va_sM, va_f0, va_g)

//--
//-- Loop6x_partial
#push-options "--z3rlimit 50 --max_ifuel 0"

[@ "opaque_to_smt" va_qattr]
let va_code_untransformedoriginal_Loop6x_partial alg =
  (va_Block (va_CCons (va_code_Loop6x_preamble alg) (va_CCons (va_code_Loop6x_plain alg 0
    (va_op_xmm_xmm 2)) (va_CCons (va_code_MulAdd_step 0 0 (va_op_xmm_xmm 1) (va_op_xmm_xmm 5)
    (va_op_xmm_xmm 6) (va_op_xmm_xmm 7) (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons
    (va_code_MulAdd_step 1 1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm
    3) (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_Loop6x_plain alg 1 (va_op_xmm_xmm
    15)) (va_CCons (va_code_Loop6x_reverse128 5 2) (va_CCons (va_code_MulAdd_step 2 3
    (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)
    (va_op_xmm_xmm 5)) (va_CCons (va_code_Loop6x_plain alg 2 (va_op_xmm_xmm 15)) (va_CCons
    (va_code_MulAdd_step 3 4 (va_op_xmm_xmm 2) (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm
    1) (va_op_xmm_xmm 0) (va_op_xmm_xmm 1)) (va_CCons (va_code_Loop6x_plain alg 3 (va_op_xmm_xmm
    15)) (va_CCons (va_code_Loop6x_reverse128 4 3) (va_CCons (va_code_MulAdd_step 4 6
    (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 0)
    (va_op_xmm_xmm 2)) (va_CCons (va_code_Loop6x_plain alg 4 (va_op_xmm_xmm 15)) (va_CCons
    (va_code_Loop6x_reverse128 3 4) (va_CCons (va_code_MulAdd_step 5 7 (va_op_xmm_xmm 2)
    (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 8) (va_op_xmm_xmm 8) (va_op_xmm_xmm 3))
    (va_CCons (va_code_Loop6x_plain alg 5 (va_op_xmm_xmm 15)) (va_CCons (va_code_Loop6x_reverse128
    2 5) (va_CCons (va_code_Load_0xc2_msb (va_op_xmm_xmm 3)) (va_CCons (va_code_ReduceLast false)
    (va_CCons (va_code_Loop6x_plain alg 6 (va_op_xmm_xmm 15)) (va_CCons (va_code_Loop6x_reverse128
    1 6) (va_CCons (va_code_Loop6x_plain alg 7 (va_op_xmm_xmm 1)) (va_CCons
    (va_code_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR13)
    (va_op_reg_opr64_reg64 rR14) (0 `op_Multiply` 16 + 8) Secret true) (va_CCons
    (va_code_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR12)
    (va_op_reg_opr64_reg64 rR14) (0 `op_Multiply` 16) Secret false) (va_CCons (va_code_Loop6x_plain
    alg 8 (va_op_xmm_xmm 15)) (va_CCons (if (alg = AES_256) then va_Block (va_CCons
    (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (160 - 128) Secret) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 9) (va_op_xmm_xmm 9)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 12) (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 13) (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_Loop6x_plain alg 10 (va_op_xmm_xmm 15)) (va_CCons
    (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (192 - 128) Secret) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 9) (va_op_xmm_xmm 9)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 12) (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 13) (va_op_xmm_xmm 13)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14)
    (va_op_xmm_xmm 1)) (va_CCons (va_code_Loop6x_plain alg 12 (va_op_xmm_xmm 15)) (va_CNil
    ()))))))))))))))))) else va_Block (va_CNil ())) (va_CCons (if (alg = AES_256) then va_Block
    (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRcx) (224 - 128) Secret) (va_CNil ())) else va_Block (va_CCons
    (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (160 - 128) Secret) (va_CNil ()))) (va_CCons (va_code_Loop6x_round9 alg) (va_CNil
    ()))))))))))))))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_codegen_success_untransformedoriginal_Loop6x_partial alg =
  (va_pbool_and (va_codegen_success_Loop6x_preamble alg) (va_pbool_and
    (va_codegen_success_Loop6x_plain alg 0 (va_op_xmm_xmm 2)) (va_pbool_and
    (va_codegen_success_MulAdd_step 0 0 (va_op_xmm_xmm 1) (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)
    (va_op_xmm_xmm 7) (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and
    (va_codegen_success_MulAdd_step 1 1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)
    (va_op_xmm_xmm 3) (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and
    (va_codegen_success_Loop6x_plain alg 1 (va_op_xmm_xmm 15)) (va_pbool_and
    (va_codegen_success_Loop6x_reverse128 5 2) (va_pbool_and (va_codegen_success_MulAdd_step 2 3
    (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)
    (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Loop6x_plain alg 2 (va_op_xmm_xmm 15))
    (va_pbool_and (va_codegen_success_MulAdd_step 3 4 (va_op_xmm_xmm 2) (va_op_xmm_xmm 3)
    (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 0) (va_op_xmm_xmm 1)) (va_pbool_and
    (va_codegen_success_Loop6x_plain alg 3 (va_op_xmm_xmm 15)) (va_pbool_and
    (va_codegen_success_Loop6x_reverse128 4 3) (va_pbool_and (va_codegen_success_MulAdd_step 4 6
    (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 0)
    (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Loop6x_plain alg 4 (va_op_xmm_xmm 15))
    (va_pbool_and (va_codegen_success_Loop6x_reverse128 3 4) (va_pbool_and
    (va_codegen_success_MulAdd_step 5 7 (va_op_xmm_xmm 2) (va_op_xmm_xmm 5) (va_op_xmm_xmm 1)
    (va_op_xmm_xmm 8) (va_op_xmm_xmm 8) (va_op_xmm_xmm 3)) (va_pbool_and
    (va_codegen_success_Loop6x_plain alg 5 (va_op_xmm_xmm 15)) (va_pbool_and
    (va_codegen_success_Loop6x_reverse128 2 5) (va_pbool_and (va_codegen_success_Load_0xc2_msb
    (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_ReduceLast false) (va_pbool_and
    (va_codegen_success_Loop6x_plain alg 6 (va_op_xmm_xmm 15)) (va_pbool_and
    (va_codegen_success_Loop6x_reverse128 1 6) (va_pbool_and (va_codegen_success_Loop6x_plain alg 7
    (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_LoadBe64_buffer128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR13) (va_op_reg_opr64_reg64 rR14) (0
    `op_Multiply` 16 + 8) Secret true) (va_pbool_and (va_codegen_success_LoadBe64_buffer128
    (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR12) (va_op_reg_opr64_reg64 rR14) (0
    `op_Multiply` 16) Secret false) (va_pbool_and (va_codegen_success_Loop6x_plain alg 8
    (va_op_xmm_xmm 15)) (va_pbool_and (if (alg = AES_256) then va_pbool_and
    (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRcx) (160 - 128) Secret) (va_pbool_and (va_codegen_success_VAESNI_enc
    (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 1))
    (va_pbool_and (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 12) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_VAESNI_enc
    (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 1)) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 1))
    (va_pbool_and (va_codegen_success_Loop6x_plain alg 10 (va_op_xmm_xmm 15)) (va_pbool_and
    (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRcx) (192 - 128) Secret) (va_pbool_and (va_codegen_success_VAESNI_enc
    (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 1))
    (va_pbool_and (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11)
    (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 12)
    (va_op_xmm_xmm 12) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_VAESNI_enc
    (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 1)) (va_pbool_and
    (va_codegen_success_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 1))
    (va_pbool_and (va_codegen_success_Loop6x_plain alg 12 (va_op_xmm_xmm 15)) (va_ttrue
    ())))))))))))))))) else va_ttrue ()) (va_pbool_and (if (alg = AES_256) then va_pbool_and
    (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRcx) (224 - 128) Secret) (va_ttrue ()) else va_pbool_and
    (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1)
    (va_op_reg_opr64_reg64 rRcx) (160 - 128) Secret) (va_ttrue ())) (va_pbool_and
    (va_codegen_success_Loop6x_round9 alg) (va_ttrue ())))))))))))))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_untransformedoriginal_Loop6x_partial (va_mods:va_mods_t) (alg:algorithm) (h_LE:quad32)
  (y_prev:quad32) (data:(seq quad32)) (count:nat) (in0_count:nat) (iv_b:buffer128)
  (in0_b:buffer128) (in_b:buffer128) (scratch_b:buffer128) (key_words:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (ctr_BE:quad32) : (va_quickCode (quad32_6)
  (va_code_untransformedoriginal_Loop6x_partial alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let
    (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in let (prev:Vale.Math.Poly2_s.poly) =
    Vale.Math.Poly2.Bits_s.of_quad32 (Vale.Def.Types_s.reverse_bytes_quad32 y_prev) in let
    (init:quad32_6) = make_six_of #Vale.Def.Types_s.quad32 (fun (n:(va_int_range 0 5)) ->
    Vale.Def.Types_s.quad32_xor (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite
    ctr_BE n)) (va_get_xmm 15 va_s)) in let (start:(va_int_at_least 0)) = in0_count `op_Multiply` 6
    in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 871 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_preamble alg h_LE iv_b scratch_b key_words round_keys keys_b hkeys_b ctr_BE)
    (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 872 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 0 key_words round_keys keys_b init (va_op_xmm_xmm 2)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 873 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_MulAdd_step 0 0 (va_op_xmm_xmm 1) (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) (va_op_xmm_xmm
    7) (va_op_xmm_xmm 7) (va_op_xmm_xmm 3) hkeys_b scratch_b h prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 874 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_MulAdd_step 1 1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm
    3) (va_op_xmm_xmm 0) (va_op_xmm_xmm 3) hkeys_b scratch_b h prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 875 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 1 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 876 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_reverse128 5 2 start in0_b scratch_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 877 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_MulAdd_step 2 3 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (va_op_xmm_xmm 3) (va_op_xmm_xmm
    5) (va_op_xmm_xmm 0) (va_op_xmm_xmm 5) hkeys_b scratch_b h prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 878 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 2 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 879 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_MulAdd_step 3 4 (va_op_xmm_xmm 2) (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm
    1) (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) hkeys_b scratch_b h prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 880 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 3 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 881 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_reverse128 4 3 start in0_b scratch_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 882 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_MulAdd_step 4 6 (va_op_xmm_xmm 3) (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm
    2) (va_op_xmm_xmm 0) (va_op_xmm_xmm 2) hkeys_b scratch_b h prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 883 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 4 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 884 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_reverse128 3 4 start in0_b scratch_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 885 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_MulAdd_step 5 7 (va_op_xmm_xmm 2) (va_op_xmm_xmm 5) (va_op_xmm_xmm 1) (va_op_xmm_xmm
    8) (va_op_xmm_xmm 8) (va_op_xmm_xmm 3) hkeys_b scratch_b h prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 886 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 5 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 887 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_reverse128 2 5 start in0_b scratch_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 888 column 18 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load_0xc2_msb (va_op_xmm_xmm 3)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 891 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_ReduceLast false h_LE y_prev data) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 892 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 6 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 893 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_reverse128 1 6 start in0_b scratch_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 894 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 7 key_words round_keys keys_b init (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 895 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR13)
    (va_op_reg_opr64_reg64 rR14) (0 `op_Multiply` 16 + 8) Secret true in0_b (in0_count
    `op_Multiply` 6 + 0)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 896 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_LoadBe64_buffer128 (va_op_heaplet_mem_heaplet 6) (va_op_reg_opr64_reg64 rR12)
    (va_op_reg_opr64_reg64 rR14) (0 `op_Multiply` 16) Secret false in0_b (in0_count `op_Multiply` 6
    + 0)) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 897 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 8 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (fun
    (va_s:va_state) _ -> va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 901 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_qInlineIf va_mods (alg = AES_256) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 913 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (160 - 128) Secret keys_b 10) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 914 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 915 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 916 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 917 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 918 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 1)) (va_QBind
    va_range1
    "***** PRECONDITION NOT MET AT line 919 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 1)) (fun
    (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 921 column 27 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_s.eval_rounds_reveal ()) (va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 922 column 44 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (fun (_:unit) -> Vale.AES.AES_helpers.commute_sub_bytes_shift_rows_forall ()) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 923 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 10 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 926 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (192 - 128) Secret keys_b 12) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 927 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 9) (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 928 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 10) (va_op_xmm_xmm 10) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 929 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 11) (va_op_xmm_xmm 11) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 930 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 12) (va_op_xmm_xmm 12) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 931 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 13) (va_op_xmm_xmm 13) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 932 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_VAESNI_enc (va_op_xmm_xmm 14) (va_op_xmm_xmm 14) (va_op_xmm_xmm 1)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 934 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_plain alg 12 key_words round_keys keys_b init (va_op_xmm_xmm 15)) (va_QEmpty
    (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QEmpty (())))) (fun
    (va_s:va_state) va_g -> va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 937 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_qInlineIf va_mods (alg = AES_256) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 939 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (224 - 128) Secret keys_b 14) (va_QEmpty (())))) (qblock va_mods (fun (va_s:va_state) ->
    va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 943 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64
    rRcx) (160 - 128) Secret keys_b 10) (va_QEmpty (()))))) (fun (va_s:va_state) va_g -> va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 946 column 18 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_quick_Loop6x_round9 alg count in_b scratch_b key_words round_keys keys_b) (va_QEmpty
    ((init))))))))))))))))))))))))))))))))

[@"opaque_to_smt"]
let va_lemma_untransformedoriginal_Loop6x_partial va_b0 va_s0 alg h_LE y_prev data count in0_count
  iv_b in0_b in_b scratch_b key_words round_keys keys_b hkeys_b ctr_BE =
  let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 3; va_Mod_mem_heaplet 2; va_Mod_xmm
    15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9;
    va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm
    2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11;
    va_Mod_reg64 rRbx; va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_untransformedoriginal_Loop6x_partial va_mods alg h_LE y_prev data count
    in0_count iv_b in0_b in_b scratch_b key_words round_keys keys_b hkeys_b ctr_BE in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_untransformedoriginal_Loop6x_partial
    alg) va_qc va_s0 (fun va_s0 va_sM va_g -> let init = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 758 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_ok va_sM) /\ (let (h:Vale.Math.Poly2_s.poly) = Vale.Math.Poly2.Bits_s.of_quad32
    (Vale.Def.Types_s.reverse_bytes_quad32 h_LE) in let (prev:Vale.Math.Poly2_s.poly) =
    Vale.Math.Poly2.Bits_s.of_quad32 (Vale.Def.Types_s.reverse_bytes_quad32 y_prev) in label
    va_range1
    "***** POSTCONDITION NOT MET AT line 837 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 scratch_b (va_get_mem_heaplet 3 va_s0)
    (va_get_mem_heaplet 3 va_sM) 1 8) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 838 column 70 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.modifies_buffer_specific128 iv_b (va_get_mem_heaplet 2 va_s0)
    (va_get_mem_heaplet 2 va_sM) 0 0) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 843 column 27 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (0 <= va_get_reg64 rRbx va_sM /\ va_get_reg64 rRbx va_sM < 256) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 844 column 50 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rRbx va_sM == Vale.Def.Words_s.__proj__Mkfour__item__lo0 (Vale.AES.GCTR.inc32lite
    ctr_BE 6) `op_Modulus` 256) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 847 column 118 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 9 va_sM, va_get_xmm 10 va_sM, va_get_xmm 11 va_sM, va_get_xmm 12 va_sM, va_get_xmm
    13 va_sM, va_get_xmm 14 va_sM) == rounds_opaque_6 init round_keys (Vale.AES.AES_common_s.nr alg
    - 1)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 848 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rR13 va_sM == Vale.Def.Types_s.reverse_bytes_nat64 (Vale.Arch.Types.hi64
    (Vale.X64.Decls.buffer128_read in0_b (in0_count `op_Multiply` 6 + 0) (va_get_mem_heaplet 6
    va_sM)))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 849 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (va_get_reg64 rR12 va_sM == Vale.Def.Types_s.reverse_bytes_nat64 (Vale.Arch.Types.lo64
    (Vale.X64.Decls.buffer128_read in0_b (in0_count `op_Multiply` 6 + 0) (va_get_mem_heaplet 6
    va_sM)))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 850 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (let rk = FStar.Seq.Base.index #quad32 round_keys (Vale.AES.AES_common_s.nr alg) in label
    va_range1
    "***** POSTCONDITION NOT MET AT line 852 column 107 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    ((va_get_xmm 2 va_sM, va_get_xmm 0 va_sM, va_get_xmm 5 va_sM, va_get_xmm 6 va_sM, va_get_xmm 7
    va_sM, va_get_xmm 3 va_sM) == make_six_of #quad32 (fun (i:(va_int_range 0 5)) ->
    Vale.Def.Types_s.quad32_xor rk (Vale.X64.Decls.buffer128_read in_b (count `op_Multiply` 6 + i)
    (va_get_mem_heaplet 6 va_sM)))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 853 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 8 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE 6)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 857 column 122 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 2 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (in0_count
    `op_Multiply` 6 + 5) (va_get_mem_heaplet 6 va_s0))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 858 column 122 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 3 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (in0_count
    `op_Multiply` 6 + 4) (va_get_mem_heaplet 6 va_s0))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 859 column 122 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 4 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (in0_count
    `op_Multiply` 6 + 3) (va_get_mem_heaplet 6 va_s0))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 860 column 122 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 5 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (in0_count
    `op_Multiply` 6 + 2) (va_get_mem_heaplet 6 va_s0))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 861 column 122 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (Vale.X64.Decls.buffer128_read scratch_b 6 (va_get_mem_heaplet 3 va_sM) ==
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.X64.Decls.buffer128_read in0_b (in0_count
    `op_Multiply` 6 + 1) (va_get_mem_heaplet 6 va_s0))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 863 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (init == make_six_of #quad32 (fun (n:(va_int_range 0 5)) -> Vale.Def.Types_s.quad32_xor
    (Vale.Def.Types_s.reverse_bytes_quad32 (Vale.AES.GCTR.inc32lite ctr_BE n))
    (FStar.Seq.Base.index #Vale.Def.Types_s.quad32 round_keys 0))) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 864 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (let eventual_Xi = add (add (Vale.Math.Poly2.Bits_s.of_quad32 (va_get_xmm 8 va_sM))
    (Vale.Math.Poly2.Bits_s.of_quad32 (Vale.X64.Decls.buffer128_read scratch_b 1
    (va_get_mem_heaplet 3 va_sM)))) (Vale.Math.Poly2.Bits_s.of_quad32 (va_get_xmm 4 va_sM)) in
    label va_range1
    "***** POSTCONDITION NOT MET AT line 865 column 94 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/aes/Vale.AES.X64.AESopt.vaf *****"
    (eventual_Xi == Vale.Math.Poly2.Bits_s.of_quad32 (Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.AES.GHash.ghash_incremental h_LE y_prev data))))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 3; va_Mod_mem_heaplet 2; va_Mod_xmm 15;
    va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9;
    va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm
    2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11;
    va_Mod_reg64 rRbx; va_Mod_ok; va_Mod_mem]) va_sM va_s0;
  let init = va_g in
  (va_sM, va_fM, init)

[@ "opaque_to_smt" va_qattr]
let va_transform_Loop6x_partial alg =
  (reorder (va_code_untransformedoriginal_Loop6x_partial alg) (va_code_Loop6x_partial_expected_code
    alg))

[@ "opaque_to_smt" va_qattr]
val va_code_Loop6x_partial : alg:algorithm -> Tot va_code
alg: Vale.AES.AES_common_s.algorithm -> Vale.X64.Decls.va_code