(* Generated by coq-of-rust *)
Require Import CoqOfRust.CoqOfRust.

Module file_format_common.
  (*
  Enum BinaryConstants
  {
    const_params := [];
    ty_params := [];
    variants := [];
  }
  *)
  
  Module Impl_move_binary_format_file_format_common_BinaryConstants.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::BinaryConstants".
    
    (*     pub const MOVE_MAGIC_SIZE: usize = 4; *)
    (* Ty.path "usize" *)
    Definition value_MOVE_MAGIC_SIZE : Value.t :=
      M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.Usize 4 |))).
    
    Axiom AssociatedConstant_value_MOVE_MAGIC_SIZE :
      M.IsAssociatedConstant Self "value_MOVE_MAGIC_SIZE" value_MOVE_MAGIC_SIZE.
    
    (*     pub const MOVE_MAGIC: [u8; BinaryConstants::MOVE_MAGIC_SIZE] = [0xA1, 0x1C, 0xEB, 0x0B]; *)
    (* Ty.apply
      (Ty.path "array")
      [
        M.unevaluated_const
          (M.get_constant (| "move_binary_format::file_format_common::MOVE_MAGIC_discriminant" |))
      ]
      [ Ty.path "u8" ] *)
    Definition value_MOVE_MAGIC : Value.t :=
      M.run
        ltac:(M.monadic
          (M.alloc (|
            Value.Array
              [
                Value.Integer IntegerKind.U8 161;
                Value.Integer IntegerKind.U8 28;
                Value.Integer IntegerKind.U8 235;
                Value.Integer IntegerKind.U8 11
              ]
          |))).
    
    Axiom AssociatedConstant_value_MOVE_MAGIC :
      M.IsAssociatedConstant Self "value_MOVE_MAGIC" value_MOVE_MAGIC.
    
    (*     pub const HEADER_SIZE: usize = BinaryConstants::MOVE_MAGIC_SIZE + 5; *)
    (* Ty.path "usize" *)
    Definition value_HEADER_SIZE : Value.t :=
      M.run
        ltac:(M.monadic
          (M.alloc (|
            BinOp.Wrap.add (|
              M.read (|
                M.get_constant (| "move_binary_format::file_format_common::MOVE_MAGIC_SIZE" |)
              |),
              Value.Integer IntegerKind.Usize 5
            |)
          |))).
    
    Axiom AssociatedConstant_value_HEADER_SIZE :
      M.IsAssociatedConstant Self "value_HEADER_SIZE" value_HEADER_SIZE.
    
    (*     pub const TABLE_HEADER_SIZE: u8 = size_of::<u32>() as u8 * 2 + 1; *)
    (* Ty.path "u8" *)
    Definition value_TABLE_HEADER_SIZE : Value.t :=
      M.run
        ltac:(M.monadic
          (M.alloc (|
            BinOp.Wrap.add (|
              BinOp.Wrap.mul (|
                M.rust_cast
                  (M.call_closure (|
                    M.get_function (| "core::mem::size_of", [ Ty.path "u32" ] |),
                    []
                  |)),
                Value.Integer IntegerKind.U8 2
              |),
              Value.Integer IntegerKind.U8 1
            |)
          |))).
    
    Axiom AssociatedConstant_value_TABLE_HEADER_SIZE :
      M.IsAssociatedConstant Self "value_TABLE_HEADER_SIZE" value_TABLE_HEADER_SIZE.
  End Impl_move_binary_format_file_format_common_BinaryConstants.
  
  Definition value_TABLE_COUNT_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_TABLE_OFFSET_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 4294967295 |))).
  
  Definition value_TABLE_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 4294967295 |))).
  
  Definition value_TABLE_CONTENT_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 4294967295 |))).
  
  Definition value_TABLE_INDEX_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65535 |))).
  
  Definition value_SIGNATURE_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_ADDRESS_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_IDENTIFIER_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_MODULE_HANDLE_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_STRUCT_HANDLE_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_STRUCT_DEF_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_FUNCTION_HANDLE_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_FUNCTION_INST_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_FIELD_HANDLE_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_FIELD_INST_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_STRUCT_DEF_INST_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_CONSTANT_INDEX_MAX : Value.t :=
    M.run
      ltac:(M.monadic
        (M.get_constant (| "move_binary_format::file_format_common::TABLE_INDEX_MAX" |))).
  
  Definition value_BYTECODE_COUNT_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65535 |))).
  
  Definition value_BYTECODE_INDEX_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65535 |))).
  
  Definition value_LOCAL_INDEX_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_IDENTIFIER_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65535 |))).
  
  Definition value_CONSTANT_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65535 |))).
  
  Definition value_METADATA_KEY_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 1023 |))).
  
  Definition value_METADATA_VALUE_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65535 |))).
  
  Definition value_SIGNATURE_SIZE_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_ACQUIRES_COUNT_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_FIELD_COUNT_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_FIELD_OFFSET_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_TYPE_PARAMETER_COUNT_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 255 |))).
  
  Definition value_TYPE_PARAMETER_INDEX_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U64 65536 |))).
  
  Definition value_SIGNATURE_TOKEN_DEPTH_MAX : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.Usize 256 |))).
  
  (*
  Enum TableType
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "MODULE_HANDLES";
          item := StructTuple [];
          discriminant := Some 1;
        };
        {
          name := "STRUCT_HANDLES";
          item := StructTuple [];
          discriminant := Some 2;
        };
        {
          name := "FUNCTION_HANDLES";
          item := StructTuple [];
          discriminant := Some 3;
        };
        {
          name := "FUNCTION_INST";
          item := StructTuple [];
          discriminant := Some 4;
        };
        {
          name := "SIGNATURES";
          item := StructTuple [];
          discriminant := Some 5;
        };
        {
          name := "CONSTANT_POOL";
          item := StructTuple [];
          discriminant := Some 6;
        };
        {
          name := "IDENTIFIERS";
          item := StructTuple [];
          discriminant := Some 7;
        };
        {
          name := "ADDRESS_IDENTIFIERS";
          item := StructTuple [];
          discriminant := Some 8;
        };
        {
          name := "STRUCT_DEFS";
          item := StructTuple [];
          discriminant := Some 10;
        };
        {
          name := "STRUCT_DEF_INST";
          item := StructTuple [];
          discriminant := Some 11;
        };
        {
          name := "FUNCTION_DEFS";
          item := StructTuple [];
          discriminant := Some 12;
        };
        {
          name := "FIELD_HANDLE";
          item := StructTuple [];
          discriminant := Some 13;
        };
        {
          name := "FIELD_INST";
          item := StructTuple [];
          discriminant := Some 14;
        };
        {
          name := "FRIEND_DECLS";
          item := StructTuple [];
          discriminant := Some 15;
        };
        {
          name := "METADATA";
          item := StructTuple [];
          discriminant := Some 16;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (| M.read (| self |) |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_move_binary_format_file_format_common_TableType.
  
  Module Impl_core_marker_Copy_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_move_binary_format_file_format_common_TableType.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.read (|
                M.match_operator (|
                  self,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::MODULE_HANDLES"
                          |) in
                        M.alloc (| M.read (| Value.String "MODULE_HANDLES" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::STRUCT_HANDLES"
                          |) in
                        M.alloc (| M.read (| Value.String "STRUCT_HANDLES" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::FUNCTION_HANDLES"
                          |) in
                        M.alloc (| M.read (| Value.String "FUNCTION_HANDLES" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::FUNCTION_INST"
                          |) in
                        M.alloc (| M.read (| Value.String "FUNCTION_INST" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::SIGNATURES"
                          |) in
                        M.alloc (| M.read (| Value.String "SIGNATURES" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::CONSTANT_POOL"
                          |) in
                        M.alloc (| M.read (| Value.String "CONSTANT_POOL" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::IDENTIFIERS"
                          |) in
                        M.alloc (| M.read (| Value.String "IDENTIFIERS" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::ADDRESS_IDENTIFIERS"
                          |) in
                        M.alloc (| M.read (| Value.String "ADDRESS_IDENTIFIERS" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::STRUCT_DEFS"
                          |) in
                        M.alloc (| M.read (| Value.String "STRUCT_DEFS" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::STRUCT_DEF_INST"
                          |) in
                        M.alloc (| M.read (| Value.String "STRUCT_DEF_INST" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::FUNCTION_DEFS"
                          |) in
                        M.alloc (| M.read (| Value.String "FUNCTION_DEFS" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::FIELD_HANDLE"
                          |) in
                        M.alloc (| M.read (| Value.String "FIELD_HANDLE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::FIELD_INST"
                          |) in
                        M.alloc (| M.read (| Value.String "FIELD_INST" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::FRIEND_DECLS"
                          |) in
                        M.alloc (| M.read (| Value.String "FRIEND_DECLS" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::TableType::METADATA"
                          |) in
                        M.alloc (| M.read (| Value.String "METADATA" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_move_binary_format_file_format_common_TableType.
  
  Module Impl_core_cmp_Eq_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    (* Eq *)
    Definition assert_receiver_is_total_eq
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.Tuple []))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::Eq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ].
  End Impl_core_cmp_Eq_for_move_binary_format_file_format_common_TableType.
  
  Module Impl_core_hash_Hash_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    (* Hash *)
    Definition hash (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ __H ], [ self; state ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let state := M.alloc (| state |) in
          M.read (|
            let~ __self_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "move_binary_format::file_format_common::TableType" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |),
                [ __self_discr; M.read (| state |) ]
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::hash::Hash"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("hash", InstanceField.Method hash) ].
  End Impl_core_hash_Hash_for_move_binary_format_file_format_common_TableType.
  
  Module Impl_core_marker_StructuralPartialEq_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_move_binary_format_file_format_common_TableType.
  
  Module Impl_core_cmp_PartialEq_for_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    (* PartialEq *)
    Definition eq (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          M.read (|
            let~ __self_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "move_binary_format::file_format_common::TableType" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            let~ __arg1_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "move_binary_format::file_format_common::TableType" ]
                  |),
                  [ M.read (| other |) ]
                |)
              |) in
            M.alloc (| BinOp.eq (| M.read (| __self_discr |), M.read (| __arg1_discr |) |) |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_move_binary_format_file_format_common_TableType.
  
  (*
  Enum SerializedType
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "BOOL";
          item := StructTuple [];
          discriminant := Some 1;
        };
        {
          name := "U8";
          item := StructTuple [];
          discriminant := Some 2;
        };
        {
          name := "U64";
          item := StructTuple [];
          discriminant := Some 3;
        };
        {
          name := "U128";
          item := StructTuple [];
          discriminant := Some 4;
        };
        {
          name := "ADDRESS";
          item := StructTuple [];
          discriminant := Some 5;
        };
        {
          name := "REFERENCE";
          item := StructTuple [];
          discriminant := Some 6;
        };
        {
          name := "MUTABLE_REFERENCE";
          item := StructTuple [];
          discriminant := Some 7;
        };
        {
          name := "STRUCT";
          item := StructTuple [];
          discriminant := Some 8;
        };
        {
          name := "TYPE_PARAMETER";
          item := StructTuple [];
          discriminant := Some 9;
        };
        {
          name := "VECTOR";
          item := StructTuple [];
          discriminant := Some 10;
        };
        {
          name := "STRUCT_INST";
          item := StructTuple [];
          discriminant := Some 11;
        };
        {
          name := "SIGNER";
          item := StructTuple [];
          discriminant := Some 12;
        };
        {
          name := "U16";
          item := StructTuple [];
          discriminant := Some 13;
        };
        {
          name := "U32";
          item := StructTuple [];
          discriminant := Some 14;
        };
        {
          name := "U256";
          item := StructTuple [];
          discriminant := Some 15;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_move_binary_format_file_format_common_SerializedType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::SerializedType".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (| M.read (| self |) |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_move_binary_format_file_format_common_SerializedType.
  
  Module Impl_core_marker_Copy_for_move_binary_format_file_format_common_SerializedType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::SerializedType".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_move_binary_format_file_format_common_SerializedType.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_file_format_common_SerializedType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::SerializedType".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.read (|
                M.match_operator (|
                  self,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::BOOL"
                          |) in
                        M.alloc (| M.read (| Value.String "BOOL" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::U8"
                          |) in
                        M.alloc (| M.read (| Value.String "U8" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::U64"
                          |) in
                        M.alloc (| M.read (| Value.String "U64" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::U128"
                          |) in
                        M.alloc (| M.read (| Value.String "U128" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::ADDRESS"
                          |) in
                        M.alloc (| M.read (| Value.String "ADDRESS" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::REFERENCE"
                          |) in
                        M.alloc (| M.read (| Value.String "REFERENCE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::MUTABLE_REFERENCE"
                          |) in
                        M.alloc (| M.read (| Value.String "MUTABLE_REFERENCE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::STRUCT"
                          |) in
                        M.alloc (| M.read (| Value.String "STRUCT" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::TYPE_PARAMETER"
                          |) in
                        M.alloc (| M.read (| Value.String "TYPE_PARAMETER" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::VECTOR"
                          |) in
                        M.alloc (| M.read (| Value.String "VECTOR" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::STRUCT_INST"
                          |) in
                        M.alloc (| M.read (| Value.String "STRUCT_INST" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::SIGNER"
                          |) in
                        M.alloc (| M.read (| Value.String "SIGNER" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::U16"
                          |) in
                        M.alloc (| M.read (| Value.String "U16" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::U32"
                          |) in
                        M.alloc (| M.read (| Value.String "U32" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedType::U256"
                          |) in
                        M.alloc (| M.read (| Value.String "U256" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_move_binary_format_file_format_common_SerializedType.
  
  (*
  Enum SerializedNativeStructFlag
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "NATIVE";
          item := StructTuple [];
          discriminant := Some 1;
        };
        {
          name := "DECLARED";
          item := StructTuple [];
          discriminant := Some 2;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_move_binary_format_file_format_common_SerializedNativeStructFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::file_format_common::SerializedNativeStructFlag".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (| M.read (| self |) |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_move_binary_format_file_format_common_SerializedNativeStructFlag.
  
  Module Impl_core_marker_Copy_for_move_binary_format_file_format_common_SerializedNativeStructFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::file_format_common::SerializedNativeStructFlag".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_move_binary_format_file_format_common_SerializedNativeStructFlag.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_file_format_common_SerializedNativeStructFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::file_format_common::SerializedNativeStructFlag".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.read (|
                M.match_operator (|
                  self,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedNativeStructFlag::NATIVE"
                          |) in
                        M.alloc (| M.read (| Value.String "NATIVE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::SerializedNativeStructFlag::DECLARED"
                          |) in
                        M.alloc (| M.read (| Value.String "DECLARED" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_move_binary_format_file_format_common_SerializedNativeStructFlag.
  
  (*
  Enum Opcodes
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "POP";
          item := StructTuple [];
          discriminant := Some 1;
        };
        {
          name := "RET";
          item := StructTuple [];
          discriminant := Some 2;
        };
        {
          name := "BR_TRUE";
          item := StructTuple [];
          discriminant := Some 3;
        };
        {
          name := "BR_FALSE";
          item := StructTuple [];
          discriminant := Some 4;
        };
        {
          name := "BRANCH";
          item := StructTuple [];
          discriminant := Some 5;
        };
        {
          name := "LD_U64";
          item := StructTuple [];
          discriminant := Some 6;
        };
        {
          name := "LD_CONST";
          item := StructTuple [];
          discriminant := Some 7;
        };
        {
          name := "LD_TRUE";
          item := StructTuple [];
          discriminant := Some 8;
        };
        {
          name := "LD_FALSE";
          item := StructTuple [];
          discriminant := Some 9;
        };
        {
          name := "COPY_LOC";
          item := StructTuple [];
          discriminant := Some 10;
        };
        {
          name := "MOVE_LOC";
          item := StructTuple [];
          discriminant := Some 11;
        };
        {
          name := "ST_LOC";
          item := StructTuple [];
          discriminant := Some 12;
        };
        {
          name := "MUT_BORROW_LOC";
          item := StructTuple [];
          discriminant := Some 13;
        };
        {
          name := "IMM_BORROW_LOC";
          item := StructTuple [];
          discriminant := Some 14;
        };
        {
          name := "MUT_BORROW_FIELD";
          item := StructTuple [];
          discriminant := Some 15;
        };
        {
          name := "IMM_BORROW_FIELD";
          item := StructTuple [];
          discriminant := Some 16;
        };
        {
          name := "CALL";
          item := StructTuple [];
          discriminant := Some 17;
        };
        {
          name := "PACK";
          item := StructTuple [];
          discriminant := Some 18;
        };
        {
          name := "UNPACK";
          item := StructTuple [];
          discriminant := Some 19;
        };
        {
          name := "READ_REF";
          item := StructTuple [];
          discriminant := Some 20;
        };
        {
          name := "WRITE_REF";
          item := StructTuple [];
          discriminant := Some 21;
        };
        {
          name := "ADD";
          item := StructTuple [];
          discriminant := Some 22;
        };
        {
          name := "SUB";
          item := StructTuple [];
          discriminant := Some 23;
        };
        {
          name := "MUL";
          item := StructTuple [];
          discriminant := Some 24;
        };
        {
          name := "MOD";
          item := StructTuple [];
          discriminant := Some 25;
        };
        {
          name := "DIV";
          item := StructTuple [];
          discriminant := Some 26;
        };
        {
          name := "BIT_OR";
          item := StructTuple [];
          discriminant := Some 27;
        };
        {
          name := "BIT_AND";
          item := StructTuple [];
          discriminant := Some 28;
        };
        {
          name := "XOR";
          item := StructTuple [];
          discriminant := Some 29;
        };
        {
          name := "OR";
          item := StructTuple [];
          discriminant := Some 30;
        };
        {
          name := "AND";
          item := StructTuple [];
          discriminant := Some 31;
        };
        {
          name := "NOT";
          item := StructTuple [];
          discriminant := Some 32;
        };
        {
          name := "EQ";
          item := StructTuple [];
          discriminant := Some 33;
        };
        {
          name := "NEQ";
          item := StructTuple [];
          discriminant := Some 34;
        };
        {
          name := "LT";
          item := StructTuple [];
          discriminant := Some 35;
        };
        {
          name := "GT";
          item := StructTuple [];
          discriminant := Some 36;
        };
        {
          name := "LE";
          item := StructTuple [];
          discriminant := Some 37;
        };
        {
          name := "GE";
          item := StructTuple [];
          discriminant := Some 38;
        };
        {
          name := "ABORT";
          item := StructTuple [];
          discriminant := Some 39;
        };
        {
          name := "NOP";
          item := StructTuple [];
          discriminant := Some 40;
        };
        {
          name := "FREEZE_REF";
          item := StructTuple [];
          discriminant := Some 46;
        };
        {
          name := "SHL";
          item := StructTuple [];
          discriminant := Some 47;
        };
        {
          name := "SHR";
          item := StructTuple [];
          discriminant := Some 48;
        };
        {
          name := "LD_U8";
          item := StructTuple [];
          discriminant := Some 49;
        };
        {
          name := "LD_U128";
          item := StructTuple [];
          discriminant := Some 50;
        };
        {
          name := "CAST_U8";
          item := StructTuple [];
          discriminant := Some 51;
        };
        {
          name := "CAST_U64";
          item := StructTuple [];
          discriminant := Some 52;
        };
        {
          name := "CAST_U128";
          item := StructTuple [];
          discriminant := Some 53;
        };
        {
          name := "MUT_BORROW_FIELD_GENERIC";
          item := StructTuple [];
          discriminant := Some 54;
        };
        {
          name := "IMM_BORROW_FIELD_GENERIC";
          item := StructTuple [];
          discriminant := Some 55;
        };
        {
          name := "CALL_GENERIC";
          item := StructTuple [];
          discriminant := Some 56;
        };
        {
          name := "PACK_GENERIC";
          item := StructTuple [];
          discriminant := Some 57;
        };
        {
          name := "UNPACK_GENERIC";
          item := StructTuple [];
          discriminant := Some 58;
        };
        {
          name := "VEC_PACK";
          item := StructTuple [];
          discriminant := Some 64;
        };
        {
          name := "VEC_LEN";
          item := StructTuple [];
          discriminant := Some 65;
        };
        {
          name := "VEC_IMM_BORROW";
          item := StructTuple [];
          discriminant := Some 66;
        };
        {
          name := "VEC_MUT_BORROW";
          item := StructTuple [];
          discriminant := Some 67;
        };
        {
          name := "VEC_PUSH_BACK";
          item := StructTuple [];
          discriminant := Some 68;
        };
        {
          name := "VEC_POP_BACK";
          item := StructTuple [];
          discriminant := Some 69;
        };
        {
          name := "VEC_UNPACK";
          item := StructTuple [];
          discriminant := Some 70;
        };
        {
          name := "VEC_SWAP";
          item := StructTuple [];
          discriminant := Some 71;
        };
        {
          name := "LD_U16";
          item := StructTuple [];
          discriminant := Some 72;
        };
        {
          name := "LD_U32";
          item := StructTuple [];
          discriminant := Some 73;
        };
        {
          name := "LD_U256";
          item := StructTuple [];
          discriminant := Some 74;
        };
        {
          name := "CAST_U16";
          item := StructTuple [];
          discriminant := Some 75;
        };
        {
          name := "CAST_U32";
          item := StructTuple [];
          discriminant := Some 76;
        };
        {
          name := "CAST_U256";
          item := StructTuple [];
          discriminant := Some 77;
        };
        {
          name := "EXISTS_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 41;
        };
        {
          name := "MUT_BORROW_GLOBAL_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 42;
        };
        {
          name := "IMM_BORROW_GLOBAL_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 43;
        };
        {
          name := "MOVE_FROM_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 44;
        };
        {
          name := "MOVE_TO_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 45;
        };
        {
          name := "EXISTS_GENERIC_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 59;
        };
        {
          name := "MUT_BORROW_GLOBAL_GENERIC_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 60;
        };
        {
          name := "IMM_BORROW_GLOBAL_GENERIC_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 61;
        };
        {
          name := "MOVE_FROM_GENERIC_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 62;
        };
        {
          name := "MOVE_TO_GENERIC_DEPRECATED";
          item := StructTuple [];
          discriminant := Some 63;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_move_binary_format_file_format_common_Opcodes.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::Opcodes".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (| M.read (| self |) |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_move_binary_format_file_format_common_Opcodes.
  
  Module Impl_core_marker_Copy_for_move_binary_format_file_format_common_Opcodes.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::Opcodes".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_move_binary_format_file_format_common_Opcodes.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_file_format_common_Opcodes.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::Opcodes".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.read (|
                M.match_operator (|
                  self,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::POP"
                          |) in
                        M.alloc (| M.read (| Value.String "POP" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::RET"
                          |) in
                        M.alloc (| M.read (| Value.String "RET" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::BR_TRUE"
                          |) in
                        M.alloc (| M.read (| Value.String "BR_TRUE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::BR_FALSE"
                          |) in
                        M.alloc (| M.read (| Value.String "BR_FALSE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::BRANCH"
                          |) in
                        M.alloc (| M.read (| Value.String "BRANCH" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_U64"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_U64" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_CONST"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_CONST" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_TRUE"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_TRUE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_FALSE"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_FALSE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::COPY_LOC"
                          |) in
                        M.alloc (| M.read (| Value.String "COPY_LOC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MOVE_LOC"
                          |) in
                        M.alloc (| M.read (| Value.String "MOVE_LOC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::ST_LOC"
                          |) in
                        M.alloc (| M.read (| Value.String "ST_LOC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_LOC"
                          |) in
                        M.alloc (| M.read (| Value.String "MUT_BORROW_LOC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_LOC"
                          |) in
                        M.alloc (| M.read (| Value.String "IMM_BORROW_LOC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD"
                          |) in
                        M.alloc (| M.read (| Value.String "MUT_BORROW_FIELD" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD"
                          |) in
                        M.alloc (| M.read (| Value.String "IMM_BORROW_FIELD" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CALL"
                          |) in
                        M.alloc (| M.read (| Value.String "CALL" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::PACK"
                          |) in
                        M.alloc (| M.read (| Value.String "PACK" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::UNPACK"
                          |) in
                        M.alloc (| M.read (| Value.String "UNPACK" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::READ_REF"
                          |) in
                        M.alloc (| M.read (| Value.String "READ_REF" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::WRITE_REF"
                          |) in
                        M.alloc (| M.read (| Value.String "WRITE_REF" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::ADD"
                          |) in
                        M.alloc (| M.read (| Value.String "ADD" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::SUB"
                          |) in
                        M.alloc (| M.read (| Value.String "SUB" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MUL"
                          |) in
                        M.alloc (| M.read (| Value.String "MUL" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MOD"
                          |) in
                        M.alloc (| M.read (| Value.String "MOD" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::DIV"
                          |) in
                        M.alloc (| M.read (| Value.String "DIV" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::BIT_OR"
                          |) in
                        M.alloc (| M.read (| Value.String "BIT_OR" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::BIT_AND"
                          |) in
                        M.alloc (| M.read (| Value.String "BIT_AND" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::XOR"
                          |) in
                        M.alloc (| M.read (| Value.String "XOR" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::OR"
                          |) in
                        M.alloc (| M.read (| Value.String "OR" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::AND"
                          |) in
                        M.alloc (| M.read (| Value.String "AND" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::NOT"
                          |) in
                        M.alloc (| M.read (| Value.String "NOT" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::EQ"
                          |) in
                        M.alloc (| M.read (| Value.String "EQ" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::NEQ"
                          |) in
                        M.alloc (| M.read (| Value.String "NEQ" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LT"
                          |) in
                        M.alloc (| M.read (| Value.String "LT" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::GT"
                          |) in
                        M.alloc (| M.read (| Value.String "GT" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LE"
                          |) in
                        M.alloc (| M.read (| Value.String "LE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::GE"
                          |) in
                        M.alloc (| M.read (| Value.String "GE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::ABORT"
                          |) in
                        M.alloc (| M.read (| Value.String "ABORT" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::NOP"
                          |) in
                        M.alloc (| M.read (| Value.String "NOP" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::FREEZE_REF"
                          |) in
                        M.alloc (| M.read (| Value.String "FREEZE_REF" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::SHL"
                          |) in
                        M.alloc (| M.read (| Value.String "SHL" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::SHR"
                          |) in
                        M.alloc (| M.read (| Value.String "SHR" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_U8"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_U8" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_U128"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_U128" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CAST_U8"
                          |) in
                        M.alloc (| M.read (| Value.String "CAST_U8" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CAST_U64"
                          |) in
                        M.alloc (| M.read (| Value.String "CAST_U64" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CAST_U128"
                          |) in
                        M.alloc (| M.read (| Value.String "CAST_U128" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD_GENERIC"
                          |) in
                        M.alloc (| M.read (| Value.String "MUT_BORROW_FIELD_GENERIC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD_GENERIC"
                          |) in
                        M.alloc (| M.read (| Value.String "IMM_BORROW_FIELD_GENERIC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CALL_GENERIC"
                          |) in
                        M.alloc (| M.read (| Value.String "CALL_GENERIC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::PACK_GENERIC"
                          |) in
                        M.alloc (| M.read (| Value.String "PACK_GENERIC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::UNPACK_GENERIC"
                          |) in
                        M.alloc (| M.read (| Value.String "UNPACK_GENERIC" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_PACK"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_PACK" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_LEN"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_LEN" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_IMM_BORROW"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_IMM_BORROW" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_MUT_BORROW"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_MUT_BORROW" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_PUSH_BACK"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_PUSH_BACK" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_POP_BACK"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_POP_BACK" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_UNPACK"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_UNPACK" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::VEC_SWAP"
                          |) in
                        M.alloc (| M.read (| Value.String "VEC_SWAP" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_U16"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_U16" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_U32"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_U32" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::LD_U256"
                          |) in
                        M.alloc (| M.read (| Value.String "LD_U256" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CAST_U16"
                          |) in
                        M.alloc (| M.read (| Value.String "CAST_U16" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CAST_U32"
                          |) in
                        M.alloc (| M.read (| Value.String "CAST_U32" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::CAST_U256"
                          |) in
                        M.alloc (| M.read (| Value.String "CAST_U256" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::EXISTS_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "EXISTS_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "MUT_BORROW_GLOBAL_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "IMM_BORROW_GLOBAL_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MOVE_FROM_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "MOVE_FROM_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MOVE_TO_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "MOVE_TO_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::EXISTS_GENERIC_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "EXISTS_GENERIC_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED"
                          |) in
                        M.alloc (|
                          M.read (| Value.String "MUT_BORROW_GLOBAL_GENERIC_DEPRECATED" |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED"
                          |) in
                        M.alloc (|
                          M.read (| Value.String "IMM_BORROW_GLOBAL_GENERIC_DEPRECATED" |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MOVE_FROM_GENERIC_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "MOVE_FROM_GENERIC_DEPRECATED" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::file_format_common::Opcodes::MOVE_TO_GENERIC_DEPRECATED"
                          |) in
                        M.alloc (| M.read (| Value.String "MOVE_TO_GENERIC_DEPRECATED" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_move_binary_format_file_format_common_Opcodes.
  
  Definition value_BINARY_SIZE_LIMIT : Value.t :=
    M.run
      ltac:(M.monadic
        (M.alloc (|
          M.call_closure (| M.get_associated_function (| Ty.path "usize", "max_value", [] |), [] |)
        |))).
  
  (* StructRecord
    {
      name := "BinaryData";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("_binary",
            Ty.apply
              (Ty.path "alloc::vec::Vec")
              []
              [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ])
        ];
    } *)
  
  Module Impl_core_default_Default_for_move_binary_format_file_format_common_BinaryData.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::BinaryData".
    
    (* Default *)
    Definition default (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "move_binary_format::file_format_common::BinaryData"
            [
              ("_binary",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_move_binary_format_file_format_common_BinaryData.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_file_format_common_BinaryData.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::BinaryData".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "BinaryData" |);
              M.read (| Value.String "_binary" |);
              M.alloc (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "move_binary_format::file_format_common::BinaryData",
                  "_binary"
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_move_binary_format_file_format_common_BinaryData.
  
  Module Impl_move_binary_format_file_format_common_BinaryData.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::BinaryData".
    
    (*
        pub fn new() -> Self {
            BinaryData {
                _binary: Vec::new(),
            }
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "move_binary_format::file_format_common::BinaryData"
            [
              ("_binary",
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                    "new",
                    []
                  |),
                  []
                |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
    
    (*
        pub fn as_inner(&self) -> &[u8] {
            &self._binary
        }
    *)
    Definition as_inner (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::ops::deref::Deref",
              Ty.apply
                (Ty.path "alloc::vec::Vec")
                []
                [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
              [],
              "deref",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::file_format_common::BinaryData",
                "_binary"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_as_inner : M.IsAssociatedFunction Self "as_inner" as_inner.
    
    (*
        pub fn into_inner(self) -> Vec<u8> {
            self._binary
        }
    *)
    Definition into_inner (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.SubPointer.get_struct_record_field (|
              self,
              "move_binary_format::file_format_common::BinaryData",
              "_binary"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_into_inner : M.IsAssociatedFunction Self "into_inner" into_inner.
    
    (*
        pub fn push(&mut self, item: u8) -> Result<()> {
            if self.len().checked_add(1).is_some() {
                self._binary.push(item);
            } else {
                bail!(
                    "binary size ({}) + 1 is greater than limit ({})",
                    self.len(),
                    BINARY_SIZE_LIMIT,
                );
            }
            Ok(())
        }
    *)
    Definition push (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; item ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let item := M.alloc (| item |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::option::Option")
                                      []
                                      [ Ty.path "usize" ],
                                    "is_some",
                                    []
                                  |),
                                  [
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "usize",
                                          "checked_add",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path
                                                "move_binary_format::file_format_common::BinaryData",
                                              "len",
                                              []
                                            |),
                                            [ M.read (| self |) ]
                                          |);
                                          Value.Integer IntegerKind.Usize 1
                                        ]
                                      |)
                                    |)
                                  ]
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                  "push",
                                  []
                                |),
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "move_binary_format::file_format_common::BinaryData",
                                    "_binary"
                                  |);
                                  M.read (| item |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "anyhow::Error",
                                          "msg",
                                          [ Ty.path "alloc::string::String" ]
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "core::hint::must_use",
                                              [ Ty.path "alloc::string::String" ]
                                            |),
                                            [
                                              M.read (|
                                                let~ res :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (| "alloc::fmt::format", [] |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path "core::fmt::Arguments",
                                                            "new_v1",
                                                            []
                                                          |),
                                                          [
                                                            M.alloc (|
                                                              Value.Array
                                                                [
                                                                  M.read (|
                                                                    Value.String "binary size ("
                                                                  |);
                                                                  M.read (|
                                                                    Value.String
                                                                      ") + 1 is greater than limit ("
                                                                  |);
                                                                  M.read (| Value.String ")" |)
                                                                ]
                                                            |);
                                                            M.alloc (|
                                                              Value.Array
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_display",
                                                                      [ Ty.path "usize" ]
                                                                    |),
                                                                    [
                                                                      M.alloc (|
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.path
                                                                              "move_binary_format::file_format_common::BinaryData",
                                                                            "len",
                                                                            []
                                                                          |),
                                                                          [ M.read (| self |) ]
                                                                        |)
                                                                      |)
                                                                    ]
                                                                  |);
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_display",
                                                                      [ Ty.path "usize" ]
                                                                    |),
                                                                    [
                                                                      M.get_constant (|
                                                                        "move_binary_format::file_format_common::BINARY_SIZE_LIMIT"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                            |)
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  |) in
                                                res
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)))
                    ]
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_push : M.IsAssociatedFunction Self "push" push.
    
    (*
        pub fn extend(&mut self, vec: &[u8]) -> Result<()> {
            let vec_len: usize = vec.len();
            if self.len().checked_add(vec_len).is_some() {
                self._binary.extend(vec);
            } else {
                bail!(
                    "binary size ({}) + {} is greater than limit ({})",
                    self.len(),
                    vec.len(),
                    BINARY_SIZE_LIMIT,
                );
            }
            Ok(())
        }
    *)
    Definition extend (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; vec ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let vec := M.alloc (| vec |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ vec_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                        "len",
                        []
                      |),
                      [ M.read (| vec |) ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::option::Option")
                                      []
                                      [ Ty.path "usize" ],
                                    "is_some",
                                    []
                                  |),
                                  [
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "usize",
                                          "checked_add",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path
                                                "move_binary_format::file_format_common::BinaryData",
                                              "len",
                                              []
                                            |),
                                            [ M.read (| self |) ]
                                          |);
                                          M.read (| vec_len |)
                                        ]
                                      |)
                                    |)
                                  ]
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let~ _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::traits::collect::Extend",
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "u8" ] ],
                                  "extend",
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]
                                  ]
                                |),
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "move_binary_format::file_format_common::BinaryData",
                                    "_binary"
                                  |);
                                  M.read (| vec |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "anyhow::Error",
                                          "msg",
                                          [ Ty.path "alloc::string::String" ]
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "core::hint::must_use",
                                              [ Ty.path "alloc::string::String" ]
                                            |),
                                            [
                                              M.read (|
                                                let~ res :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (| "alloc::fmt::format", [] |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path "core::fmt::Arguments",
                                                            "new_v1",
                                                            []
                                                          |),
                                                          [
                                                            M.alloc (|
                                                              Value.Array
                                                                [
                                                                  M.read (|
                                                                    Value.String "binary size ("
                                                                  |);
                                                                  M.read (| Value.String ") + " |);
                                                                  M.read (|
                                                                    Value.String
                                                                      " is greater than limit ("
                                                                  |);
                                                                  M.read (| Value.String ")" |)
                                                                ]
                                                            |);
                                                            M.alloc (|
                                                              Value.Array
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_display",
                                                                      [ Ty.path "usize" ]
                                                                    |),
                                                                    [
                                                                      M.alloc (|
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.path
                                                                              "move_binary_format::file_format_common::BinaryData",
                                                                            "len",
                                                                            []
                                                                          |),
                                                                          [ M.read (| self |) ]
                                                                        |)
                                                                      |)
                                                                    ]
                                                                  |);
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_display",
                                                                      [ Ty.path "usize" ]
                                                                    |),
                                                                    [
                                                                      M.alloc (|
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.apply
                                                                              (Ty.path "slice")
                                                                              []
                                                                              [ Ty.path "u8" ],
                                                                            "len",
                                                                            []
                                                                          |),
                                                                          [ M.read (| vec |) ]
                                                                        |)
                                                                      |)
                                                                    ]
                                                                  |);
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_display",
                                                                      [ Ty.path "usize" ]
                                                                    |),
                                                                    [
                                                                      M.get_constant (|
                                                                        "move_binary_format::file_format_common::BINARY_SIZE_LIMIT"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                            |)
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  |) in
                                                res
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)))
                    ]
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_extend : M.IsAssociatedFunction Self "extend" extend.
    
    (*
        pub fn len(&self) -> usize {
            self._binary.len()
        }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "alloc::vec::Vec")
                []
                [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
              "len",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::file_format_common::BinaryData",
                "_binary"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_len : M.IsAssociatedFunction Self "len" len.
    
    (*
        pub fn is_empty(&self) -> bool {
            self._binary.is_empty()
        }
    *)
    Definition is_empty (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "alloc::vec::Vec")
                []
                [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
              "is_empty",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::file_format_common::BinaryData",
                "_binary"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_is_empty : M.IsAssociatedFunction Self "is_empty" is_empty.
    
    (*
        pub fn clear(&mut self) {
            self._binary.clear();
        }
    *)
    Definition clear (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                    "clear",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "move_binary_format::file_format_common::BinaryData",
                      "_binary"
                    |)
                  ]
                |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_clear : M.IsAssociatedFunction Self "clear" clear.
  End Impl_move_binary_format_file_format_common_BinaryData.
  
  Module Impl_core_convert_From_alloc_vec_Vec_u8_alloc_alloc_Global_for_move_binary_format_file_format_common_BinaryData.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::BinaryData".
    
    (*
        fn from(vec: Vec<u8>) -> Self {
            BinaryData { _binary: vec }
        }
    *)
    Definition from (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ vec ] =>
        ltac:(M.monadic
          (let vec := M.alloc (| vec |) in
          Value.StructRecord
            "move_binary_format::file_format_common::BinaryData"
            [ ("_binary", M.read (| vec |)) ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::convert::From"
        Self
        (* Trait polymorphic types *)
        [
          (* T *)
          Ty.apply (Ty.path "alloc::vec::Vec") [] [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ]
        ]
        (* Instance *) [ ("from", InstanceField.Method from) ].
  End Impl_core_convert_From_alloc_vec_Vec_u8_alloc_alloc_Global_for_move_binary_format_file_format_common_BinaryData.
  
  (*
  pub(crate) fn write_u64_as_uleb128(binary: &mut BinaryData, mut val: u64) -> Result<()> {
      loop {
          let cur = val & 0x7f;
          if cur != val {
              binary.push((cur | 0x80) as u8)?;
              val >>= 7;
          } else {
              binary.push(cur as u8)?;
              break;
          }
      }
      Ok(())
  }
  *)
  Definition write_u64_as_uleb128 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; val ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let val := M.alloc (| val |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (let~ cur :=
                      M.alloc (|
                        BinOp.bit_and (M.read (| val |)) (Value.Integer IntegerKind.U64 127)
                      |) in
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (| BinOp.ne (| M.read (| cur |), M.read (| val |) |) |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "move_binary_format::file_format_common::BinaryData",
                                          "push",
                                          []
                                        |),
                                        [
                                          M.read (| binary |);
                                          M.rust_cast
                                            (BinOp.bit_or
                                              (M.read (| cur |))
                                              (Value.Integer IntegerKind.U64 128))
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path "anyhow::Error"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            let~ _ :=
                              let β := val in
                              M.write (|
                                β,
                                BinOp.Wrap.shr (| M.read (| β |), Value.Integer IntegerKind.I32 7 |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  let~ _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "move_binary_format::file_format_common::BinaryData",
                                                "push",
                                                []
                                              |),
                                              [ M.read (| binary |); M.rust_cast (M.read (| cur |))
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path "anyhow::Error"
                                                            ]
                                                        ],
                                                        "from_residual",
                                                        []
                                                      |),
                                                      [ M.read (| residual |) ]
                                                    |)
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Continue",
                                                0
                                              |) in
                                            let val := M.copy (| γ0_0 |) in
                                            val))
                                      ]
                                    |) in
                                  M.break (||)
                                |)
                              |)
                            |)))
                      ]
                    |)))
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write_u64_as_uleb128 :
    M.IsFunction
      "move_binary_format::file_format_common::write_u64_as_uleb128"
      write_u64_as_uleb128.
  
  (*
  pub(crate) fn write_u16(binary: &mut BinaryData, value: u16) -> Result<()> {
      binary.extend(&value.to_le_bytes())
  }
  *)
  Definition write_u16 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; value ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let value := M.alloc (| value |) in
        M.call_closure (|
          M.get_associated_function (|
            Ty.path "move_binary_format::file_format_common::BinaryData",
            "extend",
            []
          |),
          [
            M.read (| binary |);
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (| Ty.path "u16", "to_le_bytes", [] |),
                [ M.read (| value |) ]
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write_u16 :
    M.IsFunction "move_binary_format::file_format_common::write_u16" write_u16.
  
  (*
  pub(crate) fn write_u32(binary: &mut BinaryData, value: u32) -> Result<()> {
      binary.extend(&value.to_le_bytes())
  }
  *)
  Definition write_u32 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; value ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let value := M.alloc (| value |) in
        M.call_closure (|
          M.get_associated_function (|
            Ty.path "move_binary_format::file_format_common::BinaryData",
            "extend",
            []
          |),
          [
            M.read (| binary |);
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (| Ty.path "u32", "to_le_bytes", [] |),
                [ M.read (| value |) ]
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write_u32 :
    M.IsFunction "move_binary_format::file_format_common::write_u32" write_u32.
  
  (*
  pub(crate) fn write_u64(binary: &mut BinaryData, value: u64) -> Result<()> {
      binary.extend(&value.to_le_bytes())
  }
  *)
  Definition write_u64 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; value ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let value := M.alloc (| value |) in
        M.call_closure (|
          M.get_associated_function (|
            Ty.path "move_binary_format::file_format_common::BinaryData",
            "extend",
            []
          |),
          [
            M.read (| binary |);
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (| Ty.path "u64", "to_le_bytes", [] |),
                [ M.read (| value |) ]
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write_u64 :
    M.IsFunction "move_binary_format::file_format_common::write_u64" write_u64.
  
  (*
  pub(crate) fn write_u128(binary: &mut BinaryData, value: u128) -> Result<()> {
      binary.extend(&value.to_le_bytes())
  }
  *)
  Definition write_u128 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; value ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let value := M.alloc (| value |) in
        M.call_closure (|
          M.get_associated_function (|
            Ty.path "move_binary_format::file_format_common::BinaryData",
            "extend",
            []
          |),
          [
            M.read (| binary |);
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (| Ty.path "u128", "to_le_bytes", [] |),
                [ M.read (| value |) ]
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write_u128 :
    M.IsFunction "move_binary_format::file_format_common::write_u128" write_u128.
  
  (*
  pub(crate) fn write_u256(
      binary: &mut BinaryData,
      value: move_core_types::u256::U256,
  ) -> Result<()> {
      binary.extend(&value.to_le_bytes())
  }
  *)
  Definition write_u256 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; value ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let value := M.alloc (| value |) in
        M.call_closure (|
          M.get_associated_function (|
            Ty.path "move_binary_format::file_format_common::BinaryData",
            "extend",
            []
          |),
          [
            M.read (| binary |);
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "move_core_types::u256::U256",
                  "to_le_bytes",
                  []
                |),
                [ M.read (| value |) ]
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_write_u256 :
    M.IsFunction "move_binary_format::file_format_common::write_u256" write_u256.
  
  (*
  pub fn read_u8(cursor: &mut Cursor<&[u8]>) -> Result<u8> {
      let mut buf = [0; 1];
      cursor.read_exact(&mut buf)?;
      Ok(buf[0])
  }
  *)
  Definition read_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ buf :=
                M.alloc (|
                  repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 1 |)
                |) in
              let~ _ :=
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::ops::try_trait::Try",
                        Ty.apply
                          (Ty.path "core::result::Result")
                          []
                          [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "std::io::Read",
                            Ty.apply
                              (Ty.path "std::io::cursor::Cursor")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]
                              ],
                            [],
                            "read_exact",
                            []
                          |),
                          [ M.read (| cursor |); buf ]
                        |)
                      ]
                    |)
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::ops::control_flow::ControlFlow::Break",
                            0
                          |) in
                        let residual := M.copy (| γ0_0 |) in
                        M.alloc (|
                          M.never_to_any (|
                            M.read (|
                              M.return_ (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::FromResidual",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      []
                                      [ Ty.path "u8"; Ty.path "anyhow::Error" ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "std::io::error::Error"
                                        ]
                                    ],
                                    "from_residual",
                                    []
                                  |),
                                  [ M.read (| residual |) ]
                                |)
                              |)
                            |)
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::ops::control_flow::ControlFlow::Continue",
                            0
                          |) in
                        let val := M.copy (| γ0_0 |) in
                        val))
                  ]
                |) in
              M.alloc (|
                Value.StructTuple
                  "core::result::Result::Ok"
                  [
                    M.read (|
                      M.SubPointer.get_array_field (|
                        buf,
                        M.alloc (| Value.Integer IntegerKind.Usize 0 |)
                      |)
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u8 : M.IsFunction "move_binary_format::file_format_common::read_u8" read_u8.
  
  (*
  pub fn read_u32(cursor: &mut Cursor<&[u8]>) -> Result<u32> {
      let mut buf = [0; 4];
      cursor.read_exact(&mut buf)?;
      Ok(u32::from_le_bytes(buf))
  }
  *)
  Definition read_u32 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ buf :=
                M.alloc (|
                  repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 4 |)
                |) in
              let~ _ :=
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::ops::try_trait::Try",
                        Ty.apply
                          (Ty.path "core::result::Result")
                          []
                          [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "std::io::Read",
                            Ty.apply
                              (Ty.path "std::io::cursor::Cursor")
                              []
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]
                              ],
                            [],
                            "read_exact",
                            []
                          |),
                          [ M.read (| cursor |); buf ]
                        |)
                      ]
                    |)
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::ops::control_flow::ControlFlow::Break",
                            0
                          |) in
                        let residual := M.copy (| γ0_0 |) in
                        M.alloc (|
                          M.never_to_any (|
                            M.read (|
                              M.return_ (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::FromResidual",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      []
                                      [ Ty.path "u32"; Ty.path "anyhow::Error" ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "std::io::error::Error"
                                        ]
                                    ],
                                    "from_residual",
                                    []
                                  |),
                                  [ M.read (| residual |) ]
                                |)
                              |)
                            |)
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::ops::control_flow::ControlFlow::Continue",
                            0
                          |) in
                        let val := M.copy (| γ0_0 |) in
                        val))
                  ]
                |) in
              M.alloc (|
                Value.StructTuple
                  "core::result::Result::Ok"
                  [
                    M.call_closure (|
                      M.get_associated_function (| Ty.path "u32", "from_le_bytes", [] |),
                      [ M.read (| buf |) ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u32 :
    M.IsFunction "move_binary_format::file_format_common::read_u32" read_u32.
  
  (*
  pub fn read_uleb128_as_u64(cursor: &mut Cursor<&[u8]>) -> Result<u64> {
      let mut value: u64 = 0;
      let mut shift = 0;
      while let Ok(byte) = read_u8(cursor) {
          let cur = (byte & 0x7f) as u64;
          if (cur << shift) >> shift != cur {
              bail!("invalid ULEB128 repr for usize");
          }
          value |= cur << shift;
  
          if (byte & 0x80) == 0 {
              if shift > 0 && cur == 0 {
                  bail!("invalid ULEB128 repr for usize");
              }
              return Ok(value);
          }
  
          shift += 7;
          if shift > u64::BITS {
              break;
          }
      }
      bail!("invalid ULEB128 repr for usize");
  }
  *)
  Definition read_uleb128_as_u64 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.never_to_any (|
              M.read (|
                let~ value := M.alloc (| Value.Integer IntegerKind.U64 0 |) in
                let~ shift := M.alloc (| Value.Integer IntegerKind.U32 0 |) in
                let~ _ :=
                  M.loop (|
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "move_binary_format::file_format_common::read_u8",
                                      []
                                    |),
                                    [ M.read (| cursor |) ]
                                  |)
                                |) in
                              let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::result::Result::Ok",
                                  0
                                |) in
                              let byte := M.copy (| γ0_0 |) in
                              let~ cur :=
                                M.alloc (|
                                  M.rust_cast
                                    (BinOp.bit_and
                                      (M.read (| byte |))
                                      (Value.Integer IntegerKind.U8 127))
                                |) in
                              let~ _ :=
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          M.use
                                            (M.alloc (|
                                              BinOp.ne (|
                                                BinOp.Wrap.shr (|
                                                  BinOp.Wrap.shl (|
                                                    M.read (| cur |),
                                                    M.read (| shift |)
                                                  |),
                                                  M.read (| shift |)
                                                |),
                                                M.read (| cur |)
                                              |)
                                            |)) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                Value.StructTuple
                                                  "core::result::Result::Err"
                                                  [
                                                    M.read (|
                                                      let~ error :=
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "anyhow::__private::format_err",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path "core::fmt::Arguments",
                                                                  "new_const",
                                                                  []
                                                                |),
                                                                [
                                                                  M.alloc (|
                                                                    Value.Array
                                                                      [
                                                                        M.read (|
                                                                          Value.String
                                                                            "invalid ULEB128 repr for usize"
                                                                        |)
                                                                      ]
                                                                  |)
                                                                ]
                                                              |)
                                                            ]
                                                          |)
                                                        |) in
                                                      error
                                                    |)
                                                  ]
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              let~ _ :=
                                let β := value in
                                M.write (|
                                  β,
                                  BinOp.bit_or
                                    (M.read (| β |))
                                    (BinOp.Wrap.shl (| M.read (| cur |), M.read (| shift |) |))
                                |) in
                              let~ _ :=
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          M.use
                                            (M.alloc (|
                                              BinOp.eq (|
                                                BinOp.bit_and
                                                  (M.read (| byte |))
                                                  (Value.Integer IntegerKind.U8 128),
                                                Value.Integer IntegerKind.U8 0
                                              |)
                                            |)) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              let~ _ :=
                                                M.match_operator (|
                                                  M.alloc (| Value.Tuple [] |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ :=
                                                          M.use
                                                            (M.alloc (|
                                                              LogicalOp.and (|
                                                                BinOp.gt (|
                                                                  M.read (| shift |),
                                                                  Value.Integer IntegerKind.U32 0
                                                                |),
                                                                ltac:(M.monadic
                                                                  (BinOp.eq (|
                                                                    M.read (| cur |),
                                                                    Value.Integer IntegerKind.U64 0
                                                                  |)))
                                                              |)
                                                            |)) in
                                                        let _ :=
                                                          M.is_constant_or_break_match (|
                                                            M.read (| γ |),
                                                            Value.Bool true
                                                          |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                Value.StructTuple
                                                                  "core::result::Result::Err"
                                                                  [
                                                                    M.read (|
                                                                      let~ error :=
                                                                        M.alloc (|
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "anyhow::__private::format_err",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "core::fmt::Arguments",
                                                                                  "new_const",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.alloc (|
                                                                                    Value.Array
                                                                                      [
                                                                                        M.read (|
                                                                                          Value.String
                                                                                            "invalid ULEB128 repr for usize"
                                                                                        |)
                                                                                      ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        |) in
                                                                      error
                                                                    |)
                                                                  ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.alloc (| Value.Tuple [] |)))
                                                  ]
                                                |) in
                                              M.return_ (|
                                                Value.StructTuple
                                                  "core::result::Result::Ok"
                                                  [ M.read (| value |) ]
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              let~ _ :=
                                let β := shift in
                                M.write (|
                                  β,
                                  BinOp.Wrap.add (|
                                    M.read (| β |),
                                    Value.Integer IntegerKind.U32 7
                                  |)
                                |) in
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            BinOp.gt (|
                                              M.read (| shift |),
                                              M.read (| M.get_constant (| "core::num::BITS" |) |)
                                            |)
                                          |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    let~ _ :=
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)
                                  |)
                                |)
                              |)))
                        ]
                      |)))
                  |) in
                M.return_ (|
                  Value.StructTuple
                    "core::result::Result::Err"
                    [
                      M.read (|
                        let~ error :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (| "anyhow::__private::format_err", [] |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.path "core::fmt::Arguments",
                                    "new_const",
                                    []
                                  |),
                                  [
                                    M.alloc (|
                                      Value.Array
                                        [ M.read (| Value.String "invalid ULEB128 repr for usize" |)
                                        ]
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |) in
                        error
                      |)
                    ]
                |)
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_uleb128_as_u64 :
    M.IsFunction "move_binary_format::file_format_common::read_uleb128_as_u64" read_uleb128_as_u64.
  
  Definition value_VERSION_1 : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 1 |))).
  
  Definition value_VERSION_2 : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 2 |))).
  
  Definition value_VERSION_3 : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 3 |))).
  
  Definition value_VERSION_4 : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 4 |))).
  
  Definition value_VERSION_5 : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 5 |))).
  
  Definition value_VERSION_6 : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 6 |))).
  
  Definition value_VERSION_MAX : Value.t :=
    M.run
      ltac:(M.monadic (M.get_constant (| "move_binary_format::file_format_common::VERSION_6" |))).
  
  Definition value_VERSION_MIN : Value.t :=
    M.run
      ltac:(M.monadic (M.get_constant (| "move_binary_format::file_format_common::VERSION_5" |))).
  
  (*
  pub fn instruction_key(instruction: &Bytecode) -> u8 {
      use Bytecode::*;
      let opcode = match instruction {
          Pop => Opcodes::POP,
          Ret => Opcodes::RET,
          BrTrue(_) => Opcodes::BR_TRUE,
          BrFalse(_) => Opcodes::BR_FALSE,
          Branch(_) => Opcodes::BRANCH,
          LdU8(_) => Opcodes::LD_U8,
          LdU64(_) => Opcodes::LD_U64,
          LdU128(_) => Opcodes::LD_U128,
          CastU8 => Opcodes::CAST_U8,
          CastU64 => Opcodes::CAST_U64,
          CastU128 => Opcodes::CAST_U128,
          LdConst(_) => Opcodes::LD_CONST,
          LdTrue => Opcodes::LD_TRUE,
          LdFalse => Opcodes::LD_FALSE,
          CopyLoc(_) => Opcodes::COPY_LOC,
          MoveLoc(_) => Opcodes::MOVE_LOC,
          StLoc(_) => Opcodes::ST_LOC,
          Call(_) => Opcodes::CALL,
          CallGeneric(_) => Opcodes::CALL_GENERIC,
          Pack(_) => Opcodes::PACK,
          PackGeneric(_) => Opcodes::PACK_GENERIC,
          Unpack(_) => Opcodes::UNPACK,
          UnpackGeneric(_) => Opcodes::UNPACK_GENERIC,
          ReadRef => Opcodes::READ_REF,
          WriteRef => Opcodes::WRITE_REF,
          FreezeRef => Opcodes::FREEZE_REF,
          MutBorrowLoc(_) => Opcodes::MUT_BORROW_LOC,
          ImmBorrowLoc(_) => Opcodes::IMM_BORROW_LOC,
          MutBorrowField(_) => Opcodes::MUT_BORROW_FIELD,
          MutBorrowFieldGeneric(_) => Opcodes::MUT_BORROW_FIELD_GENERIC,
          ImmBorrowField(_) => Opcodes::IMM_BORROW_FIELD,
          ImmBorrowFieldGeneric(_) => Opcodes::IMM_BORROW_FIELD_GENERIC,
          Add => Opcodes::ADD,
          Sub => Opcodes::SUB,
          Mul => Opcodes::MUL,
          Mod => Opcodes::MOD,
          Div => Opcodes::DIV,
          BitOr => Opcodes::BIT_OR,
          BitAnd => Opcodes::BIT_AND,
          Xor => Opcodes::XOR,
          Shl => Opcodes::SHL,
          Shr => Opcodes::SHR,
          Or => Opcodes::OR,
          And => Opcodes::AND,
          Not => Opcodes::NOT,
          Eq => Opcodes::EQ,
          Neq => Opcodes::NEQ,
          Lt => Opcodes::LT,
          Gt => Opcodes::GT,
          Le => Opcodes::LE,
          Ge => Opcodes::GE,
          Abort => Opcodes::ABORT,
          Nop => Opcodes::NOP,
          VecPack(..) => Opcodes::VEC_PACK,
          VecLen(_) => Opcodes::VEC_LEN,
          VecImmBorrow(_) => Opcodes::VEC_IMM_BORROW,
          VecMutBorrow(_) => Opcodes::VEC_MUT_BORROW,
          VecPushBack(_) => Opcodes::VEC_PUSH_BACK,
          VecPopBack(_) => Opcodes::VEC_POP_BACK,
          VecUnpack(..) => Opcodes::VEC_UNPACK,
          VecSwap(_) => Opcodes::VEC_SWAP,
          LdU16(_) => Opcodes::LD_U16,
          LdU32(_) => Opcodes::LD_U32,
          LdU256(_) => Opcodes::LD_U256,
          CastU16 => Opcodes::CAST_U16,
          CastU32 => Opcodes::CAST_U32,
          CastU256 => Opcodes::CAST_U256,
          // ******** DEPRECATED BYTECODES ********
          ExistsDeprecated(_) => Opcodes::EXISTS_DEPRECATED,
          ExistsGenericDeprecated(_) => Opcodes::EXISTS_GENERIC_DEPRECATED,
          MoveFromDeprecated(_) => Opcodes::MOVE_FROM_DEPRECATED,
          MoveFromGenericDeprecated(_) => Opcodes::MOVE_FROM_GENERIC_DEPRECATED,
          MoveToDeprecated(_) => Opcodes::MOVE_TO_DEPRECATED,
          MoveToGenericDeprecated(_) => Opcodes::MOVE_TO_GENERIC_DEPRECATED,
          MutBorrowGlobalDeprecated(_) => Opcodes::MUT_BORROW_GLOBAL_DEPRECATED,
          MutBorrowGlobalGenericDeprecated(_) => Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED,
          ImmBorrowGlobalDeprecated(_) => Opcodes::IMM_BORROW_GLOBAL_DEPRECATED,
          ImmBorrowGlobalGenericDeprecated(_) => Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED,
      };
      opcode as u8
  }
  *)
  Definition instruction_key (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ instruction ] =>
      ltac:(M.monadic
        (let instruction := M.alloc (| instruction |) in
        M.read (|
          let~ opcode :=
            M.copy (|
              M.match_operator (|
                instruction,
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Pop"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::POP" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Ret"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::RET" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::BrTrue",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::BR_TRUE"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::BrFalse",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::BR_FALSE"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Branch",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::BRANCH"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdU8",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_U8"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdU64",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_U64"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdU128",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_U128"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CastU8"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CAST_U8"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CastU64"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CAST_U64"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CastU128"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CAST_U128"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdConst",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_CONST"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdTrue"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_TRUE"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdFalse"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_FALSE"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CopyLoc",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::COPY_LOC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MoveLoc",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MOVE_LOC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::StLoc",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::ST_LOC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Call",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::CALL" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CallGeneric",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CALL_GENERIC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Pack",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::PACK" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::PackGeneric",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::PACK_GENERIC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Unpack",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::UNPACK"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::UnpackGeneric",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::UNPACK_GENERIC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ReadRef"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::READ_REF"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::WriteRef"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::WRITE_REF"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::FreezeRef"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::FREEZE_REF"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MutBorrowLoc",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MUT_BORROW_LOC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ImmBorrowLoc",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::IMM_BORROW_LOC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MutBorrowField",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MutBorrowFieldGeneric",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD_GENERIC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ImmBorrowField",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ImmBorrowFieldGeneric",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD_GENERIC"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Add"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::ADD" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Sub"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::SUB" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Mul"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::MUL" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Mod"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::MOD" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Div"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::DIV" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::BitOr"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::BIT_OR"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::BitAnd"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::BIT_AND"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Xor"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::XOR" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Shl"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::SHL" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Shr"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::SHR" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Or"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::OR" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::And"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::AND" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Not"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::NOT" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Eq"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::EQ" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Neq"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::NEQ" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Lt"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::LT" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Gt"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::GT" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Le"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::LE" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Ge"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::GE" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Abort"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::ABORT"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::Nop"
                        |) in
                      M.alloc (|
                        Value.StructTuple "move_binary_format::file_format_common::Opcodes::NOP" []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecPack"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_PACK"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecLen",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_LEN"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecImmBorrow",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_IMM_BORROW"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecMutBorrow",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_MUT_BORROW"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecPushBack",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_PUSH_BACK"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecPopBack",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_POP_BACK"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecUnpack"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_UNPACK"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::VecSwap",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::VEC_SWAP"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdU16",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_U16"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdU32",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_U32"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::LdU256",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::LD_U256"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CastU16"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CAST_U16"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CastU32"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CAST_U32"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::file_format::Bytecode::CastU256"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::CAST_U256"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ExistsDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::EXISTS_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ExistsGenericDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::EXISTS_GENERIC_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MoveFromDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MOVE_FROM_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MoveFromGenericDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MOVE_FROM_GENERIC_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MoveToDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MOVE_TO_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MoveToGenericDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MOVE_TO_GENERIC_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MutBorrowGlobalDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::MutBorrowGlobalGenericDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ImmBorrowGlobalDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_DEPRECATED"
                          []
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::file_format::Bytecode::ImmBorrowGlobalGenericDeprecated",
                          0
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED"
                          []
                      |)))
                ]
              |)
            |) in
          M.alloc (| M.rust_cast (M.read (| opcode |)) |)
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_instruction_key :
    M.IsFunction "move_binary_format::file_format_common::instruction_key" instruction_key.
End file_format_common.
