val va_wp_Nat64Equal (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
let va_wp_Nat64Equal (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (forall (va_x_r3:nat64) (va_x_r5:nat64) (va_x_xer:xer_t) . let va_sM =
    va_upd_xer va_x_xer (va_upd_reg 5 va_x_r5 (va_upd_reg 3 va_x_r3 va_s0)) in va_get_ok va_sM /\
    va_if (va_get_reg 4 va_s0 = 18446744073709551615) (fun _ -> va_get_reg 3 va_sM = 0) (fun _ ->
    va_get_reg 3 va_sM = 1) ==> va_k va_sM (())))
val va_wp_Nat64Equal (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
let va_wp_Nat64Equal (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
(va_get_ok va_s0 /\
  (forall (va_x_r3: nat64) (va_x_r5: nat64) (va_x_xer: xer_t).
      let va_sM = va_upd_xer va_x_xer (va_upd_reg 5 va_x_r5 (va_upd_reg 3 va_x_r3 va_s0)) in
      va_get_ok va_sM /\
      va_if (va_get_reg 4 va_s0 = 18446744073709551615)
        (fun _ -> va_get_reg 3 va_sM = 0)
        (fun _ -> va_get_reg 3 va_sM = 1) ==>
      va_k va_sM (())))
Vale.AES.PPC64LE.GCMdecrypt.fst.checked
Vale.PPC64LE.State.fsti.checked Vale.PPC64LE.Stack_i.fsti.checked Vale.PPC64LE.QuickCodes.fsti.checked Vale.PPC64LE.QuickCode.fst.checked Vale.PPC64LE.Memory.fsti.checked Vale.PPC64LE.Machine_s.fst.checked Vale.PPC64LE.InsVector.fsti.checked Vale.PPC64LE.InsStack.fsti.checked Vale.PPC64LE.InsMem.fsti.checked Vale.PPC64LE.InsBasic.fsti.checked Vale.PPC64LE.Decls.fsti.checked Vale.Poly1305.Math.fsti.checked Vale.Math.Poly2.Bits_s.fsti.checked Vale.Lib.Meta.fsti.checked Vale.Lib.Basic.fsti.checked Vale.Def.Words_s.fsti.checked Vale.Def.Words.Seq_s.fsti.checked Vale.Def.Words.Four_s.fsti.checked Vale.Def.Types_s.fst.checked Vale.Def.Prop_s.fst.checked Vale.Def.Opaque_s.fsti.checked Vale.Arch.Types.fsti.checked Vale.Arch.HeapImpl.fsti.checked Vale.AES.Types_helpers.fsti.checked Vale.AES.PPC64LE.GHash.fsti.checked Vale.AES.PPC64LE.GF128_Mul.fsti.checked Vale.AES.PPC64LE.GCTR.fsti.checked Vale.AES.PPC64LE.GCMencrypt.fsti.checked Vale.AES.PPC64LE.AES.fsti.checked Vale.AES.GHash_BE_s.fst.checked Vale.AES.GHash_BE.fsti.checked Vale.AES.GF128_s.fsti.checked Vale.AES.GF128.fsti.checked Vale.AES.GCTR_BE_s.fst.checked Vale.AES.GCTR_BE.fsti.checked Vale.AES.GCM_helpers_BE.fsti.checked Vale.AES.GCM_BE_s.fst.checked Vale.AES.GCM_BE.fsti.checked Vale.AES.AES_common_s.fst.checked Vale.AES.AES_BE_s.fst.checked prims.fst.checked FStar.Seq.Base.fsti.checked FStar.Seq.fst.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked
Vale.AES.PPC64LE.GCMdecrypt.fst
Vale.PPC64LE.Decls.va_state Prims.unit Prims.l_and Prims.b2t Vale.PPC64LE.Decls.va_get_ok Prims.l_Forall Vale.PPC64LE.Memory.nat64 Vale.PPC64LE.Machine_s.xer_t Prims.l_imp Vale.PPC64LE.Decls.va_if Prims.bool Prims.op_Equality Prims.int Vale.PPC64LE.Decls.va_get_reg Prims.l_not Vale.PPC64LE.Machine_s.state Vale.PPC64LE.Decls.va_upd_xer Vale.PPC64LE.Decls.va_upd_reg
module Vale.AES.PPC64LE.GCMdecrypt
open Vale.Def.Prop_s
open Vale.Def.Opaque_s
open FStar.Seq
open Vale.Def.Words_s
open Vale.Def.Words.Seq_s
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.Arch.HeapImpl
open Vale.AES.AES_BE_s
open Vale.AES.GCTR_BE_s
open Vale.AES.GCTR_BE
open Vale.AES.GCM_BE
open Vale.AES.GHash_BE_s
open Vale.AES.GHash_BE
open Vale.AES.GCM_BE_s
open Vale.AES.PPC64LE.AES
open Vale.AES.GF128_s
open Vale.AES.GF128
open Vale.Poly1305.Math
open Vale.AES.GCM_helpers_BE
open Vale.AES.PPC64LE.GHash
open Vale.AES.PPC64LE.GCTR
open Vale.PPC64LE.Machine_s
open Vale.PPC64LE.Memory
open Vale.PPC64LE.Stack_i
open Vale.PPC64LE.State
open Vale.PPC64LE.Decls
open Vale.PPC64LE.InsBasic
open Vale.PPC64LE.InsMem
open Vale.PPC64LE.InsVector
open Vale.PPC64LE.InsStack
open Vale.PPC64LE.QuickCode
open Vale.PPC64LE.QuickCodes
open Vale.AES.PPC64LE.GF128_Mul
open Vale.Math.Poly2.Bits_s
open Vale.Lib.Meta
open Vale.AES.PPC64LE.GCMencrypt
open Vale.Lib.Basic
#reset-options "--z3rlimit 20"
//-- Gcm_extra_bytes

val va_code_Gcm_extra_bytes : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Gcm_extra_bytes alg =
  (va_Block (va_CCons (va_code_Vmr (va_op_vec_opr_vec 11) (va_op_vec_opr_vec 7)) (va_CCons
    (va_code_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 5) (va_op_vec_opr_vec 9)
    (va_op_reg_opr_reg 3) Secret) (va_CCons (va_code_Vmr (va_op_vec_opr_vec 12) (va_op_vec_opr_vec
    9)) (va_CCons (va_code_Ghash_extra_bytes ()) (va_CCons (va_code_Vmr (va_op_vec_opr_vec 0)
    (va_op_vec_opr_vec 11)) (va_CCons (va_code_AESEncryptBlock alg) (va_CCons (va_code_Vxor
    (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 0)) (va_CCons
    (va_code_Store128_byte16_buffer (va_op_heaplet_mem_heaplet 5) (va_op_vec_opr_vec 12)
    (va_op_reg_opr_reg 3) Secret) (va_CNil ()))))))))))

val va_codegen_success_Gcm_extra_bytes : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Gcm_extra_bytes alg =
  (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec 11) (va_op_vec_opr_vec 7)) (va_pbool_and
    (va_codegen_success_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 5) (va_op_vec_opr_vec 9)
    (va_op_reg_opr_reg 3) Secret) (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec 12)
    (va_op_vec_opr_vec 9)) (va_pbool_and (va_codegen_success_Ghash_extra_bytes ()) (va_pbool_and
    (va_codegen_success_Vmr (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 11)) (va_pbool_and
    (va_codegen_success_AESEncryptBlock alg) (va_pbool_and (va_codegen_success_Vxor
    (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 0)) (va_pbool_and
    (va_codegen_success_Store128_byte16_buffer (va_op_heaplet_mem_heaplet 5) (va_op_vec_opr_vec 12)
    (va_op_reg_opr_reg 3) Secret) (va_ttrue ())))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Gcm_extra_bytes (va_mods:va_mods_t) (alg:algorithm) (inout_b:buffer128) (key:(seq
  nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (total_bytes:nat)
  (old_hash:quad32) (completed_quads:(seq quad32)) (h_BE:quad32) : (va_quickCode unit
  (va_code_Gcm_extra_bytes alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (len:(va_int_range
    1 1)) = 1 in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 164 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 11) (va_op_vec_opr_vec 7)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 165 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 5) (va_op_vec_opr_vec 9)
    (va_op_reg_opr_reg 3) Secret inout_b 0) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 166 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 9)) (fun (va_s:va_state) _ -> let
    (hash_input:quad32) = va_get_vec 9 va_s in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 170 column 22 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Ghash_extra_bytes hkeys_b total_bytes old_hash h_BE completed_quads) (fun
    (va_s:va_state) _ -> va_qAssert va_range1
    "***** PRECONDITION NOT MET AT line 171 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (FStar.Seq.Base.equal #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s) inout_b)) (FStar.Seq.Base.create #quad32 1
    hash_input)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 173 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 0) (va_op_vec_opr_vec 11)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 174 column 20 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_AESEncryptBlock alg (va_get_vec 7 va_old_s) key round_keys keys_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 176 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vxor (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 12) (va_op_vec_opr_vec 0)) (va_QBind
    va_range1
    "***** PRECONDITION NOT MET AT line 177 column 27 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Store128_byte16_buffer (va_op_heaplet_mem_heaplet 5) (va_op_vec_opr_vec 12)
    (va_op_reg_opr_reg 3) Secret inout_b 0) (fun (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 179 column 24 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GCTR_BE.gctr_partial_reveal ()) (va_QEmpty (())))))))))))))


val va_lemma_Gcm_extra_bytes : va_b0:va_code -> va_s0:va_state -> alg:algorithm ->
  inout_b:buffer128 -> key:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 ->
  hkeys_b:buffer128 -> total_bytes:nat -> old_hash:quad32 -> completed_quads:(seq quad32) ->
  h_BE:quad32
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Gcm_extra_bytes alg) va_s0 /\ va_get_ok va_s0 /\ (let
    (len:(va_int_range 1 1)) = 1 in Vale.PPC64LE.Decls.buffers_disjoint128 keys_b inout_b /\
    Vale.PPC64LE.Decls.buffers_disjoint128 hkeys_b inout_b /\ Vale.PPC64LE.Decls.validDstAddrs128
    (va_get_mem_heaplet 5 va_s0) (va_get_reg 3 va_s0) inout_b len (va_get_mem_layout va_s0) Secret
    /\ len == Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 inout_b /\ aes_reqs
    alg key round_keys keys_b (va_get_reg 4 va_s0) (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout
    va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0) hkeys_b)) h_BE /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 5 va_s0) hkeys_b 3
    (va_get_mem_layout va_s0) Secret /\ va_get_vec 1 va_s0 == Vale.AES.GHash_BE.ghash_incremental0
    h_BE old_hash completed_quads /\ FStar.Seq.Base.length #quad32 completed_quads == total_bytes
    `op_Division` 16 /\ total_bytes < 16 `op_Multiply` FStar.Seq.Base.length #quad32
    completed_quads + 16 /\ va_get_reg 8 va_s0 == total_bytes `op_Modulus` 16 /\ total_bytes
    `op_Modulus` 16 =!= 0 /\ (0 < total_bytes /\ total_bytes < 16 `op_Multiply`
    Vale.AES.GCM_helpers_BE.bytes_to_quad_size total_bytes) /\ 16 `op_Multiply`
    (Vale.AES.GCM_helpers_BE.bytes_to_quad_size total_bytes - 1) < total_bytes)))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (len:(va_int_range 1 1)) = 1 in Vale.PPC64LE.Decls.modifies_buffer128 inout_b
    (va_get_mem_heaplet 5 va_s0) (va_get_mem_heaplet 5 va_sM) /\ Vale.AES.GCTR_BE.gctr_partial alg
    len (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5
    va_s0) inout_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) key (va_get_vec 7 va_s0) /\ (let raw_quads =
    FStar.Seq.Base.append #quad32 completed_quads (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0) inout_b)) in let input_bytes =
    FStar.Seq.Base.slice #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 raw_quads)) 0 total_bytes in
    let padded_bytes = Vale.AES.GCTR_BE_s.pad_to_128_bits input_bytes in let input_quads =
    Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_bytes in l_and (FStar.Seq.Base.length
    #Vale.Def.Types_s.quad32 input_quads > 0) (va_get_vec 1 va_sM ==
    Vale.AES.GHash_BE.ghash_incremental h_BE old_hash input_quads))) /\ va_state_eq va_sM
    (va_update_mem_heaplet 5 va_sM (va_update_cr0 va_sM (va_update_vec 12 va_sM (va_update_vec 11
    va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM (va_update_vec 8 va_sM (va_update_vec 7
    va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM (va_update_vec 4 va_sM (va_update_vec 3
    va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0 va_sM (va_update_reg 10
    va_sM (va_update_reg 7 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Gcm_extra_bytes va_b0 va_s0 alg inout_b key round_keys keys_b hkeys_b total_bytes
  old_hash completed_quads h_BE =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 5; va_Mod_cr0; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10; va_Mod_reg 7;
    va_Mod_ok; va_Mod_mem] in
  let va_qc = va_qcode_Gcm_extra_bytes va_mods alg inout_b key round_keys keys_b hkeys_b
    total_bytes old_hash completed_quads h_BE in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Gcm_extra_bytes alg) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 106 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_ok va_sM) /\ (let (len:(va_int_range 1 1)) = 1 in label va_range1
    "***** POSTCONDITION NOT MET AT line 152 column 55 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 inout_b (va_get_mem_heaplet 5 va_s0) (va_get_mem_heaplet
    5 va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 155 column 147 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.AES.GCTR_BE.gctr_partial alg len (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0) inout_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_sM)
    inout_b)) key (va_get_vec 7 va_s0)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 158 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let raw_quads = FStar.Seq.Base.append #quad32 completed_quads
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0)
    inout_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 159 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let input_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 raw_quads)) 0 total_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 160 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let padded_bytes = Vale.AES.GCTR_BE_s.pad_to_128_bits input_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 161 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let input_quads = Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 162 column 91 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (l_and (FStar.Seq.Base.length #Vale.Def.Types_s.quad32 input_quads > 0) (va_get_vec 1 va_sM ==
    Vale.AES.GHash_BE.ghash_incremental h_BE old_hash input_quads)))))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 5; va_Mod_cr0; va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec
    10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4;
    va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10; va_Mod_reg 7; va_Mod_ok;
    va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Gcm_extra_bytes (alg:algorithm) (inout_b:buffer128) (key:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (total_bytes:nat) (old_hash:quad32)
  (completed_quads:(seq quad32)) (h_BE:quad32) (va_s0:va_state) (va_k:(va_state -> unit -> Type0))
  : Type0 =
  (va_get_ok va_s0 /\ (let (len:(va_int_range 1 1)) = 1 in Vale.PPC64LE.Decls.buffers_disjoint128
    keys_b inout_b /\ Vale.PPC64LE.Decls.buffers_disjoint128 hkeys_b inout_b /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 5 va_s0) (va_get_reg 3 va_s0) inout_b
    len (va_get_mem_layout va_s0) Secret /\ len == Vale.PPC64LE.Decls.buffer_length
    #Vale.PPC64LE.Memory.vuint128 inout_b /\ aes_reqs alg key round_keys keys_b (va_get_reg 4
    va_s0) (va_get_mem_heaplet 0 va_s0) (va_get_mem_layout va_s0) /\
    Vale.AES.GHash_BE.hkeys_reqs_priv (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0) hkeys_b)) h_BE /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg 5 va_s0) hkeys_b 3
    (va_get_mem_layout va_s0) Secret /\ va_get_vec 1 va_s0 == Vale.AES.GHash_BE.ghash_incremental0
    h_BE old_hash completed_quads /\ FStar.Seq.Base.length #quad32 completed_quads == total_bytes
    `op_Division` 16 /\ total_bytes < 16 `op_Multiply` FStar.Seq.Base.length #quad32
    completed_quads + 16 /\ va_get_reg 8 va_s0 == total_bytes `op_Modulus` 16 /\ total_bytes
    `op_Modulus` 16 =!= 0 /\ (0 < total_bytes /\ total_bytes < 16 `op_Multiply`
    Vale.AES.GCM_helpers_BE.bytes_to_quad_size total_bytes) /\ 16 `op_Multiply`
    (Vale.AES.GCM_helpers_BE.bytes_to_quad_size total_bytes - 1) < total_bytes) /\ (forall
    (va_x_mem:vale_heap) (va_x_r7:nat64) (va_x_r10:nat64) (va_x_v0:quad32) (va_x_v1:quad32)
    (va_x_v2:quad32) (va_x_v3:quad32) (va_x_v4:quad32) (va_x_v5:quad32) (va_x_v6:quad32)
    (va_x_v7:quad32) (va_x_v8:quad32) (va_x_v9:quad32) (va_x_v10:quad32) (va_x_v11:quad32)
    (va_x_v12:quad32) (va_x_cr0:cr0_t) (va_x_heap5:vale_heap) . let va_sM = va_upd_mem_heaplet 5
    va_x_heap5 (va_upd_cr0 va_x_cr0 (va_upd_vec 12 va_x_v12 (va_upd_vec 11 va_x_v11 (va_upd_vec 10
    va_x_v10 (va_upd_vec 9 va_x_v9 (va_upd_vec 8 va_x_v8 (va_upd_vec 7 va_x_v7 (va_upd_vec 6
    va_x_v6 (va_upd_vec 5 va_x_v5 (va_upd_vec 4 va_x_v4 (va_upd_vec 3 va_x_v3 (va_upd_vec 2 va_x_v2
    (va_upd_vec 1 va_x_v1 (va_upd_vec 0 va_x_v0 (va_upd_reg 10 va_x_r10 (va_upd_reg 7 va_x_r7
    (va_upd_mem va_x_mem va_s0))))))))))))))))) in va_get_ok va_sM /\ (let (len:(va_int_range 1 1))
    = 1 in Vale.PPC64LE.Decls.modifies_buffer128 inout_b (va_get_mem_heaplet 5 va_s0)
    (va_get_mem_heaplet 5 va_sM) /\ Vale.AES.GCTR_BE.gctr_partial alg len
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0)
    inout_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) key (va_get_vec 7 va_s0) /\ (let raw_quads =
    FStar.Seq.Base.append #quad32 completed_quads (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0) inout_b)) in let input_bytes =
    FStar.Seq.Base.slice #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 raw_quads)) 0 total_bytes in
    let padded_bytes = Vale.AES.GCTR_BE_s.pad_to_128_bits input_bytes in let input_quads =
    Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_bytes in l_and (FStar.Seq.Base.length
    #Vale.Def.Types_s.quad32 input_quads > 0) (va_get_vec 1 va_sM ==
    Vale.AES.GHash_BE.ghash_incremental h_BE old_hash input_quads))) ==> va_k va_sM (())))


val va_wpProof_Gcm_extra_bytes : alg:algorithm -> inout_b:buffer128 -> key:(seq nat32) ->
  round_keys:(seq quad32) -> keys_b:buffer128 -> hkeys_b:buffer128 -> total_bytes:nat ->
  old_hash:quad32 -> completed_quads:(seq quad32) -> h_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_Gcm_extra_bytes alg inout_b key round_keys keys_b hkeys_b
    total_bytes old_hash completed_quads h_BE va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Gcm_extra_bytes alg)
    ([va_Mod_mem_heaplet 5; va_Mod_cr0; va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9;
    va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec
    2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10; va_Mod_reg 7; va_Mod_mem]) va_s0 va_k ((va_sM,
    va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Gcm_extra_bytes alg inout_b key round_keys keys_b hkeys_b total_bytes old_hash
  completed_quads h_BE va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Gcm_extra_bytes (va_code_Gcm_extra_bytes alg) va_s0 alg inout_b key
    round_keys keys_b hkeys_b total_bytes old_hash completed_quads h_BE in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 5 va_sM (va_update_cr0 va_sM (va_update_vec 12
    va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM (va_update_vec 8
    va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM (va_update_vec 4
    va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0
    va_sM (va_update_reg 10 va_sM (va_update_reg 7 va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0))))))))))))))))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 5; va_Mod_cr0; va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec
    10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4;
    va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 10; va_Mod_reg 7;
    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_Gcm_extra_bytes (alg:algorithm) (inout_b:buffer128) (key:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (total_bytes:nat) (old_hash:quad32)
  (completed_quads:(seq quad32)) (h_BE:quad32) : (va_quickCode unit (va_code_Gcm_extra_bytes alg)) =
  (va_QProc (va_code_Gcm_extra_bytes alg) ([va_Mod_mem_heaplet 5; va_Mod_cr0; va_Mod_vec 12;
    va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6;
    va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg
    10; va_Mod_reg 7; va_Mod_mem]) (va_wp_Gcm_extra_bytes alg inout_b key round_keys keys_b hkeys_b
    total_bytes old_hash completed_quads h_BE) (va_wpProof_Gcm_extra_bytes alg inout_b key
    round_keys keys_b hkeys_b total_bytes old_hash completed_quads h_BE))
//--
//-- Gcm_blocks128

val va_code_Gcm_blocks128 : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Gcm_blocks128 alg =
  (va_Block (va_CCons (va_code_Vmr (va_op_vec_opr_vec 15) (va_op_vec_opr_vec 7)) (va_CCons
    (va_code_Move (va_op_reg_opr_reg 8) (va_op_reg_opr_reg 7)) (va_CCons (va_code_Move
    (va_op_reg_opr_reg 9) (va_op_reg_opr_reg 6)) (va_CCons (va_code_Move (va_op_reg_opr_reg 7)
    (va_op_reg_opr_reg 3)) (va_CCons (va_code_Ghash_buffer ()) (va_CCons (va_code_Vmr
    (va_op_vec_opr_vec 20) (va_op_vec_opr_vec 1)) (va_CCons (va_code_Vmr (va_op_vec_opr_vec 7)
    (va_op_vec_opr_vec 15)) (va_CCons (va_code_Move (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 8))
    (va_CCons (va_code_Move (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 9)) (va_CCons
    (va_code_Gctr_blocks128 alg) (va_CCons (va_code_Vmr (va_op_vec_opr_vec 1) (va_op_vec_opr_vec
    20)) (va_CNil ())))))))))))))

val va_codegen_success_Gcm_blocks128 : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Gcm_blocks128 alg =
  (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec 15) (va_op_vec_opr_vec 7)) (va_pbool_and
    (va_codegen_success_Move (va_op_reg_opr_reg 8) (va_op_reg_opr_reg 7)) (va_pbool_and
    (va_codegen_success_Move (va_op_reg_opr_reg 9) (va_op_reg_opr_reg 6)) (va_pbool_and
    (va_codegen_success_Move (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 3)) (va_pbool_and
    (va_codegen_success_Ghash_buffer ()) (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec
    20) (va_op_vec_opr_vec 1)) (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec 7)
    (va_op_vec_opr_vec 15)) (va_pbool_and (va_codegen_success_Move (va_op_reg_opr_reg 7)
    (va_op_reg_opr_reg 8)) (va_pbool_and (va_codegen_success_Move (va_op_reg_opr_reg 6)
    (va_op_reg_opr_reg 9)) (va_pbool_and (va_codegen_success_Gctr_blocks128 alg) (va_pbool_and
    (va_codegen_success_Vmr (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 20)) (va_ttrue ()))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Gcm_blocks128 (va_mods:va_mods_t) (alg:algorithm) (in_b:buffer128) (out_b:buffer128)
  (key:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (h_BE:quad32)
  : (va_quickCode unit (va_code_Gcm_blocks128 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 237 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 15) (va_op_vec_opr_vec 7)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 238 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Move (va_op_reg_opr_reg 8) (va_op_reg_opr_reg 7)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 239 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Move (va_op_reg_opr_reg 9) (va_op_reg_opr_reg 6)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 240 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Move (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 3)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 241 column 17 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Ghash_buffer hkeys_b in_b h_BE (va_get_vec 1 va_old_s)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 242 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 20) (va_op_vec_opr_vec 1)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 243 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 15)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 244 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Move (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 8)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 245 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Move (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 9)) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 246 column 19 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gctr_blocks128 alg in_b out_b key round_keys keys_b) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 247 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 1) (va_op_vec_opr_vec 20)) (va_QEmpty (()))))))))))))))


val va_lemma_Gcm_blocks128 : va_b0:va_code -> va_s0:va_state -> alg:algorithm -> in_b:buffer128 ->
  out_b:buffer128 -> key:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 ->
  hkeys_b:buffer128 -> h_BE:quad32
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Gcm_blocks128 alg) va_s0 /\ va_get_ok va_s0 /\
    (Vale.PPC64LE.Decls.buffers_disjoint128 keys_b out_b /\ Vale.PPC64LE.Decls.buffers_disjoint128
    hkeys_b out_b /\ (Vale.PPC64LE.Decls.buffers_disjoint128 in_b out_b \/ in_b == out_b) /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg 3 va_s0) in_b
    (va_get_reg 6 va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128
    (va_get_mem_heaplet 1 va_s0) (va_get_reg 7 va_s0) out_b (va_get_reg 6 va_s0) (va_get_mem_layout
    va_s0) Secret /\ va_get_reg 3 va_s0 + 16 `op_Multiply` va_get_reg 6 va_s0 < pow2_64 /\
    va_get_reg 7 va_s0 + 16 `op_Multiply` va_get_reg 6 va_s0 < pow2_64 /\ l_and
    (Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in_b ==
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 out_b)
    (Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in_b < pow2_32) /\ va_get_reg 6
    va_s0 == Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in_b /\ va_get_reg 6
    va_s0 < pow2_32 /\ aes_reqs alg key round_keys keys_b (va_get_reg 4 va_s0) (va_get_mem_heaplet
    0 va_s0) (va_get_mem_layout va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0)
    hkeys_b)) h_BE /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg
    5 va_s0) hkeys_b 3 (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.PPC64LE.Decls.modifies_buffer128 out_b (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1
    va_sM) /\ Vale.AES.GCTR_BE.gctr_partial alg (va_get_reg 6 va_s0)
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_sM) out_b)) key (va_get_vec 7 va_s0) /\ va_get_vec 7 va_sM == Vale.AES.GCTR_BE.inc32lite
    (va_get_vec 7 va_s0) (va_get_reg 6 va_s0) /\ (va_get_reg 6 va_s0 == 0 ==> l_and (va_get_vec 1
    va_sM == va_get_vec 1 va_s0) (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM) out_b ==
    Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) out_b)) /\ (va_get_reg 6 va_s0 > 0 ==>
    l_and (va_get_reg 6 va_s0 <= FStar.Seq.Base.length #Vale.PPC64LE.Machine_s.quad32
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in_b) ==> FStar.Seq.Base.length
    #Vale.PPC64LE.Machine_s.quad32 (FStar.Seq.Base.slice #Vale.PPC64LE.Machine_s.quad32
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in_b) 0 (va_get_reg 6 va_s0)) > 0)
    (va_get_vec 1 va_sM == Vale.AES.GHash_BE.ghash_incremental h_BE (va_get_vec 1 va_s0)
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in_b))))) /\ va_state_eq va_sM (va_update_mem_heaplet 1 va_sM (va_update_cr0 va_sM
    (va_update_vec 20 va_sM (va_update_vec 19 va_sM (va_update_vec 18 va_sM (va_update_vec 17 va_sM
    (va_update_vec 16 va_sM (va_update_vec 15 va_sM (va_update_vec 14 va_sM (va_update_vec 13 va_sM
    (va_update_vec 12 va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM
    (va_update_vec 8 va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM
    (va_update_vec 4 va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM
    (va_update_vec 0 va_sM (va_update_reg 31 va_sM (va_update_reg 30 va_sM (va_update_reg 29 va_sM
    (va_update_reg 28 va_sM (va_update_reg 27 va_sM (va_update_reg 26 va_sM (va_update_reg 10 va_sM
    (va_update_reg 9 va_sM (va_update_reg 8 va_sM (va_update_reg 6 va_sM (va_update_reg 7 va_sM
    (va_update_reg 3 va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0)))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Gcm_blocks128 va_b0 va_s0 alg in_b out_b key round_keys keys_b hkeys_b h_BE =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 20; va_Mod_vec 19;
    va_Mod_vec 18; va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13;
    va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7;
    va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec
    0; va_Mod_reg 31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26;
    va_Mod_reg 10; va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 6; va_Mod_reg 7; va_Mod_reg 3; va_Mod_ok;
    va_Mod_mem] in
  let va_qc = va_qcode_Gcm_blocks128 va_mods alg in_b out_b key round_keys keys_b hkeys_b h_BE in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Gcm_blocks128 alg) va_qc va_s0 (fun
    va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 182 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_ok va_sM) /\ (label va_range1
    "***** POSTCONDITION NOT MET AT line 226 column 53 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 out_b (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1
    va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 229 column 147 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.AES.GCTR_BE.gctr_partial alg (va_get_reg 6 va_s0)
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_sM) out_b)) key (va_get_vec 7 va_s0)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 230 column 45 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_vec 7 va_sM == Vale.AES.GCTR_BE.inc32lite (va_get_vec 7 va_s0) (va_get_reg 6 va_s0)) /\
    label va_range1
    "***** POSTCONDITION NOT MET AT line 233 column 93 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_reg 6 va_s0 == 0 ==> l_and (va_get_vec 1 va_sM == va_get_vec 1 va_s0)
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM) out_b == Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) out_b)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 235 column 113 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_reg 6 va_s0 > 0 ==> l_and (va_get_reg 6 va_s0 <= FStar.Seq.Base.length
    #Vale.PPC64LE.Machine_s.quad32 (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in_b) ==>
    FStar.Seq.Base.length #Vale.PPC64LE.Machine_s.quad32 (FStar.Seq.Base.slice
    #Vale.PPC64LE.Machine_s.quad32 (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in_b) 0
    (va_get_reg 6 va_s0)) > 0) (va_get_vec 1 va_sM == Vale.AES.GHash_BE.ghash_incremental h_BE
    (va_get_vec 1 va_s0) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) in_b)))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec
    18; va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12;
    va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6;
    va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg
    31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10;
    va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 6; va_Mod_reg 7; va_Mod_reg 3; va_Mod_ok; va_Mod_mem])
    va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Gcm_blocks128 (alg:algorithm) (in_b:buffer128) (out_b:buffer128) (key:(seq nat32))
  (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (h_BE:quad32) (va_s0:va_state)
  (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (Vale.PPC64LE.Decls.buffers_disjoint128 keys_b out_b /\
    Vale.PPC64LE.Decls.buffers_disjoint128 hkeys_b out_b /\ (Vale.PPC64LE.Decls.buffers_disjoint128
    in_b out_b \/ in_b == out_b) /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 1
    va_s0) (va_get_reg 3 va_s0) in_b (va_get_reg 6 va_s0) (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) (va_get_reg 7 va_s0) out_b
    (va_get_reg 6 va_s0) (va_get_mem_layout va_s0) Secret /\ va_get_reg 3 va_s0 + 16 `op_Multiply`
    va_get_reg 6 va_s0 < pow2_64 /\ va_get_reg 7 va_s0 + 16 `op_Multiply` va_get_reg 6 va_s0 <
    pow2_64 /\ l_and (Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in_b ==
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 out_b)
    (Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in_b < pow2_32) /\ va_get_reg 6
    va_s0 == Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in_b /\ va_get_reg 6
    va_s0 < pow2_32 /\ aes_reqs alg key round_keys keys_b (va_get_reg 4 va_s0) (va_get_mem_heaplet
    0 va_s0) (va_get_mem_layout va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0)
    hkeys_b)) h_BE /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg
    5 va_s0) hkeys_b 3 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap)
    (va_x_r3:nat64) (va_x_r7:nat64) (va_x_r6:nat64) (va_x_r8:nat64) (va_x_r9:nat64)
    (va_x_r10:nat64) (va_x_r26:nat64) (va_x_r27:nat64) (va_x_r28:nat64) (va_x_r29:nat64)
    (va_x_r30:nat64) (va_x_r31:nat64) (va_x_v0:quad32) (va_x_v1:quad32) (va_x_v2:quad32)
    (va_x_v3:quad32) (va_x_v4:quad32) (va_x_v5:quad32) (va_x_v6:quad32) (va_x_v7:quad32)
    (va_x_v8:quad32) (va_x_v9:quad32) (va_x_v10:quad32) (va_x_v11:quad32) (va_x_v12:quad32)
    (va_x_v13:quad32) (va_x_v14:quad32) (va_x_v15:quad32) (va_x_v16:quad32) (va_x_v17:quad32)
    (va_x_v18:quad32) (va_x_v19:quad32) (va_x_v20:quad32) (va_x_cr0:cr0_t) (va_x_heap1:vale_heap) .
    let va_sM = va_upd_mem_heaplet 1 va_x_heap1 (va_upd_cr0 va_x_cr0 (va_upd_vec 20 va_x_v20
    (va_upd_vec 19 va_x_v19 (va_upd_vec 18 va_x_v18 (va_upd_vec 17 va_x_v17 (va_upd_vec 16 va_x_v16
    (va_upd_vec 15 va_x_v15 (va_upd_vec 14 va_x_v14 (va_upd_vec 13 va_x_v13 (va_upd_vec 12 va_x_v12
    (va_upd_vec 11 va_x_v11 (va_upd_vec 10 va_x_v10 (va_upd_vec 9 va_x_v9 (va_upd_vec 8 va_x_v8
    (va_upd_vec 7 va_x_v7 (va_upd_vec 6 va_x_v6 (va_upd_vec 5 va_x_v5 (va_upd_vec 4 va_x_v4
    (va_upd_vec 3 va_x_v3 (va_upd_vec 2 va_x_v2 (va_upd_vec 1 va_x_v1 (va_upd_vec 0 va_x_v0
    (va_upd_reg 31 va_x_r31 (va_upd_reg 30 va_x_r30 (va_upd_reg 29 va_x_r29 (va_upd_reg 28 va_x_r28
    (va_upd_reg 27 va_x_r27 (va_upd_reg 26 va_x_r26 (va_upd_reg 10 va_x_r10 (va_upd_reg 9 va_x_r9
    (va_upd_reg 8 va_x_r8 (va_upd_reg 6 va_x_r6 (va_upd_reg 7 va_x_r7 (va_upd_reg 3 va_x_r3
    (va_upd_mem va_x_mem va_s0))))))))))))))))))))))))))))))))))) in va_get_ok va_sM /\
    (Vale.PPC64LE.Decls.modifies_buffer128 out_b (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1
    va_sM) /\ Vale.AES.GCTR_BE.gctr_partial alg (va_get_reg 6 va_s0)
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_sM) out_b)) key (va_get_vec 7 va_s0) /\ va_get_vec 7 va_sM == Vale.AES.GCTR_BE.inc32lite
    (va_get_vec 7 va_s0) (va_get_reg 6 va_s0) /\ (va_get_reg 6 va_s0 == 0 ==> l_and (va_get_vec 1
    va_sM == va_get_vec 1 va_s0) (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM) out_b ==
    Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) out_b)) /\ (va_get_reg 6 va_s0 > 0 ==>
    l_and (va_get_reg 6 va_s0 <= FStar.Seq.Base.length #Vale.PPC64LE.Machine_s.quad32
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in_b) ==> FStar.Seq.Base.length
    #Vale.PPC64LE.Machine_s.quad32 (FStar.Seq.Base.slice #Vale.PPC64LE.Machine_s.quad32
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in_b) 0 (va_get_reg 6 va_s0)) > 0)
    (va_get_vec 1 va_sM == Vale.AES.GHash_BE.ghash_incremental h_BE (va_get_vec 1 va_s0)
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in_b))))) ==> va_k va_sM (())))


val va_wpProof_Gcm_blocks128 : alg:algorithm -> in_b:buffer128 -> out_b:buffer128 -> key:(seq
  nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 -> hkeys_b:buffer128 -> h_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_Gcm_blocks128 alg in_b out_b key round_keys keys_b hkeys_b
    h_BE va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Gcm_blocks128 alg)
    ([va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 6; va_Mod_reg 7; va_Mod_reg 3; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0,
    va_g))))
[@"opaque_to_smt"]
let va_wpProof_Gcm_blocks128 alg in_b out_b key round_keys keys_b hkeys_b h_BE va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Gcm_blocks128 (va_code_Gcm_blocks128 alg) va_s0 alg in_b out_b key
    round_keys keys_b hkeys_b h_BE in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 1 va_sM (va_update_cr0 va_sM (va_update_vec 20
    va_sM (va_update_vec 19 va_sM (va_update_vec 18 va_sM (va_update_vec 17 va_sM (va_update_vec 16
    va_sM (va_update_vec 15 va_sM (va_update_vec 14 va_sM (va_update_vec 13 va_sM (va_update_vec 12
    va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM (va_update_vec 8
    va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM (va_update_vec 4
    va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0
    va_sM (va_update_reg 31 va_sM (va_update_reg 30 va_sM (va_update_reg 29 va_sM (va_update_reg 28
    va_sM (va_update_reg 27 va_sM (va_update_reg 26 va_sM (va_update_reg 10 va_sM (va_update_reg 9
    va_sM (va_update_reg 8 va_sM (va_update_reg 6 va_sM (va_update_reg 7 va_sM (va_update_reg 3
    va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))))))))))))))))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec
    18; va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12;
    va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6;
    va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg
    31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10;
    va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 6; va_Mod_reg 7; va_Mod_reg 3; 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_Gcm_blocks128 (alg:algorithm) (in_b:buffer128) (out_b:buffer128) (key:(seq nat32))
  (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (h_BE:quad32) : (va_quickCode
  unit (va_code_Gcm_blocks128 alg)) =
  (va_QProc (va_code_Gcm_blocks128 alg) ([va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 20;
    va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14;
    va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8;
    va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec
    1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27;
    va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 6; va_Mod_reg 7;
    va_Mod_reg 3; va_Mod_mem]) (va_wp_Gcm_blocks128 alg in_b out_b key round_keys keys_b hkeys_b
    h_BE) (va_wpProof_Gcm_blocks128 alg in_b out_b key round_keys keys_b hkeys_b h_BE))
//--
//-- Gcm_blocks
#push-options "--z3rlimit 600"

val va_code_Gcm_blocks : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Gcm_blocks alg =
  (va_Block (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 5)
    (va_op_reg_opr_reg 25) (11 `op_Multiply` 8) Secret) (va_CCons (va_code_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 25) (0 `op_Multiply` 8)
    Secret) (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7)
    (va_op_reg_opr_reg 25) (6 `op_Multiply` 8) Secret) (va_CCons (va_code_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25) (7 `op_Multiply` 8)
    Secret) (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 9)
    (va_op_reg_opr_reg 25) (8 `op_Multiply` 8) Secret) (va_CCons (va_code_Gcm_blocks_auth ())
    (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 10)
    (va_op_reg_opr_reg 25) (9 `op_Multiply` 8) Secret) (va_CCons (va_code_Load128_byte16_buffer
    (va_op_heaplet_mem_heaplet 2) (va_op_vec_opr_vec 7) (va_op_reg_opr_reg 10) Public) (va_CCons
    (va_code_Vmr (va_op_vec_opr_vec 21) (va_op_vec_opr_vec 7)) (va_CCons (va_code_Load_one_lsb
    (va_op_vec_opr_vec 10)) (va_CCons (va_code_Vadduwm (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 7)
    (va_op_vec_opr_vec 10)) (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 25) (1 `op_Multiply` 8) Secret) (va_CCons
    (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25)
    (2 `op_Multiply` 8) Secret) (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25) (3 `op_Multiply` 8) Secret) (va_CCons
    (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 25)
    (10 `op_Multiply` 8) Secret) (va_CCons (va_code_Gcm_blocks128 alg) (va_CCons (va_code_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25) (3 `op_Multiply` 8)
    Secret) (va_CCons (va_code_Sl64Imm (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 7) 4) (va_CCons
    (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25)
    (5 `op_Multiply` 8) Secret) (va_CCons (va_IfElse (va_cmp_gt (va_op_cmp_reg 6) (va_op_cmp_reg
    7)) (va_Block (va_CCons (va_code_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 3)
    (va_op_reg_opr_reg 25) (4 `op_Multiply` 8) Secret) (va_CCons (va_code_LoadImm64
    (va_op_reg_opr_reg 10) 15) (va_CCons (va_code_And (va_op_reg_opr_reg 8) (va_op_reg_opr_reg 6)
    (va_op_reg_opr_reg 10)) (va_CCons (va_code_Gcm_extra_bytes alg) (va_CCons (va_Block (va_CNil
    ())) (va_CNil ()))))))) (va_Block (va_CNil ()))) (va_CCons (va_code_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25) (8 `op_Multiply` 8)
    Secret) (va_CCons (va_code_Gcm_make_length_quad ()) (va_CCons (va_code_Ghash_register ())
    (va_CCons (va_code_Vmr (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 21)) (va_CCons
    (va_code_Gctr_register alg) (va_CCons (va_Block (va_CNil ())) (va_CNil
    ()))))))))))))))))))))))))))))

val va_codegen_success_Gcm_blocks : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Gcm_blocks alg =
  (va_pbool_and (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 5)
    (va_op_reg_opr_reg 25) (11 `op_Multiply` 8) Secret) (va_pbool_and (va_codegen_success_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 25) (0 `op_Multiply` 8)
    Secret) (va_pbool_and (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25) (6 `op_Multiply` 8) Secret) (va_pbool_and
    (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6)
    (va_op_reg_opr_reg 25) (7 `op_Multiply` 8) Secret) (va_pbool_and (va_codegen_success_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 9) (va_op_reg_opr_reg 25) (8 `op_Multiply` 8)
    Secret) (va_pbool_and (va_codegen_success_Gcm_blocks_auth ()) (va_pbool_and
    (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 10)
    (va_op_reg_opr_reg 25) (9 `op_Multiply` 8) Secret) (va_pbool_and
    (va_codegen_success_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 2) (va_op_vec_opr_vec 7)
    (va_op_reg_opr_reg 10) Public) (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec 21)
    (va_op_vec_opr_vec 7)) (va_pbool_and (va_codegen_success_Load_one_lsb (va_op_vec_opr_vec 10))
    (va_pbool_and (va_codegen_success_Vadduwm (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 7)
    (va_op_vec_opr_vec 10)) (va_pbool_and (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet
    3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 25) (1 `op_Multiply` 8) Secret) (va_pbool_and
    (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7)
    (va_op_reg_opr_reg 25) (2 `op_Multiply` 8) Secret) (va_pbool_and (va_codegen_success_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25) (3 `op_Multiply` 8)
    Secret) (va_pbool_and (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3)
    (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 25) (10 `op_Multiply` 8) Secret) (va_pbool_and
    (va_codegen_success_Gcm_blocks128 alg) (va_pbool_and (va_codegen_success_MemLoad64
    (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25) (3 `op_Multiply` 8)
    Secret) (va_pbool_and (va_codegen_success_Sl64Imm (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 7)
    4) (va_pbool_and (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg
    6) (va_op_reg_opr_reg 25) (5 `op_Multiply` 8) Secret) (va_pbool_and (va_pbool_and
    (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 3)
    (va_op_reg_opr_reg 25) (4 `op_Multiply` 8) Secret) (va_pbool_and (va_codegen_success_LoadImm64
    (va_op_reg_opr_reg 10) 15) (va_pbool_and (va_codegen_success_And (va_op_reg_opr_reg 8)
    (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 10)) (va_codegen_success_Gcm_extra_bytes alg))))
    (va_pbool_and (va_codegen_success_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7)
    (va_op_reg_opr_reg 25) (8 `op_Multiply` 8) Secret) (va_pbool_and
    (va_codegen_success_Gcm_make_length_quad ()) (va_pbool_and (va_codegen_success_Ghash_register
    ()) (va_pbool_and (va_codegen_success_Vmr (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 21))
    (va_pbool_and (va_codegen_success_Gctr_register alg) (va_ttrue ()))))))))))))))))))))))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Gcm_blocks (va_mods:va_mods_t) (alg:algorithm) (auth_b:buffer128) (abytes_b:buffer128)
  (in128_b:buffer128) (out128_b:buffer128) (inout_b:buffer128) (iv_b:buffer128) (key:(seq nat32))
  (round_keys:(seq quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (gcm_struct_b:buffer64) :
  (va_quickCode unit (va_code_Gcm_blocks alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let
    (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0
    (va_get_mem_heaplet 3 va_s) in let (in128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1 (va_get_mem_heaplet 3 va_s) in let
    (out128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2
    (va_get_mem_heaplet 3 va_s) in let (len128:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3 (va_get_mem_heaplet 3 va_s) in let
    (inout_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4
    (va_get_mem_heaplet 3 va_s) in let (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 5 (va_get_mem_heaplet 3 va_s) in let
    (auth_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6
    (va_get_mem_heaplet 3 va_s) in let (auth_len:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7 (va_get_mem_heaplet 3 va_s) in let
    (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8
    (va_get_mem_heaplet 3 va_s) in let (iv_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9 (va_get_mem_heaplet 3 va_s) in let
    (keys_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10
    (va_get_mem_heaplet 3 va_s) in let (h_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11 (va_get_mem_heaplet 3 va_s) in let
    (h_BE:Vale.Def.Types_s.quad32) = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2 (va_get_mem_heaplet 0 va_old_s)) in va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 396 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 5) (va_op_reg_opr_reg 25)
    (11 `op_Multiply` 8) Secret gcm_struct_b 11) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 398 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 25)
    (0 `op_Multiply` 8) Secret gcm_struct_b 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 399 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25)
    (6 `op_Multiply` 8) Secret gcm_struct_b 6) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 400 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25)
    (7 `op_Multiply` 8) Secret gcm_struct_b 7) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 401 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 9) (va_op_reg_opr_reg 25)
    (8 `op_Multiply` 8) Secret gcm_struct_b 8) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 402 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gcm_blocks_auth auth_b abytes_b hkeys_b h_BE) (fun (va_s:va_state)
    (auth_quad_seq:(seq quad32)) -> let (y_0:quad32) = Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 0 in let (y_auth_bytes:quad32) = va_get_vec 1 va_s in let
    (iv_BE:Vale.Def.Types_s.quad32) = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read iv_b 0 (va_get_mem_heaplet 2 va_old_s)) in let
    (ctr_BE_1:quad32) = iv_BE in let (ctr_BE_2:quad32) = Vale.AES.GCTR_BE_s.inc32 iv_BE 1 in
    va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 410 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 10) (va_op_reg_opr_reg 25)
    (9 `op_Multiply` 8) Secret gcm_struct_b 9) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 411 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Load128_byte16_buffer (va_op_heaplet_mem_heaplet 2) (va_op_vec_opr_vec 7)
    (va_op_reg_opr_reg 10) Public iv_b 0) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 413 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 21) (va_op_vec_opr_vec 7)) (fun (va_s:va_state) _ -> let
    (j0:quad32) = va_get_vec 7 va_s in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 415 column 17 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Load_one_lsb (va_op_vec_opr_vec 10)) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 417 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vadduwm (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 10)) (fun
    (va_s:va_state) _ -> let (auth_in:(seq quad32)) = auth_quad_seq in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 422 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 25)
    (1 `op_Multiply` 8) Secret gcm_struct_b 1) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 423 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25)
    (2 `op_Multiply` 8) Secret gcm_struct_b 2) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 424 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25)
    (3 `op_Multiply` 8) Secret gcm_struct_b 3) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 425 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 25)
    (10 `op_Multiply` 8) Secret gcm_struct_b 10) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 426 column 18 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gcm_blocks128 alg in128_b out128_b key round_keys keys_b hkeys_b h_BE) (fun
    (va_s:va_state) _ -> let (y_cipher128:quad32) = va_get_vec 1 va_s in let
    (va_arg115:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_old_s) in128_b) in let (va_arg114:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = auth_in in
    let (va_arg113:Vale.Def.Types_s.quad32) = y_cipher128 in let
    (va_arg112:Vale.Def.Types_s.quad32) = y_auth_bytes in let (va_arg111:Vale.Def.Types_s.quad32) =
    y_0 in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 428 column 36 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GHash_BE.lemma_ghash_incremental0_append h_BE va_arg111 va_arg112
    va_arg113 va_arg114 va_arg115) (let auth_in = FStar.Seq.Base.append #quad32 auth_in
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_old_s) in128_b)) in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 431 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25)
    (3 `op_Multiply` 8) Secret gcm_struct_b 3) (fun (va_s:va_state) _ -> let
    (va_arg110:Vale.Def.Types_s.nat64) = va_get_reg 7 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 432 column 18 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.Types_helpers.lemma_ishl_64 va_arg110 4) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 433 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Sl64Imm (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 7) 4) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 434 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 25)
    (5 `op_Multiply` 8) Secret gcm_struct_b 5) (fun (va_s:va_state) _ -> let (y_inout:quad32) =
    y_cipher128 in let (plain_byte_seq:(seq quad32)) = empty_seq_quad32 in let
    (cipher_byte_seq:(seq quad32)) = empty_seq_quad32 in let (va_arg109:Vale.Def.Types_s.quad32) =
    va_get_vec 7 va_s in let (va_arg108:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) = key in let
    (va_arg107:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = cipher_byte_seq in let
    (va_arg106:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = plain_byte_seq in let
    (va_arg105:Vale.AES.AES_common_s.algorithm) = alg in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 439 column 29 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GCTR_BE.gctr_partial_opaque_init va_arg105 va_arg106 va_arg107
    va_arg108 va_arg109) (let (total_bytes:(va_int_at_least 0)) = FStar.Seq.Base.length #quad32
    auth_quad_seq `op_Multiply` 16 + plain_num_bytes in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 442 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_qIf va_mods (Cmp_gt (va_op_cmp_reg 6) (va_op_cmp_reg 7)) (qblock va_mods (fun
    (va_s:va_state) -> va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 444 column 18 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 25)
    (4 `op_Multiply` 8) Secret gcm_struct_b 4) (fun (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 445 column 26 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.Poly1305.Math.lemma_poly_bits64 ()) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 446 column 18 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 10) 15) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 447 column 12 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_And (va_op_reg_opr_reg 8) (va_op_reg_opr_reg 6) (va_op_reg_opr_reg 10)) (va_QBind
    va_range1
    "***** PRECONDITION NOT MET AT line 449 column 24 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gcm_extra_bytes alg inout_b key round_keys keys_b hkeys_b total_bytes y_0 auth_in
    h_BE) (fun (va_s:va_state) _ -> let y_inout = va_get_vec 1 va_s in let
    (raw_auth_quads:(FStar.Seq.Base.seq quad32)) = FStar.Seq.Base.append #quad32 auth_in
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5
    va_old_s) inout_b)) in va_qAssertSquash va_range1
    "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 453 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let
    (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584
    j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583))))
    Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 raw_auth_quads)) 0
    total_bytes) (fun _ -> let (auth_input_bytes:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) =
    FStar.Seq.Base.slice #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 raw_auth_quads)) 0 total_bytes
    in let (padded_auth_bytes:(FStar.Seq.Base.seq Vale.Def.Types_s.nat8)) =
    Vale.AES.GCTR_BE_s.pad_to_128_bits auth_input_bytes in let auth_in =
    Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_auth_bytes in let plain_byte_seq =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5
    va_old_s) inout_b) in let cipher_byte_seq = Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s) inout_b) in va_QEmpty ((auth_in,
    cipher_byte_seq, plain_byte_seq, y_inout)))))))))) (qblock va_mods (fun (va_s:va_state) ->
    va_QEmpty ((auth_in, cipher_byte_seq, plain_byte_seq, y_inout))))) (fun (va_s:va_state) va_g ->
    let ((auth_in:(seq quad32)), (cipher_byte_seq:(seq quad32)), (plain_byte_seq:(seq quad32)),
    (y_inout:quad32)) = va_g in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 461 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_MemLoad64 (va_op_heaplet_mem_heaplet 3) (va_op_reg_opr_reg 7) (va_op_reg_opr_reg 25)
    (8 `op_Multiply` 8) Secret gcm_struct_b 8) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 462 column 25 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gcm_make_length_quad ()) (fun (va_s:va_state) _ -> let (length_quad32:quad32) =
    va_get_vec 9 va_s in va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 465 column 19 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Ghash_register hkeys_b h_BE y_inout) (fun (va_s:va_state) _ -> let (y_final:quad32) =
    va_get_vec 1 va_s in va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 468 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Vmr (va_op_vec_opr_vec 7) (va_op_vec_opr_vec 21)) (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 471 column 18 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gctr_register alg key round_keys keys_b) (fun (va_s:va_state) _ -> let
    (va_arg104:Vale.Def.Types_s.quad32) = va_get_vec 1 va_s in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 473 column 40 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.Arch.Types.be_seq_quad32_to_bytes_of_singleton va_arg104)
    (va_qAssertSquash va_range1
    "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 474 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    ((fun (icb_661:Vale.Def.Types_s.quad32) (plain_662:Vale.Def.Types_s.quad32)
    (alg_663:Vale.AES.AES_common_s.algorithm) (key_664:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32))
    (i_665:Prims.int) -> Vale.AES.AES_BE_s.is_aes_key_word alg_663 key_664) j0 y_final alg key 0)
    (fun _ -> va_qAssert va_range1
    "***** PRECONDITION NOT MET AT line 474 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_vec 1 va_s == Vale.AES.GCTR_BE_s.gctr_encrypt_block j0 y_final alg key 0) (let
    (plain128:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_old_s) in128_b) in let (cipher128:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s)
    in128_b) in va_qAssert va_range1
    "***** PRECONDITION NOT MET AT line 479 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (FStar.Seq.Base.length #quad32 plain_byte_seq == 0 ==> FStar.Seq.Base.equal
    #Vale.Def.Types_s.quad32 (FStar.Seq.Base.append #Vale.Def.Types_s.quad32 plain128
    plain_byte_seq) plain128) (va_qAssert va_range1
    "***** PRECONDITION NOT MET AT line 480 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (FStar.Seq.Base.length #quad32 cipher_byte_seq == 0 ==> FStar.Seq.Base.equal
    #Vale.Def.Types_s.quad32 (FStar.Seq.Base.append #Vale.Def.Types_s.quad32 cipher128
    cipher_byte_seq) cipher128) (let (va_arg103:Vale.Def.Types_s.quad32) =
    Vale.AES.GCTR_BE.inc32lite ctr_BE_2 len128 in let (va_arg102:Vale.Def.Types_s.quad32) =
    ctr_BE_2 in let (va_arg101:(FStar.Seq.Base.seq Vale.Def.Types_s.nat32)) = key in let
    (va_arg100:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = cipher_byte_seq in let
    (va_arg99:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = plain_byte_seq in let
    (va_arg98:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s)
    out128_b) in let (va_arg97:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_old_s) in128_b) in let (va_arg96:Prims.nat) = FStar.Seq.Base.length #quad32 plain_byte_seq
    in let (va_arg95:Prims.nat) = len128 in let (va_arg94:Vale.AES.AES_common_s.algorithm) = alg in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 482 column 30 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GCTR_BE.lemma_gctr_partial_append va_arg94 va_arg95 va_arg96 va_arg97
    va_arg98 va_arg99 va_arg100 va_arg101 va_arg102 va_arg103) (let
    (va_arg93:Vale.Def.Types_s.quad32) = length_quad32 in let (va_arg92:(FStar.Seq.Base.seq
    Vale.Def.Types_s.quad32)) = auth_in in let (va_arg91:Vale.Def.Types_s.quad32) = y_final in let
    (va_arg90:Vale.Def.Types_s.quad32) = y_inout in let (va_arg89:Vale.Def.Types_s.quad32) = y_0 in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 490 column 23 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GHash_BE.lemma_hash_append2 h_BE va_arg89 va_arg90 va_arg91 va_arg92
    va_arg93) (let auth_in = FStar.Seq.Base.append #quad32 auth_in (FStar.Seq.Base.create #quad32 1
    length_quad32) in let (va_arg88:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = auth_in in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 492 column 31 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GHash_BE.ghash_incremental_to_ghash h_BE va_arg88) (va_QEmpty
    (())))))))))))))))))))))))))))))))))))))))


val va_lemma_Gcm_blocks : va_b0:va_code -> va_s0:va_state -> alg:algorithm -> auth_b:buffer128 ->
  abytes_b:buffer128 -> in128_b:buffer128 -> out128_b:buffer128 -> inout_b:buffer128 ->
  iv_b:buffer128 -> key:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 ->
  hkeys_b:buffer128 -> gcm_struct_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Gcm_blocks alg) va_s0 /\ va_get_ok va_s0 /\ (let
    (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0
    (va_get_mem_heaplet 3 va_s0) in let (in128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1 (va_get_mem_heaplet 3 va_s0) in let
    (out128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2
    (va_get_mem_heaplet 3 va_s0) in let (len128:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3 (va_get_mem_heaplet 3 va_s0) in let
    (inout_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4
    (va_get_mem_heaplet 3 va_s0) in let (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 5 (va_get_mem_heaplet 3 va_s0) in let
    (auth_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6
    (va_get_mem_heaplet 3 va_s0) in let (auth_len:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7 (va_get_mem_heaplet 3 va_s0) in let
    (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8
    (va_get_mem_heaplet 3 va_s0) in let (iv_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9 (va_get_mem_heaplet 3 va_s0) in let
    (keys_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10
    (va_get_mem_heaplet 3 va_s0) in let (h_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11 (va_get_mem_heaplet 3 va_s0) in let
    (h_BE:Vale.Def.Types_s.quad32) = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2 (va_get_mem_heaplet 0 va_s0)) in
    Vale.PPC64LE.Decls.validSrcAddrs64 (va_get_mem_heaplet 3 va_s0) (va_get_reg 25 va_s0)
    gcm_struct_b 12 (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validSrcAddrs128
    (va_get_mem_heaplet 1 va_s0) auth_ptr auth_b auth_len (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 6 va_s0) abytes_ptr abytes_b 1
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 2
    va_s0) iv_ptr iv_b 1 (va_get_mem_layout va_s0) Public /\ Vale.PPC64LE.Decls.validSrcAddrs128
    (va_get_mem_heaplet 1 va_s0) in128_ptr in128_b len128 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) out128_ptr out128_b len128
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 5
    va_s0) inout_ptr inout_b 1 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) h_ptr hkeys_b 3
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.buffer_disjoints128 iv_b ([keys_b;
    hkeys_b; in128_b; out128_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 out128_b
    ([keys_b; hkeys_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 inout_b ([keys_b;
    hkeys_b; out128_b]) /\ (Vale.PPC64LE.Decls.buffers_disjoint128 in128_b out128_b \/ in128_b ==
    out128_b) /\ auth_ptr + 16 `op_Multiply` auth_len < pow2_64 /\ in128_ptr + 16 `op_Multiply`
    len128 < pow2_64 /\ out128_ptr + 16 `op_Multiply` len128 < pow2_64 /\ inout_ptr + 16 < pow2_64
    /\ Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 auth_b == auth_len /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 abytes_b == 1 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b ==
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 out128_b /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b == len128 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 inout_b == 1 /\ plain_num_bytes
    < pow2_32 /\ auth_num_bytes < pow2_32 /\ Vale.PPC64LE.Memory.buffer_addr
    #Vale.PPC64LE.Memory.vuint128 keys_b (va_get_mem_heaplet 0 va_s0) + 128 < pow2_64 /\
    (va_mul_nat len128 (128 `op_Division` 8) <= plain_num_bytes /\ plain_num_bytes < va_mul_nat
    len128 (128 `op_Division` 8) + 128 `op_Division` 8) /\ (va_mul_nat auth_len (128 `op_Division`
    8) <= auth_num_bytes /\ auth_num_bytes < va_mul_nat auth_len (128 `op_Division` 8) + 128
    `op_Division` 8) /\ aes_reqs alg key round_keys keys_b keys_ptr (va_get_mem_heaplet 0 va_s0)
    (va_get_mem_layout va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0)
    hkeys_b)) (Vale.AES.AES_BE_s.aes_encrypt_word alg key (Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 0)))))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    0 (va_get_mem_heaplet 3 va_s0) in let (in128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1 (va_get_mem_heaplet 3 va_s0) in let
    (out128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2
    (va_get_mem_heaplet 3 va_s0) in let (len128:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3 (va_get_mem_heaplet 3 va_s0) in let
    (inout_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4
    (va_get_mem_heaplet 3 va_s0) in let (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 5 (va_get_mem_heaplet 3 va_s0) in let
    (auth_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6
    (va_get_mem_heaplet 3 va_s0) in let (auth_len:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7 (va_get_mem_heaplet 3 va_s0) in let
    (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8
    (va_get_mem_heaplet 3 va_s0) in let (iv_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9 (va_get_mem_heaplet 3 va_s0) in let
    (keys_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10
    (va_get_mem_heaplet 3 va_s0) in let (h_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11 (va_get_mem_heaplet 3 va_s0) in let
    (h_BE:Vale.Def.Types_s.quad32) = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2 (va_get_mem_heaplet 0 va_s0)) in
    Vale.PPC64LE.Decls.modifies_buffer128 out128_b (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet
    1 va_sM) /\ Vale.PPC64LE.Decls.modifies_buffer128 iv_b (va_get_mem_heaplet 2 va_s0)
    (va_get_mem_heaplet 2 va_sM) /\ Vale.PPC64LE.Decls.modifies_buffer128 inout_b
    (va_get_mem_heaplet 5 va_s0) (va_get_mem_heaplet 5 va_sM) /\ plain_num_bytes < pow2_32 /\
    auth_num_bytes < pow2_32 /\ (let iv_BE = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read iv_b 0 (va_get_mem_heaplet 2 va_s0)) in let
    (ctr_BE_1:quad32) = iv_BE in let (ctr_BE_2:quad32) = Vale.AES.GCTR_BE_s.inc32 iv_BE 1 in let
    plain1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_s0) inout_b)) in let plain2 = Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in128_b) in let (plain_in:(seq quad32)) =
    (if (plain_num_bytes > len128 `op_Multiply` 128 `op_Division` 8) then plain1 else plain2) in
    let cipher1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) in let cipher2 =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b) in let (cipher_out:(seq quad32)) = (if (plain_num_bytes > len128 `op_Multiply` 128
    `op_Division` 8) then cipher1 else cipher2) in let (cipher_bound:nat) = (if (plain_num_bytes >
    len128 `op_Multiply` 128 `op_Division` 8) then (len128 + 1) else len128) in
    Vale.AES.GCTR_BE.gctr_partial alg cipher_bound plain_in cipher_out key ctr_BE_2 /\ (let
    (length_quad:quad32) = Vale.Def.Words.Four_s.two_two_to_four #Vale.Def.Types_s.nat32
    (Vale.Def.Words_s.Mktwo #(Vale.Def.Words_s.two Vale.Def.Types_s.nat32) (Vale.Def.Words_s.Mktwo
    #Vale.Def.Types_s.nat32 (8 `op_Multiply` auth_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply`
    auth_num_bytes `op_Division` pow2_32 `op_Modulus` pow2_32)) (Vale.Def.Words_s.Mktwo
    #Vale.Def.Types_s.nat32 (8 `op_Multiply` plain_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply`
    plain_num_bytes `op_Division` pow2_32 `op_Modulus` pow2_32))) in let raw_auth1 =
    FStar.Seq.Base.append #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) auth_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 6 va_s0)
    abytes_b)) in let raw_auth2 = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) auth_b) in let (raw_auth_quads:(seq quad32)) = (if (auth_num_bytes
    > auth_len `op_Multiply` 128 `op_Division` 8) then raw_auth1 else raw_auth2) in let
    (auth_input_bytes:(seq nat8)) = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 raw_auth_quads)) 0 auth_num_bytes in let (padded_auth_bytes:(seq nat8))
    = Vale.AES.GCTR_BE_s.pad_to_128_bits auth_input_bytes in let (auth_quad_seq:(seq quad32)) =
    Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_auth_bytes in let (raw_quad_seq:(seq quad32)) =
    FStar.Seq.Base.append #quad32 auth_quad_seq (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in128_b)) in let (total_bytes:nat) =
    FStar.Seq.Base.length #quad32 auth_quad_seq `op_Multiply` 16 + plain_num_bytes in let raw_quad1
    = let (ab:(seq nat8)) = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 (FStar.Seq.Base.append #quad32 raw_quad_seq
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0)
    inout_b))))) 0 total_bytes in let (pb:(seq nat8)) = Vale.AES.GCTR_BE_s.pad_to_128_bits ab in
    Vale.Def.Types_s.be_bytes_to_seq_quad32 pb in let raw_quad2 = raw_quad_seq in let
    (raw_quad_seq:(seq quad32)) = (if (plain_num_bytes > len128 `op_Multiply` 128 `op_Division` 8)
    then raw_quad1 else raw_quad2) in let (auth_quad_seq:(seq quad32)) = FStar.Seq.Base.append
    #quad32 raw_quad_seq (FStar.Seq.Base.create #quad32 1 length_quad) in va_get_vec 1 va_sM ==
    Vale.AES.GCTR_BE_s.gctr_encrypt_block ctr_BE_1 (Vale.AES.GHash_BE_s.ghash_BE h_BE
    auth_quad_seq) alg key 0))) /\ va_state_eq va_sM (va_update_mem_heaplet 5 va_sM
    (va_update_mem_heaplet 2 va_sM (va_update_mem_heaplet 1 va_sM (va_update_cr0 va_sM
    (va_update_vec 21 va_sM (va_update_vec 20 va_sM (va_update_vec 19 va_sM (va_update_vec 18 va_sM
    (va_update_vec 17 va_sM (va_update_vec 16 va_sM (va_update_vec 15 va_sM (va_update_vec 14 va_sM
    (va_update_vec 13 va_sM (va_update_vec 12 va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM
    (va_update_vec 9 va_sM (va_update_vec 8 va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM
    (va_update_vec 5 va_sM (va_update_vec 4 va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM
    (va_update_vec 1 va_sM (va_update_vec 0 va_sM (va_update_reg 31 va_sM (va_update_reg 30 va_sM
    (va_update_reg 29 va_sM (va_update_reg 28 va_sM (va_update_reg 27 va_sM (va_update_reg 26 va_sM
    (va_update_reg 10 va_sM (va_update_reg 9 va_sM (va_update_reg 8 va_sM (va_update_reg 7 va_sM
    (va_update_reg 6 va_sM (va_update_reg 5 va_sM (va_update_reg 4 va_sM (va_update_reg 3 va_sM
    (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Gcm_blocks va_b0 va_s0 alg auth_b abytes_b in128_b out128_b inout_b iv_b key
  round_keys keys_b hkeys_b gcm_struct_b =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1;
    va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3; va_Mod_ok;
    va_Mod_mem] in
  let va_qc = va_qcode_Gcm_blocks va_mods alg auth_b abytes_b in128_b out128_b inout_b iv_b key
    round_keys keys_b hkeys_b gcm_struct_b in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Gcm_blocks alg) va_qc va_s0 (fun va_s0
    va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 250 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_ok va_sM) /\ (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0 (va_get_mem_heaplet 3 va_s0) in let
    (in128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1
    (va_get_mem_heaplet 3 va_s0) in let (out128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2 (va_get_mem_heaplet 3 va_s0) in let
    (len128:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3
    (va_get_mem_heaplet 3 va_s0) in let (inout_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4 (va_get_mem_heaplet 3 va_s0) in let
    (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    5 (va_get_mem_heaplet 3 va_s0) in let (auth_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6 (va_get_mem_heaplet 3 va_s0) in let
    (auth_len:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7
    (va_get_mem_heaplet 3 va_s0) in let (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8 (va_get_mem_heaplet 3 va_s0) in let
    (iv_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9
    (va_get_mem_heaplet 3 va_s0) in let (keys_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10 (va_get_mem_heaplet 3 va_s0) in let
    (h_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11
    (va_get_mem_heaplet 3 va_s0) in let (h_BE:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2
    (va_get_mem_heaplet 0 va_s0)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 336 column 56 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 out128_b (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 337 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 iv_b (va_get_mem_heaplet 2 va_s0) (va_get_mem_heaplet 2
    va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 338 column 55 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 inout_b (va_get_mem_heaplet 5 va_s0) (va_get_mem_heaplet
    5 va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 341 column 39 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (plain_num_bytes < pow2_32) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 342 column 38 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (auth_num_bytes < pow2_32) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 344 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let iv_BE = Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read iv_b 0
    (va_get_mem_heaplet 2 va_s0)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 346 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (ctr_BE_1:quad32) = iv_BE in label va_range1
    "***** POSTCONDITION NOT MET AT line 347 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (ctr_BE_2:quad32) = Vale.AES.GCTR_BE_s.inc32 iv_BE 1 in label va_range1
    "***** POSTCONDITION NOT MET AT line 350 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let plain1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_s0) inout_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 351 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let plain2 = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) in128_b) in label va_range1
    "***** POSTCONDITION NOT MET AT line 352 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (plain_in:(seq quad32)) = va_if (plain_num_bytes > len128 `op_Multiply` 128 `op_Division`
    8) (fun _ -> plain1) (fun _ -> plain2) in label va_range1
    "***** POSTCONDITION NOT MET AT line 355 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let cipher1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 357 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let cipher2 = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_sM) out128_b) in label va_range1
    "***** POSTCONDITION NOT MET AT line 358 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (cipher_out:(seq quad32)) = va_if (plain_num_bytes > len128 `op_Multiply` 128
    `op_Division` 8) (fun _ -> cipher1) (fun _ -> cipher2) in label va_range1
    "***** POSTCONDITION NOT MET AT line 361 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (cipher_bound:nat) = va_if (plain_num_bytes > len128 `op_Multiply` 128 `op_Division` 8)
    (fun _ -> len128 + 1) (fun _ -> len128) in label va_range1
    "***** POSTCONDITION NOT MET AT line 365 column 77 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.AES.GCTR_BE.gctr_partial alg cipher_bound plain_in cipher_out key ctr_BE_2) /\ label
    va_range1
    "***** POSTCONDITION NOT MET AT line 369 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (length_quad:quad32) = Vale.Def.Words.Four_s.two_two_to_four #Vale.Def.Types_s.nat32
    (Vale.Def.Words_s.Mktwo #(Vale.Def.Words_s.two Vale.Def.Types_s.nat32) (Vale.Def.Words_s.Mktwo
    #Vale.Def.Types_s.nat32 (8 `op_Multiply` auth_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply`
    auth_num_bytes `op_Division` pow2_32 `op_Modulus` pow2_32)) (Vale.Def.Words_s.Mktwo
    #Vale.Def.Types_s.nat32 (8 `op_Multiply` plain_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply`
    plain_num_bytes `op_Division` pow2_32 `op_Modulus` pow2_32))) in label va_range1
    "***** POSTCONDITION NOT MET AT line 373 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let raw_auth1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    auth_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet
    6 va_s0) abytes_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 374 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let raw_auth2 = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) auth_b) in label va_range1
    "***** POSTCONDITION NOT MET AT line 375 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (raw_auth_quads:(seq quad32)) = va_if (auth_num_bytes > auth_len `op_Multiply` 128
    `op_Division` 8) (fun _ -> raw_auth1) (fun _ -> raw_auth2) in label va_range1
    "***** POSTCONDITION NOT MET AT line 379 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (auth_input_bytes:(seq nat8)) = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 raw_auth_quads)) 0 auth_num_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 380 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (padded_auth_bytes:(seq nat8)) = Vale.AES.GCTR_BE_s.pad_to_128_bits auth_input_bytes in
    label va_range1
    "***** POSTCONDITION NOT MET AT line 381 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (auth_quad_seq:(seq quad32)) = Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_auth_bytes
    in label va_range1
    "***** POSTCONDITION NOT MET AT line 382 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (raw_quad_seq:(seq quad32)) = FStar.Seq.Base.append #quad32 auth_quad_seq
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in128_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 383 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (total_bytes:nat) = FStar.Seq.Base.length #quad32 auth_quad_seq `op_Multiply` 16 +
    plain_num_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 384 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let raw_quad1 = let (ab:(seq nat8)) = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 (FStar.Seq.Base.append #quad32 raw_quad_seq
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0)
    inout_b))))) 0 total_bytes in let (pb:(seq nat8)) = Vale.AES.GCTR_BE_s.pad_to_128_bits ab in
    Vale.Def.Types_s.be_bytes_to_seq_quad32 pb in label va_range1
    "***** POSTCONDITION NOT MET AT line 387 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let raw_quad2 = raw_quad_seq in label va_range1
    "***** POSTCONDITION NOT MET AT line 388 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (raw_quad_seq:(seq quad32)) = va_if (plain_num_bytes > len128 `op_Multiply` 128
    `op_Division` 8) (fun _ -> raw_quad1) (fun _ -> raw_quad2) in label va_range1
    "***** POSTCONDITION NOT MET AT line 393 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let (auth_quad_seq:(seq quad32)) = FStar.Seq.Base.append #quad32 raw_quad_seq
    (FStar.Seq.Base.create #quad32 1 length_quad) in label va_range1
    "***** POSTCONDITION NOT MET AT line 394 column 106 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_vec 1 va_sM == Vale.AES.GCTR_BE_s.gctr_encrypt_block ctr_BE_1
    (Vale.AES.GHash_BE_s.ghash_BE h_BE auth_quad_seq) alg key 0)))))))))))))))))))))))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1;
    va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3; va_Mod_ok;
    va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Gcm_blocks (alg:algorithm) (auth_b:buffer128) (abytes_b:buffer128) (in128_b:buffer128)
  (out128_b:buffer128) (inout_b:buffer128) (iv_b:buffer128) (key:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (gcm_struct_b:buffer64) (va_s0:va_state)
  (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0 (va_get_mem_heaplet 3 va_s0) in let
    (in128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1
    (va_get_mem_heaplet 3 va_s0) in let (out128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2 (va_get_mem_heaplet 3 va_s0) in let
    (len128:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3
    (va_get_mem_heaplet 3 va_s0) in let (inout_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4 (va_get_mem_heaplet 3 va_s0) in let
    (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    5 (va_get_mem_heaplet 3 va_s0) in let (auth_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6 (va_get_mem_heaplet 3 va_s0) in let
    (auth_len:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7
    (va_get_mem_heaplet 3 va_s0) in let (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8 (va_get_mem_heaplet 3 va_s0) in let
    (iv_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9
    (va_get_mem_heaplet 3 va_s0) in let (keys_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10 (va_get_mem_heaplet 3 va_s0) in let
    (h_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11
    (va_get_mem_heaplet 3 va_s0) in let (h_BE:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2
    (va_get_mem_heaplet 0 va_s0)) in Vale.PPC64LE.Decls.validSrcAddrs64 (va_get_mem_heaplet 3
    va_s0) (va_get_reg 25 va_s0) gcm_struct_b 12 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 1 va_s0) auth_ptr auth_b auth_len
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 6
    va_s0) abytes_ptr abytes_b 1 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 2 va_s0) iv_ptr iv_b 1
    (va_get_mem_layout va_s0) Public /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 1
    va_s0) in128_ptr in128_b len128 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) out128_ptr out128_b len128
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 5
    va_s0) inout_ptr inout_b 1 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) h_ptr hkeys_b 3
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.buffer_disjoints128 iv_b ([keys_b;
    hkeys_b; in128_b; out128_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 out128_b
    ([keys_b; hkeys_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 inout_b ([keys_b;
    hkeys_b; out128_b]) /\ (Vale.PPC64LE.Decls.buffers_disjoint128 in128_b out128_b \/ in128_b ==
    out128_b) /\ auth_ptr + 16 `op_Multiply` auth_len < pow2_64 /\ in128_ptr + 16 `op_Multiply`
    len128 < pow2_64 /\ out128_ptr + 16 `op_Multiply` len128 < pow2_64 /\ inout_ptr + 16 < pow2_64
    /\ Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 auth_b == auth_len /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 abytes_b == 1 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b ==
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 out128_b /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b == len128 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 inout_b == 1 /\ plain_num_bytes
    < pow2_32 /\ auth_num_bytes < pow2_32 /\ Vale.PPC64LE.Memory.buffer_addr
    #Vale.PPC64LE.Memory.vuint128 keys_b (va_get_mem_heaplet 0 va_s0) + 128 < pow2_64 /\
    (va_mul_nat len128 (128 `op_Division` 8) <= plain_num_bytes /\ plain_num_bytes < va_mul_nat
    len128 (128 `op_Division` 8) + 128 `op_Division` 8) /\ (va_mul_nat auth_len (128 `op_Division`
    8) <= auth_num_bytes /\ auth_num_bytes < va_mul_nat auth_len (128 `op_Division` 8) + 128
    `op_Division` 8) /\ aes_reqs alg key round_keys keys_b keys_ptr (va_get_mem_heaplet 0 va_s0)
    (va_get_mem_layout va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0)
    hkeys_b)) (Vale.AES.AES_BE_s.aes_encrypt_word alg key (Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 0))) /\ (forall (va_x_mem:vale_heap) (va_x_r3:nat64)
    (va_x_r4:nat64) (va_x_r5:nat64) (va_x_r6:nat64) (va_x_r7:nat64) (va_x_r8:nat64) (va_x_r9:nat64)
    (va_x_r10:nat64) (va_x_r26:nat64) (va_x_r27:nat64) (va_x_r28:nat64) (va_x_r29:nat64)
    (va_x_r30:nat64) (va_x_r31:nat64) (va_x_v0:quad32) (va_x_v1:quad32) (va_x_v2:quad32)
    (va_x_v3:quad32) (va_x_v4:quad32) (va_x_v5:quad32) (va_x_v6:quad32) (va_x_v7:quad32)
    (va_x_v8:quad32) (va_x_v9:quad32) (va_x_v10:quad32) (va_x_v11:quad32) (va_x_v12:quad32)
    (va_x_v13:quad32) (va_x_v14:quad32) (va_x_v15:quad32) (va_x_v16:quad32) (va_x_v17:quad32)
    (va_x_v18:quad32) (va_x_v19:quad32) (va_x_v20:quad32) (va_x_v21:quad32) (va_x_cr0:cr0_t)
    (va_x_heap1:vale_heap) (va_x_heap2:vale_heap) (va_x_heap5:vale_heap) . let va_sM =
    va_upd_mem_heaplet 5 va_x_heap5 (va_upd_mem_heaplet 2 va_x_heap2 (va_upd_mem_heaplet 1
    va_x_heap1 (va_upd_cr0 va_x_cr0 (va_upd_vec 21 va_x_v21 (va_upd_vec 20 va_x_v20 (va_upd_vec 19
    va_x_v19 (va_upd_vec 18 va_x_v18 (va_upd_vec 17 va_x_v17 (va_upd_vec 16 va_x_v16 (va_upd_vec 15
    va_x_v15 (va_upd_vec 14 va_x_v14 (va_upd_vec 13 va_x_v13 (va_upd_vec 12 va_x_v12 (va_upd_vec 11
    va_x_v11 (va_upd_vec 10 va_x_v10 (va_upd_vec 9 va_x_v9 (va_upd_vec 8 va_x_v8 (va_upd_vec 7
    va_x_v7 (va_upd_vec 6 va_x_v6 (va_upd_vec 5 va_x_v5 (va_upd_vec 4 va_x_v4 (va_upd_vec 3 va_x_v3
    (va_upd_vec 2 va_x_v2 (va_upd_vec 1 va_x_v1 (va_upd_vec 0 va_x_v0 (va_upd_reg 31 va_x_r31
    (va_upd_reg 30 va_x_r30 (va_upd_reg 29 va_x_r29 (va_upd_reg 28 va_x_r28 (va_upd_reg 27 va_x_r27
    (va_upd_reg 26 va_x_r26 (va_upd_reg 10 va_x_r10 (va_upd_reg 9 va_x_r9 (va_upd_reg 8 va_x_r8
    (va_upd_reg 7 va_x_r7 (va_upd_reg 6 va_x_r6 (va_upd_reg 5 va_x_r5 (va_upd_reg 4 va_x_r4
    (va_upd_reg 3 va_x_r3 (va_upd_mem va_x_mem va_s0)))))))))))))))))))))))))))))))))))))))) in
    va_get_ok va_sM /\ (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0 (va_get_mem_heaplet 3 va_s0) in let
    (in128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1
    (va_get_mem_heaplet 3 va_s0) in let (out128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2 (va_get_mem_heaplet 3 va_s0) in let
    (len128:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3
    (va_get_mem_heaplet 3 va_s0) in let (inout_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4 (va_get_mem_heaplet 3 va_s0) in let
    (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    5 (va_get_mem_heaplet 3 va_s0) in let (auth_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6 (va_get_mem_heaplet 3 va_s0) in let
    (auth_len:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7
    (va_get_mem_heaplet 3 va_s0) in let (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8 (va_get_mem_heaplet 3 va_s0) in let
    (iv_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9
    (va_get_mem_heaplet 3 va_s0) in let (keys_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10 (va_get_mem_heaplet 3 va_s0) in let
    (h_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11
    (va_get_mem_heaplet 3 va_s0) in let (h_BE:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2
    (va_get_mem_heaplet 0 va_s0)) in Vale.PPC64LE.Decls.modifies_buffer128 out128_b
    (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1 va_sM) /\
    Vale.PPC64LE.Decls.modifies_buffer128 iv_b (va_get_mem_heaplet 2 va_s0) (va_get_mem_heaplet 2
    va_sM) /\ Vale.PPC64LE.Decls.modifies_buffer128 inout_b (va_get_mem_heaplet 5 va_s0)
    (va_get_mem_heaplet 5 va_sM) /\ plain_num_bytes < pow2_32 /\ auth_num_bytes < pow2_32 /\ (let
    iv_BE = Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read iv_b 0
    (va_get_mem_heaplet 2 va_s0)) in let (ctr_BE_1:quad32) = iv_BE in let (ctr_BE_2:quad32) =
    Vale.AES.GCTR_BE_s.inc32 iv_BE 1 in let plain1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_s0) inout_b)) in let plain2 = Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in128_b) in let (plain_in:(seq quad32)) =
    va_if (plain_num_bytes > len128 `op_Multiply` 128 `op_Division` 8) (fun _ -> plain1) (fun _ ->
    plain2) in let cipher1 = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) in let cipher2 =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b) in let (cipher_out:(seq quad32)) = va_if (plain_num_bytes > len128 `op_Multiply` 128
    `op_Division` 8) (fun _ -> cipher1) (fun _ -> cipher2) in let (cipher_bound:nat) = va_if
    (plain_num_bytes > len128 `op_Multiply` 128 `op_Division` 8) (fun _ -> len128 + 1) (fun _ ->
    len128) in Vale.AES.GCTR_BE.gctr_partial alg cipher_bound plain_in cipher_out key ctr_BE_2 /\
    (let (length_quad:quad32) = Vale.Def.Words.Four_s.two_two_to_four #Vale.Def.Types_s.nat32
    (Vale.Def.Words_s.Mktwo #(Vale.Def.Words_s.two Vale.Def.Types_s.nat32) (Vale.Def.Words_s.Mktwo
    #Vale.Def.Types_s.nat32 (8 `op_Multiply` auth_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply`
    auth_num_bytes `op_Division` pow2_32 `op_Modulus` pow2_32)) (Vale.Def.Words_s.Mktwo
    #Vale.Def.Types_s.nat32 (8 `op_Multiply` plain_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply`
    plain_num_bytes `op_Division` pow2_32 `op_Modulus` pow2_32))) in let raw_auth1 =
    FStar.Seq.Base.append #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) auth_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 6 va_s0)
    abytes_b)) in let raw_auth2 = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) auth_b) in let (raw_auth_quads:(seq quad32)) = va_if
    (auth_num_bytes > auth_len `op_Multiply` 128 `op_Division` 8) (fun _ -> raw_auth1) (fun _ ->
    raw_auth2) in let (auth_input_bytes:(seq nat8)) = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 raw_auth_quads)) 0 auth_num_bytes in let (padded_auth_bytes:(seq nat8))
    = Vale.AES.GCTR_BE_s.pad_to_128_bits auth_input_bytes in let (auth_quad_seq:(seq quad32)) =
    Vale.Def.Types_s.be_bytes_to_seq_quad32 padded_auth_bytes in let (raw_quad_seq:(seq quad32)) =
    FStar.Seq.Base.append #quad32 auth_quad_seq (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in128_b)) in let (total_bytes:nat) =
    FStar.Seq.Base.length #quad32 auth_quad_seq `op_Multiply` 16 + plain_num_bytes in let raw_quad1
    = let (ab:(seq nat8)) = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 (FStar.Seq.Base.append #quad32 raw_quad_seq
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0)
    inout_b))))) 0 total_bytes in let (pb:(seq nat8)) = Vale.AES.GCTR_BE_s.pad_to_128_bits ab in
    Vale.Def.Types_s.be_bytes_to_seq_quad32 pb in let raw_quad2 = raw_quad_seq in let
    (raw_quad_seq:(seq quad32)) = va_if (plain_num_bytes > len128 `op_Multiply` 128 `op_Division`
    8) (fun _ -> raw_quad1) (fun _ -> raw_quad2) in let (auth_quad_seq:(seq quad32)) =
    FStar.Seq.Base.append #quad32 raw_quad_seq (FStar.Seq.Base.create #quad32 1 length_quad) in
    va_get_vec 1 va_sM == Vale.AES.GCTR_BE_s.gctr_encrypt_block ctr_BE_1
    (Vale.AES.GHash_BE_s.ghash_BE h_BE auth_quad_seq) alg key 0))) ==> va_k va_sM (())))


val va_wpProof_Gcm_blocks : alg:algorithm -> auth_b:buffer128 -> abytes_b:buffer128 ->
  in128_b:buffer128 -> out128_b:buffer128 -> inout_b:buffer128 -> iv_b:buffer128 -> key:(seq nat32)
  -> round_keys:(seq quad32) -> keys_b:buffer128 -> hkeys_b:buffer128 -> gcm_struct_b:buffer64 ->
  va_s0:va_state -> va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Gcm_blocks alg auth_b abytes_b in128_b out128_b inout_b
    iv_b key round_keys keys_b hkeys_b gcm_struct_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Gcm_blocks alg) ([va_Mod_mem_heaplet
    5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20;
    va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14;
    va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8;
    va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec
    1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27;
    va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6;
    va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[@"opaque_to_smt"]
let va_wpProof_Gcm_blocks alg auth_b abytes_b in128_b out128_b inout_b iv_b key round_keys keys_b
  hkeys_b gcm_struct_b va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Gcm_blocks (va_code_Gcm_blocks alg) va_s0 alg auth_b abytes_b
    in128_b out128_b inout_b iv_b key round_keys keys_b hkeys_b gcm_struct_b in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 5 va_sM (va_update_mem_heaplet 2 va_sM
    (va_update_mem_heaplet 1 va_sM (va_update_cr0 va_sM (va_update_vec 21 va_sM (va_update_vec 20
    va_sM (va_update_vec 19 va_sM (va_update_vec 18 va_sM (va_update_vec 17 va_sM (va_update_vec 16
    va_sM (va_update_vec 15 va_sM (va_update_vec 14 va_sM (va_update_vec 13 va_sM (va_update_vec 12
    va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM (va_update_vec 8
    va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM (va_update_vec 4
    va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0
    va_sM (va_update_reg 31 va_sM (va_update_reg 30 va_sM (va_update_reg 29 va_sM (va_update_reg 28
    va_sM (va_update_reg 27 va_sM (va_update_reg 26 va_sM (va_update_reg 10 va_sM (va_update_reg 9
    va_sM (va_update_reg 8 va_sM (va_update_reg 7 va_sM (va_update_reg 6 va_sM (va_update_reg 5
    va_sM (va_update_reg 4 va_sM (va_update_reg 3 va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0)))))))))))))))))))))))))))))))))))))))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1;
    va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3;
    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_Gcm_blocks (alg:algorithm) (auth_b:buffer128) (abytes_b:buffer128) (in128_b:buffer128)
  (out128_b:buffer128) (inout_b:buffer128) (iv_b:buffer128) (key:(seq nat32)) (round_keys:(seq
  quad32)) (keys_b:buffer128) (hkeys_b:buffer128) (gcm_struct_b:buffer64) : (va_quickCode unit
  (va_code_Gcm_blocks alg)) =
  (va_QProc (va_code_Gcm_blocks alg) ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2;
    va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18;
    va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12;
    va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6;
    va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg
    31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10;
    va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg
    3; va_Mod_mem]) (va_wp_Gcm_blocks alg auth_b abytes_b in128_b out128_b inout_b iv_b key
    round_keys keys_b hkeys_b gcm_struct_b) (va_wpProof_Gcm_blocks alg auth_b abytes_b in128_b
    out128_b inout_b iv_b key round_keys keys_b hkeys_b gcm_struct_b))
#pop-options
//--
//-- Gcm_blocks_wrapped
#push-options "--z3rlimit 120"

val va_code_Gcm_blocks_wrapped : alg:algorithm -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Gcm_blocks_wrapped alg =
  (va_Block (va_CCons (va_code_Gcm_blocks alg) (va_CCons (va_Block (va_CNil ())) (va_CNil ()))))

val va_codegen_success_Gcm_blocks_wrapped : alg:algorithm -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Gcm_blocks_wrapped alg =
  (va_pbool_and (va_codegen_success_Gcm_blocks alg) (va_ttrue ()))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Gcm_blocks_wrapped (va_mods:va_mods_t) (alg:algorithm) (auth_b:buffer128)
  (abytes_b:buffer128) (in128_b:buffer128) (out128_b:buffer128) (inout_b:buffer128)
  (iv_b:buffer128) (iv:supported_iv_BE) (key:(seq nat32)) (round_keys:(seq quad32))
  (keys_b:buffer128) (hkeys_b:buffer128) (expected_tag:(seq nat8)) (gcm_struct_b:buffer64) :
  (va_quickCode unit (va_code_Gcm_blocks_wrapped alg)) =
  (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let
    (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0
    (va_get_mem_heaplet 3 va_s) in let (in128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1 (va_get_mem_heaplet 3 va_s) in let
    (out128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2
    (va_get_mem_heaplet 3 va_s) in let (len128:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3 (va_get_mem_heaplet 3 va_s) in let
    (inout_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4
    (va_get_mem_heaplet 3 va_s) in let (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 5 (va_get_mem_heaplet 3 va_s) in let
    (auth_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6
    (va_get_mem_heaplet 3 va_s) in let (auth_len:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7 (va_get_mem_heaplet 3 va_s) in let
    (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8
    (va_get_mem_heaplet 3 va_s) in let (iv_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9 (va_get_mem_heaplet 3 va_s) in let
    (keys_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10
    (va_get_mem_heaplet 3 va_s) in let (h_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11 (va_get_mem_heaplet 3 va_s) in va_QBind
    va_range1
    "***** PRECONDITION NOT MET AT line 616 column 15 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Gcm_blocks alg auth_b abytes_b in128_b out128_b inout_b iv_b key round_keys keys_b
    hkeys_b gcm_struct_b) (fun (va_s:va_state) _ -> let (va_arg46:Vale.Def.Types_s.quad32) =
    Vale.Def.Words.Four_s.two_two_to_four #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.Mktwo
    #(Vale.Def.Words_s.two Vale.Def.Types_s.nat32) (Vale.Def.Words_s.Mktwo #Vale.Def.Types_s.nat32
    (8 `op_Multiply` auth_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply` auth_num_bytes
    `op_Division` pow2_32 `op_Modulus` pow2_32)) (Vale.Def.Words_s.Mktwo #Vale.Def.Types_s.nat32 (8
    `op_Multiply` plain_num_bytes `op_Modulus` pow2_32) (8 `op_Multiply` plain_num_bytes
    `op_Division` pow2_32 `op_Modulus` pow2_32))) in let (va_arg45:Vale.Def.Types_s.quad32) =
    va_get_vec 1 va_s in let (va_arg44:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read hkeys_b 2
    (va_get_mem_heaplet 0 va_s)) in let (va_arg43:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read iv_b 0
    (va_get_mem_heaplet 2 va_old_s)) in let (va_arg42:Vale.AES.GCM_BE_s.supported_iv_BE) = iv in
    let (va_arg41:Prims.nat) = auth_num_bytes in let (va_arg40:Prims.nat) = plain_num_bytes in let
    (va_arg39:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s)
    inout_b) in let (va_arg38:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s)
    out128_b) in let (va_arg37:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5
    va_old_s) inout_b) in let (va_arg36:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_old_s) in128_b) in let (va_arg35:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 6
    va_old_s) abytes_b) in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1
    va_old_s) auth_b) in let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Words_s.nat32)) = key in let
    (va_arg32:Vale.AES.AES_common_s.algorithm) = alg in va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 618 column 37 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GCM_BE.gcm_blocks_dec_helper_simplified va_arg32 va_arg33 va_arg34
    va_arg35 va_arg36 va_arg37 va_arg38 va_arg39 va_arg40 va_arg41 va_arg42 va_arg43 va_arg44
    va_arg45 va_arg46) (let (auth_raw_quads:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) =
    FStar.Seq.Base.append #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_old_s) auth_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 6
    va_old_s) abytes_b)) in va_qAssertSquash va_range1
    "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 630 column 5 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let
    (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584
    j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583))))
    Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 auth_raw_quads)) 0
    auth_num_bytes) (fun _ -> let (auth_bytes:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) =
    FStar.Seq.Base.slice #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 auth_raw_quads)) 0
    auth_num_bytes in let (va_arg31:Vale.Def.Types_s.quad32) =
    Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read iv_b 0
    (va_get_mem_heaplet 2 va_old_s)) in let (va_arg30:Vale.AES.GCM_BE_s.supported_iv_BE) = iv in
    let (va_arg29:Prims.nat) = plain_num_bytes in let (va_arg28:(FStar.Seq.Base.seq
    Vale.Def.Words_s.nat8)) = expected_tag in let (va_arg27:(FStar.Seq.Base.seq
    Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_s) inout_b) in let (va_arg26:(FStar.Seq.Base.seq
    Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s) out128_b) in let (va_arg25:(FStar.Seq.Base.seq
    Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_old_s) inout_b) in let (va_arg24:(FStar.Seq.Base.seq
    Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_old_s) in128_b) in let (va_arg23:(FStar.Seq.Base.seq
    Vale.Def.Words_s.nat32)) = key in let (va_arg22:Vale.AES.AES_common_s.algorithm) = alg in
    va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 631 column 37 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.GCM_BE.gcm_blocks_helper_dec_simplified va_arg22 va_arg23 va_arg24
    va_arg25 va_arg26 va_arg27 auth_bytes va_arg28 va_arg29 va_arg30 va_arg31) (va_QEmpty (())))))))


val va_lemma_Gcm_blocks_wrapped : va_b0:va_code -> va_s0:va_state -> alg:algorithm ->
  auth_b:buffer128 -> abytes_b:buffer128 -> in128_b:buffer128 -> out128_b:buffer128 ->
  inout_b:buffer128 -> iv_b:buffer128 -> iv:supported_iv_BE -> key:(seq nat32) -> round_keys:(seq
  quad32) -> keys_b:buffer128 -> hkeys_b:buffer128 -> expected_tag:(seq nat8) ->
  gcm_struct_b:buffer64
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Gcm_blocks_wrapped alg) va_s0 /\ va_get_ok va_s0 /\
    (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    0 (va_get_mem_heaplet 3 va_s0) in let (in128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1 (va_get_mem_heaplet 3 va_s0) in let
    (out128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2
    (va_get_mem_heaplet 3 va_s0) in let (len128:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3 (va_get_mem_heaplet 3 va_s0) in let
    (inout_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4
    (va_get_mem_heaplet 3 va_s0) in let (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 5 (va_get_mem_heaplet 3 va_s0) in let
    (auth_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6
    (va_get_mem_heaplet 3 va_s0) in let (auth_len:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7 (va_get_mem_heaplet 3 va_s0) in let
    (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8
    (va_get_mem_heaplet 3 va_s0) in let (iv_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9 (va_get_mem_heaplet 3 va_s0) in let
    (keys_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10
    (va_get_mem_heaplet 3 va_s0) in let (h_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11 (va_get_mem_heaplet 3 va_s0) in
    Vale.PPC64LE.Decls.validSrcAddrs64 (va_get_mem_heaplet 3 va_s0) (va_get_reg 25 va_s0)
    gcm_struct_b 12 (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validSrcAddrs128
    (va_get_mem_heaplet 1 va_s0) auth_ptr auth_b auth_len (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 6 va_s0) abytes_ptr abytes_b 1
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 2
    va_s0) iv_ptr iv_b 1 (va_get_mem_layout va_s0) Public /\ Vale.PPC64LE.Decls.validSrcAddrs128
    (va_get_mem_heaplet 1 va_s0) in128_ptr in128_b len128 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) out128_ptr out128_b len128
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 5
    va_s0) inout_ptr inout_b 1 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) h_ptr hkeys_b 3
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.buffer_disjoints128 iv_b ([keys_b;
    hkeys_b; in128_b; out128_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 out128_b
    ([keys_b; hkeys_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 inout_b ([keys_b;
    hkeys_b; out128_b]) /\ (Vale.PPC64LE.Decls.buffers_disjoint128 in128_b out128_b \/ in128_b ==
    out128_b) /\ auth_ptr + 16 `op_Multiply` auth_len < pow2_64 /\ in128_ptr + 16 `op_Multiply`
    len128 < pow2_64 /\ out128_ptr + 16 `op_Multiply` len128 < pow2_64 /\ inout_ptr + 16 < pow2_64
    /\ Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 auth_b == auth_len /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 abytes_b == 1 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b ==
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 out128_b /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b == len128 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 inout_b == 1 /\ plain_num_bytes
    < pow2_32 /\ auth_num_bytes < pow2_32 /\ Vale.PPC64LE.Memory.buffer_addr
    #Vale.PPC64LE.Memory.vuint128 keys_b (va_get_mem_heaplet 0 va_s0) + 128 < pow2_64 /\
    (va_mul_nat len128 (128 `op_Division` 8) <= plain_num_bytes /\ plain_num_bytes < va_mul_nat
    len128 (128 `op_Division` 8) + 128 `op_Division` 8) /\ (va_mul_nat auth_len (128 `op_Division`
    8) <= auth_num_bytes /\ auth_num_bytes < va_mul_nat auth_len (128 `op_Division` 8) + 128
    `op_Division` 8) /\ aes_reqs alg key round_keys keys_b keys_ptr (va_get_mem_heaplet 0 va_s0)
    (va_get_mem_layout va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0)
    hkeys_b)) (Vale.AES.AES_BE_s.aes_encrypt_word alg key (Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 0)) /\ (let iv_BE = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read iv_b 0 (va_get_mem_heaplet 2 va_s0)) in let h_BE =
    Vale.AES.AES_BE_s.aes_encrypt_word alg key (Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0
    0 0) in iv_BE == Vale.AES.GCM_BE_s.compute_iv_BE h_BE iv))))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
    (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    0 (va_get_mem_heaplet 3 va_s0) in let (in128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1 (va_get_mem_heaplet 3 va_s0) in let
    (out128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2
    (va_get_mem_heaplet 3 va_s0) in let (len128:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3 (va_get_mem_heaplet 3 va_s0) in let
    (inout_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4
    (va_get_mem_heaplet 3 va_s0) in let (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 5 (va_get_mem_heaplet 3 va_s0) in let
    (auth_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6
    (va_get_mem_heaplet 3 va_s0) in let (auth_len:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7 (va_get_mem_heaplet 3 va_s0) in let
    (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8
    (va_get_mem_heaplet 3 va_s0) in let (iv_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9 (va_get_mem_heaplet 3 va_s0) in let
    (keys_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10
    (va_get_mem_heaplet 3 va_s0) in let (h_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11 (va_get_mem_heaplet 3 va_s0) in
    Vale.PPC64LE.Decls.modifies_buffer128 out128_b (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet
    1 va_sM) /\ Vale.PPC64LE.Decls.modifies_buffer128 iv_b (va_get_mem_heaplet 2 va_s0)
    (va_get_mem_heaplet 2 va_sM) /\ Vale.PPC64LE.Decls.modifies_buffer128 inout_b
    (va_get_mem_heaplet 5 va_s0) (va_get_mem_heaplet 5 va_sM) /\ plain_num_bytes < pow2_32 /\
    auth_num_bytes < pow2_32 /\ (let iv_BE = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read iv_b 0 (va_get_mem_heaplet 2 va_s0)) in let auth_raw_quads =
    FStar.Seq.Base.append #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) auth_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 6 va_s0)
    abytes_b)) in let auth_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 auth_raw_quads)) 0 auth_num_bytes in let plain_raw_quads =
    FStar.Seq.Base.append #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0) in128_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_s0)
    inout_b)) in let plain_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 plain_raw_quads)) 0 plain_num_bytes in let cipher_raw_quads =
    FStar.Seq.Base.append #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM) out128_b))
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 5 va_sM)
    inout_b)) in let cipher_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 cipher_raw_quads)) 0 plain_num_bytes in l_and (l_and (l_and
    (FStar.Seq.Base.length #Vale.Def.Words_s.nat8 auth_bytes < pow2_32) (FStar.Seq.Base.length
    #Vale.Def.Words_s.nat8 plain_bytes < pow2_32)) (cipher_bytes == __proj__Mktuple2__item___1
    #(FStar.Seq.Base.seq Vale.Def.Types_s.nat8) #bool (Vale.AES.GCM_BE_s.gcm_decrypt_BE alg
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE key) iv plain_bytes auth_bytes expected_tag)))
    (Vale.Arch.Types.be_quad32_to_bytes (va_get_vec 1 va_sM) == Vale.AES.GCM_BE.gcm_decrypt_BE_tag
    alg (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE key) iv plain_bytes auth_bytes))) /\
    va_state_eq va_sM (va_update_mem_heaplet 5 va_sM (va_update_mem_heaplet 2 va_sM
    (va_update_mem_heaplet 1 va_sM (va_update_cr0 va_sM (va_update_vec 21 va_sM (va_update_vec 20
    va_sM (va_update_vec 19 va_sM (va_update_vec 18 va_sM (va_update_vec 17 va_sM (va_update_vec 16
    va_sM (va_update_vec 15 va_sM (va_update_vec 14 va_sM (va_update_vec 13 va_sM (va_update_vec 12
    va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM (va_update_vec 8
    va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM (va_update_vec 4
    va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0
    va_sM (va_update_reg 31 va_sM (va_update_reg 30 va_sM (va_update_reg 29 va_sM (va_update_reg 28
    va_sM (va_update_reg 27 va_sM (va_update_reg 26 va_sM (va_update_reg 10 va_sM (va_update_reg 9
    va_sM (va_update_reg 8 va_sM (va_update_reg 7 va_sM (va_update_reg 6 va_sM (va_update_reg 5
    va_sM (va_update_reg 4 va_sM (va_update_reg 3 va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0))))))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Gcm_blocks_wrapped va_b0 va_s0 alg auth_b abytes_b in128_b out128_b inout_b iv_b iv
  key round_keys keys_b hkeys_b expected_tag gcm_struct_b =
  let (va_mods:va_mods_t) = [va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1;
    va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3; va_Mod_ok;
    va_Mod_mem] in
  let va_qc = va_qcode_Gcm_blocks_wrapped va_mods alg auth_b abytes_b in128_b out128_b inout_b iv_b
    iv key round_keys keys_b hkeys_b expected_tag gcm_struct_b in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Gcm_blocks_wrapped alg) va_qc va_s0
    (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 495 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_ok va_sM) /\ (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0 (va_get_mem_heaplet 3 va_s0) in let
    (in128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1
    (va_get_mem_heaplet 3 va_s0) in let (out128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2 (va_get_mem_heaplet 3 va_s0) in let
    (len128:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3
    (va_get_mem_heaplet 3 va_s0) in let (inout_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4 (va_get_mem_heaplet 3 va_s0) in let
    (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    5 (va_get_mem_heaplet 3 va_s0) in let (auth_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6 (va_get_mem_heaplet 3 va_s0) in let
    (auth_len:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7
    (va_get_mem_heaplet 3 va_s0) in let (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8 (va_get_mem_heaplet 3 va_s0) in let
    (iv_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9
    (va_get_mem_heaplet 3 va_s0) in let (keys_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10 (va_get_mem_heaplet 3 va_s0) in let
    (h_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11
    (va_get_mem_heaplet 3 va_s0) in label va_range1
    "***** POSTCONDITION NOT MET AT line 590 column 56 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 out128_b (va_get_mem_heaplet 1 va_s0)
    (va_get_mem_heaplet 1 va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 591 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 iv_b (va_get_mem_heaplet 2 va_s0) (va_get_mem_heaplet 2
    va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 592 column 55 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (Vale.PPC64LE.Decls.modifies_buffer128 inout_b (va_get_mem_heaplet 5 va_s0) (va_get_mem_heaplet
    5 va_sM)) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 595 column 39 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (plain_num_bytes < pow2_32) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 596 column 38 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (auth_num_bytes < pow2_32) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 598 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let iv_BE = Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read iv_b 0
    (va_get_mem_heaplet 2 va_s0)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 600 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let auth_raw_quads = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    auth_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet
    6 va_s0) abytes_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 601 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let auth_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 auth_raw_quads)) 0 auth_num_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 602 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let plain_raw_quads = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_s0) inout_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 603 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let plain_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 plain_raw_quads)) 0 plain_num_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 604 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let cipher_raw_quads = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) in label va_range1
    "***** POSTCONDITION NOT MET AT line 605 column 9 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (let cipher_bytes = FStar.Seq.Base.slice #Vale.Def.Words_s.nat8
    (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE (Vale.Def.Words.Seq_s.seq_four_to_seq_BE
    #Vale.Def.Words_s.nat32 cipher_raw_quads)) 0 plain_num_bytes in label va_range1
    "***** POSTCONDITION NOT MET AT line 614 column 52 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (l_and (l_and (l_and (FStar.Seq.Base.length #Vale.Def.Words_s.nat8 auth_bytes < pow2_32)
    (FStar.Seq.Base.length #Vale.Def.Words_s.nat8 plain_bytes < pow2_32)) (cipher_bytes ==
    __proj__Mktuple2__item___1 #(FStar.Seq.Base.seq Vale.Def.Types_s.nat8) #bool
    (Vale.AES.GCM_BE_s.gcm_decrypt_BE alg (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE key) iv
    plain_bytes auth_bytes expected_tag))) (Vale.Arch.Types.be_quad32_to_bytes (va_get_vec 1 va_sM)
    == Vale.AES.GCM_BE.gcm_decrypt_BE_tag alg (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE key)
    iv plain_bytes auth_bytes))))))))))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1;
    va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3; va_Mod_ok;
    va_Mod_mem]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
let va_wp_Gcm_blocks_wrapped (alg:algorithm) (auth_b:buffer128) (abytes_b:buffer128)
  (in128_b:buffer128) (out128_b:buffer128) (inout_b:buffer128) (iv_b:buffer128)
  (iv:supported_iv_BE) (key:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128)
  (hkeys_b:buffer128) (expected_tag:(seq nat8)) (gcm_struct_b:buffer64) (va_s0:va_state)
  (va_k:(va_state -> unit -> Type0)) : Type0 =
  (va_get_ok va_s0 /\ (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0 (va_get_mem_heaplet 3 va_s0) in let
    (in128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1
    (va_get_mem_heaplet 3 va_s0) in let (out128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2 (va_get_mem_heaplet 3 va_s0) in let
    (len128:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3
    (va_get_mem_heaplet 3 va_s0) in let (inout_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4 (va_get_mem_heaplet 3 va_s0) in let
    (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    5 (va_get_mem_heaplet 3 va_s0) in let (auth_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6 (va_get_mem_heaplet 3 va_s0) in let
    (auth_len:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7
    (va_get_mem_heaplet 3 va_s0) in let (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8 (va_get_mem_heaplet 3 va_s0) in let
    (iv_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9
    (va_get_mem_heaplet 3 va_s0) in let (keys_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10 (va_get_mem_heaplet 3 va_s0) in let
    (h_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11
    (va_get_mem_heaplet 3 va_s0) in Vale.PPC64LE.Decls.validSrcAddrs64 (va_get_mem_heaplet 3 va_s0)
    (va_get_reg 25 va_s0) gcm_struct_b 12 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 1 va_s0) auth_ptr auth_b auth_len
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 6
    va_s0) abytes_ptr abytes_b 1 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 2 va_s0) iv_ptr iv_b 1
    (va_get_mem_layout va_s0) Public /\ Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 1
    va_s0) in128_ptr in128_b len128 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 1 va_s0) out128_ptr out128_b len128
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.validDstAddrs128 (va_get_mem_heaplet 5
    va_s0) inout_ptr inout_b 1 (va_get_mem_layout va_s0) Secret /\
    Vale.PPC64LE.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) h_ptr hkeys_b 3
    (va_get_mem_layout va_s0) Secret /\ Vale.PPC64LE.Decls.buffer_disjoints128 iv_b ([keys_b;
    hkeys_b; in128_b; out128_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 out128_b
    ([keys_b; hkeys_b; inout_b]) /\ Vale.PPC64LE.Decls.buffer_disjoints128 inout_b ([keys_b;
    hkeys_b; out128_b]) /\ (Vale.PPC64LE.Decls.buffers_disjoint128 in128_b out128_b \/ in128_b ==
    out128_b) /\ auth_ptr + 16 `op_Multiply` auth_len < pow2_64 /\ in128_ptr + 16 `op_Multiply`
    len128 < pow2_64 /\ out128_ptr + 16 `op_Multiply` len128 < pow2_64 /\ inout_ptr + 16 < pow2_64
    /\ Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 auth_b == auth_len /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 abytes_b == 1 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b ==
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 out128_b /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 in128_b == len128 /\
    Vale.PPC64LE.Decls.buffer_length #Vale.PPC64LE.Memory.vuint128 inout_b == 1 /\ plain_num_bytes
    < pow2_32 /\ auth_num_bytes < pow2_32 /\ Vale.PPC64LE.Memory.buffer_addr
    #Vale.PPC64LE.Memory.vuint128 keys_b (va_get_mem_heaplet 0 va_s0) + 128 < pow2_64 /\
    (va_mul_nat len128 (128 `op_Division` 8) <= plain_num_bytes /\ plain_num_bytes < va_mul_nat
    len128 (128 `op_Division` 8) + 128 `op_Division` 8) /\ (va_mul_nat auth_len (128 `op_Division`
    8) <= auth_num_bytes /\ auth_num_bytes < va_mul_nat auth_len (128 `op_Division` 8) + 128
    `op_Division` 8) /\ aes_reqs alg key round_keys keys_b keys_ptr (va_get_mem_heaplet 0 va_s0)
    (va_get_mem_layout va_s0) /\ Vale.AES.GHash_BE.hkeys_reqs_priv
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 0 va_s0)
    hkeys_b)) (Vale.AES.AES_BE_s.aes_encrypt_word alg key (Vale.Def.Words_s.Mkfour
    #Vale.Def.Types_s.nat32 0 0 0 0)) /\ (let iv_BE = Vale.Def.Types_s.reverse_bytes_quad32
    (Vale.PPC64LE.Decls.buffer128_read iv_b 0 (va_get_mem_heaplet 2 va_s0)) in let h_BE =
    Vale.AES.AES_BE_s.aes_encrypt_word alg key (Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 0 0
    0 0) in iv_BE == Vale.AES.GCM_BE_s.compute_iv_BE h_BE iv)) /\ (forall (va_x_mem:vale_heap)
    (va_x_r3:nat64) (va_x_r4:nat64) (va_x_r5:nat64) (va_x_r6:nat64) (va_x_r7:nat64) (va_x_r8:nat64)
    (va_x_r9:nat64) (va_x_r10:nat64) (va_x_r26:nat64) (va_x_r27:nat64) (va_x_r28:nat64)
    (va_x_r29:nat64) (va_x_r30:nat64) (va_x_r31:nat64) (va_x_v0:quad32) (va_x_v1:quad32)
    (va_x_v2:quad32) (va_x_v3:quad32) (va_x_v4:quad32) (va_x_v5:quad32) (va_x_v6:quad32)
    (va_x_v7:quad32) (va_x_v8:quad32) (va_x_v9:quad32) (va_x_v10:quad32) (va_x_v11:quad32)
    (va_x_v12:quad32) (va_x_v13:quad32) (va_x_v14:quad32) (va_x_v15:quad32) (va_x_v16:quad32)
    (va_x_v17:quad32) (va_x_v18:quad32) (va_x_v19:quad32) (va_x_v20:quad32) (va_x_v21:quad32)
    (va_x_cr0:cr0_t) (va_x_heap1:vale_heap) (va_x_heap2:vale_heap) (va_x_heap5:vale_heap) . let
    va_sM = va_upd_mem_heaplet 5 va_x_heap5 (va_upd_mem_heaplet 2 va_x_heap2 (va_upd_mem_heaplet 1
    va_x_heap1 (va_upd_cr0 va_x_cr0 (va_upd_vec 21 va_x_v21 (va_upd_vec 20 va_x_v20 (va_upd_vec 19
    va_x_v19 (va_upd_vec 18 va_x_v18 (va_upd_vec 17 va_x_v17 (va_upd_vec 16 va_x_v16 (va_upd_vec 15
    va_x_v15 (va_upd_vec 14 va_x_v14 (va_upd_vec 13 va_x_v13 (va_upd_vec 12 va_x_v12 (va_upd_vec 11
    va_x_v11 (va_upd_vec 10 va_x_v10 (va_upd_vec 9 va_x_v9 (va_upd_vec 8 va_x_v8 (va_upd_vec 7
    va_x_v7 (va_upd_vec 6 va_x_v6 (va_upd_vec 5 va_x_v5 (va_upd_vec 4 va_x_v4 (va_upd_vec 3 va_x_v3
    (va_upd_vec 2 va_x_v2 (va_upd_vec 1 va_x_v1 (va_upd_vec 0 va_x_v0 (va_upd_reg 31 va_x_r31
    (va_upd_reg 30 va_x_r30 (va_upd_reg 29 va_x_r29 (va_upd_reg 28 va_x_r28 (va_upd_reg 27 va_x_r27
    (va_upd_reg 26 va_x_r26 (va_upd_reg 10 va_x_r10 (va_upd_reg 9 va_x_r9 (va_upd_reg 8 va_x_r8
    (va_upd_reg 7 va_x_r7 (va_upd_reg 6 va_x_r6 (va_upd_reg 5 va_x_r5 (va_upd_reg 4 va_x_r4
    (va_upd_reg 3 va_x_r3 (va_upd_mem va_x_mem va_s0)))))))))))))))))))))))))))))))))))))))) in
    va_get_ok va_sM /\ (let (abytes_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 0 (va_get_mem_heaplet 3 va_s0) in let
    (in128_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 1
    (va_get_mem_heaplet 3 va_s0) in let (out128_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 2 (va_get_mem_heaplet 3 va_s0) in let
    (len128:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 3
    (va_get_mem_heaplet 3 va_s0) in let (inout_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 4 (va_get_mem_heaplet 3 va_s0) in let
    (plain_num_bytes:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b
    5 (va_get_mem_heaplet 3 va_s0) in let (auth_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 6 (va_get_mem_heaplet 3 va_s0) in let
    (auth_len:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 7
    (va_get_mem_heaplet 3 va_s0) in let (auth_num_bytes:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 8 (va_get_mem_heaplet 3 va_s0) in let
    (iv_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 9
    (va_get_mem_heaplet 3 va_s0) in let (keys_ptr:Vale.PPC64LE.Machine_s.nat64) =
    Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 10 (va_get_mem_heaplet 3 va_s0) in let
    (h_ptr:Vale.PPC64LE.Machine_s.nat64) = Vale.PPC64LE.Decls.buffer64_read gcm_struct_b 11
    (va_get_mem_heaplet 3 va_s0) in Vale.PPC64LE.Decls.modifies_buffer128 out128_b
    (va_get_mem_heaplet 1 va_s0) (va_get_mem_heaplet 1 va_sM) /\
    Vale.PPC64LE.Decls.modifies_buffer128 iv_b (va_get_mem_heaplet 2 va_s0) (va_get_mem_heaplet 2
    va_sM) /\ Vale.PPC64LE.Decls.modifies_buffer128 inout_b (va_get_mem_heaplet 5 va_s0)
    (va_get_mem_heaplet 5 va_sM) /\ plain_num_bytes < pow2_32 /\ auth_num_bytes < pow2_32 /\ (let
    iv_BE = Vale.Def.Types_s.reverse_bytes_quad32 (Vale.PPC64LE.Decls.buffer128_read iv_b 0
    (va_get_mem_heaplet 2 va_s0)) in let auth_raw_quads = FStar.Seq.Base.append
    #Vale.Def.Types_s.quad32 (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 1 va_s0) auth_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq
    (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 6 va_s0) abytes_b)) in let auth_bytes =
    FStar.Seq.Base.slice #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 auth_raw_quads)) 0
    auth_num_bytes in let plain_raw_quads = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_s0)
    in128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_s0) inout_b)) in let plain_bytes = FStar.Seq.Base.slice
    #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 plain_raw_quads)) 0
    plain_num_bytes in let cipher_raw_quads = FStar.Seq.Base.append #Vale.Def.Types_s.quad32
    (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128 (va_get_mem_heaplet 1 va_sM)
    out128_b)) (Vale.Arch.Types.reverse_bytes_quad32_seq (Vale.PPC64LE.Decls.s128
    (va_get_mem_heaplet 5 va_sM) inout_b)) in let cipher_bytes = FStar.Seq.Base.slice
    #Vale.Def.Words_s.nat8 (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE
    (Vale.Def.Words.Seq_s.seq_four_to_seq_BE #Vale.Def.Words_s.nat32 cipher_raw_quads)) 0
    plain_num_bytes in l_and (l_and (l_and (FStar.Seq.Base.length #Vale.Def.Words_s.nat8 auth_bytes
    < pow2_32) (FStar.Seq.Base.length #Vale.Def.Words_s.nat8 plain_bytes < pow2_32)) (cipher_bytes
    == __proj__Mktuple2__item___1 #(FStar.Seq.Base.seq Vale.Def.Types_s.nat8) #bool
    (Vale.AES.GCM_BE_s.gcm_decrypt_BE alg (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE key) iv
    plain_bytes auth_bytes expected_tag))) (Vale.Arch.Types.be_quad32_to_bytes (va_get_vec 1 va_sM)
    == Vale.AES.GCM_BE.gcm_decrypt_BE_tag alg (Vale.Def.Words.Seq_s.seq_nat32_to_seq_nat8_BE key)
    iv plain_bytes auth_bytes))) ==> va_k va_sM (())))


val va_wpProof_Gcm_blocks_wrapped : alg:algorithm -> auth_b:buffer128 -> abytes_b:buffer128 ->
  in128_b:buffer128 -> out128_b:buffer128 -> inout_b:buffer128 -> iv_b:buffer128 ->
  iv:supported_iv_BE -> key:(seq nat32) -> round_keys:(seq quad32) -> keys_b:buffer128 ->
  hkeys_b:buffer128 -> expected_tag:(seq nat8) -> gcm_struct_b:buffer64 -> va_s0:va_state ->
  va_k:(va_state -> unit -> Type0)
  -> Ghost (va_state & va_fuel & unit)
  (requires (va_t_require va_s0 /\ va_wp_Gcm_blocks_wrapped alg auth_b abytes_b in128_b out128_b
    inout_b iv_b iv key round_keys keys_b hkeys_b expected_tag gcm_struct_b va_s0 va_k))
  (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Gcm_blocks_wrapped alg)
    ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 21;
    va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15;
    va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9;
    va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec
    2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28;
    va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 7;
    va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0,
    va_g))))
[@"opaque_to_smt"]
let va_wpProof_Gcm_blocks_wrapped alg auth_b abytes_b in128_b out128_b inout_b iv_b iv key
  round_keys keys_b hkeys_b expected_tag gcm_struct_b va_s0 va_k =
  let (va_sM, va_f0) = va_lemma_Gcm_blocks_wrapped (va_code_Gcm_blocks_wrapped alg) va_s0 alg
    auth_b abytes_b in128_b out128_b inout_b iv_b iv key round_keys keys_b hkeys_b expected_tag
    gcm_struct_b in
  va_lemma_upd_update va_sM;
  assert (va_state_eq va_sM (va_update_mem_heaplet 5 va_sM (va_update_mem_heaplet 2 va_sM
    (va_update_mem_heaplet 1 va_sM (va_update_cr0 va_sM (va_update_vec 21 va_sM (va_update_vec 20
    va_sM (va_update_vec 19 va_sM (va_update_vec 18 va_sM (va_update_vec 17 va_sM (va_update_vec 16
    va_sM (va_update_vec 15 va_sM (va_update_vec 14 va_sM (va_update_vec 13 va_sM (va_update_vec 12
    va_sM (va_update_vec 11 va_sM (va_update_vec 10 va_sM (va_update_vec 9 va_sM (va_update_vec 8
    va_sM (va_update_vec 7 va_sM (va_update_vec 6 va_sM (va_update_vec 5 va_sM (va_update_vec 4
    va_sM (va_update_vec 3 va_sM (va_update_vec 2 va_sM (va_update_vec 1 va_sM (va_update_vec 0
    va_sM (va_update_reg 31 va_sM (va_update_reg 30 va_sM (va_update_reg 29 va_sM (va_update_reg 28
    va_sM (va_update_reg 27 va_sM (va_update_reg 26 va_sM (va_update_reg 10 va_sM (va_update_reg 9
    va_sM (va_update_reg 8 va_sM (va_update_reg 7 va_sM (va_update_reg 6 va_sM (va_update_reg 5
    va_sM (va_update_reg 4 va_sM (va_update_reg 3 va_sM (va_update_ok va_sM (va_update_mem va_sM
    va_s0)))))))))))))))))))))))))))))))))))))))))));
  va_lemma_norm_mods ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2; va_Mod_mem_heaplet 1;
    va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18; va_Mod_vec 17;
    va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12; va_Mod_vec 11;
    va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6; va_Mod_vec 5; va_Mod_vec
    4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg 31; va_Mod_reg 30;
    va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10; va_Mod_reg 9;
    va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg 3;
    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_Gcm_blocks_wrapped (alg:algorithm) (auth_b:buffer128) (abytes_b:buffer128)
  (in128_b:buffer128) (out128_b:buffer128) (inout_b:buffer128) (iv_b:buffer128)
  (iv:supported_iv_BE) (key:(seq nat32)) (round_keys:(seq quad32)) (keys_b:buffer128)
  (hkeys_b:buffer128) (expected_tag:(seq nat8)) (gcm_struct_b:buffer64) : (va_quickCode unit
  (va_code_Gcm_blocks_wrapped alg)) =
  (va_QProc (va_code_Gcm_blocks_wrapped alg) ([va_Mod_mem_heaplet 5; va_Mod_mem_heaplet 2;
    va_Mod_mem_heaplet 1; va_Mod_cr0; va_Mod_vec 21; va_Mod_vec 20; va_Mod_vec 19; va_Mod_vec 18;
    va_Mod_vec 17; va_Mod_vec 16; va_Mod_vec 15; va_Mod_vec 14; va_Mod_vec 13; va_Mod_vec 12;
    va_Mod_vec 11; va_Mod_vec 10; va_Mod_vec 9; va_Mod_vec 8; va_Mod_vec 7; va_Mod_vec 6;
    va_Mod_vec 5; va_Mod_vec 4; va_Mod_vec 3; va_Mod_vec 2; va_Mod_vec 1; va_Mod_vec 0; va_Mod_reg
    31; va_Mod_reg 30; va_Mod_reg 29; va_Mod_reg 28; va_Mod_reg 27; va_Mod_reg 26; va_Mod_reg 10;
    va_Mod_reg 9; va_Mod_reg 8; va_Mod_reg 7; va_Mod_reg 6; va_Mod_reg 5; va_Mod_reg 4; va_Mod_reg
    3; va_Mod_mem]) (va_wp_Gcm_blocks_wrapped alg auth_b abytes_b in128_b out128_b inout_b iv_b iv
    key round_keys keys_b hkeys_b expected_tag gcm_struct_b) (va_wpProof_Gcm_blocks_wrapped alg
    auth_b abytes_b in128_b out128_b inout_b iv_b iv key round_keys keys_b hkeys_b expected_tag
    gcm_struct_b))
#pop-options
//--
//-- Nat64Equal

val va_code_Nat64Equal : va_dummy:unit -> Tot va_code
[@ "opaque_to_smt" va_qattr]
let va_code_Nat64Equal () =
  (va_Block (va_CCons (va_code_LoadImm64 (va_op_reg_opr_reg 5) 1) (va_CCons (va_code_AddCarry
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 5)) (va_CCons (va_code_LoadImm64
    (va_op_reg_opr_reg 3) 0) (va_CCons (va_code_AddExtended (va_op_reg_opr_reg 3)
    (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 3)) (va_CCons (va_code_Xor (va_op_reg_opr_reg 3)
    (va_op_reg_opr_reg 5) (va_op_reg_opr_reg 3)) (va_CNil ())))))))

val va_codegen_success_Nat64Equal : va_dummy:unit -> Tot va_pbool
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Nat64Equal () =
  (va_pbool_and (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 5) 1) (va_pbool_and
    (va_codegen_success_AddCarry (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 5))
    (va_pbool_and (va_codegen_success_LoadImm64 (va_op_reg_opr_reg 3) 0) (va_pbool_and
    (va_codegen_success_AddExtended (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg
    3)) (va_pbool_and (va_codegen_success_Xor (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 5)
    (va_op_reg_opr_reg 3)) (va_ttrue ()))))))

[@ "opaque_to_smt" va_qattr]
let va_qcode_Nat64Equal (va_mods:va_mods_t) : (va_quickCode unit (va_code_Nat64Equal ())) =
  (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 646 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 5) 1) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 647 column 13 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_AddCarry (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 4) (va_op_reg_opr_reg 5)) (va_QSeq
    va_range1
    "***** PRECONDITION NOT MET AT line 648 column 14 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_LoadImm64 (va_op_reg_opr_reg 3) 0) (va_QSeq va_range1
    "***** PRECONDITION NOT MET AT line 649 column 16 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_AddExtended (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 3))
    (va_QBind va_range1
    "***** PRECONDITION NOT MET AT line 650 column 8 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_quick_Xor (va_op_reg_opr_reg 3) (va_op_reg_opr_reg 5) (va_op_reg_opr_reg 3)) (fun
    (va_s:va_state) _ -> va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 651 column 31 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.AES.Types_helpers.lemma_BitwiseXorWithZero64 1) (va_qPURE va_range1
    "***** PRECONDITION NOT MET AT line 652 column 29 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (fun (_:unit) -> Vale.Arch.Types.lemma_BitwiseXorCancel64 1) (va_QEmpty (()))))))))))


val va_lemma_Nat64Equal : va_b0:va_code -> va_s0:va_state
  -> Ghost (va_state & va_fuel)
  (requires (va_require_total va_b0 (va_code_Nat64Equal ()) va_s0 /\ va_get_ok va_s0))
  (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (if
    (va_get_reg 4 va_s0 = 18446744073709551615) then (va_get_reg 3 va_sM = 0) else (va_get_reg 3
    va_sM = 1)) /\ va_state_eq va_sM (va_update_xer va_sM (va_update_reg 5 va_sM (va_update_reg 3
    va_sM (va_update_ok va_sM va_s0))))))
[@"opaque_to_smt"]
let va_lemma_Nat64Equal va_b0 va_s0 =
  let (va_mods:va_mods_t) = [va_Mod_xer; va_Mod_reg 5; va_Mod_reg 3; va_Mod_ok] in
  let va_qc = va_qcode_Nat64Equal va_mods in
  let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Nat64Equal ()) va_qc va_s0 (fun va_s0
    va_sM va_g -> let () = va_g in label va_range1
    "***** POSTCONDITION NOT MET AT line 639 column 1 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_get_ok va_sM) /\ label va_range1
    "***** POSTCONDITION NOT MET AT line 644 column 71 of file /home/gebner/everest/hacl-star/vale/code/crypto/aes/ppc64le/Vale.AES.PPC64LE.GCMdecrypt.vaf *****"
    (va_if (va_get_reg 4 va_s0 = 18446744073709551615) (fun _ -> va_get_reg 3 va_sM = 0) (fun _ ->
    va_get_reg 3 va_sM = 1))) in
  assert_norm (va_qc.mods == va_mods);
  va_lemma_norm_mods ([va_Mod_xer; va_Mod_reg 5; va_Mod_reg 3; va_Mod_ok]) va_sM va_s0;
  (va_sM, va_fM)

[@ va_qattr]
val va_wp_Nat64Equal (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0

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