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

Module deserializer.
  Module Impl_move_binary_format_file_format_CompiledModule.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format::CompiledModule".
    
    (*
        pub fn deserialize_with_defaults(binary: &[u8]) -> BinaryLoaderResult<Self> {
            Self::deserialize_with_config(binary, &BinaryConfig::with_extraneous_bytes_check(false))
        }
    *)
    Definition deserialize_with_defaults
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ binary ] =>
        ltac:(M.monadic
          (let binary := M.alloc (| binary |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "move_binary_format::file_format::CompiledModule",
              "deserialize_with_config",
              []
            |),
            [
              M.read (| binary |);
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "move_binary_format::binary_config::BinaryConfig",
                    "with_extraneous_bytes_check",
                    []
                  |),
                  [ Value.Bool false ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_deserialize_with_defaults :
      M.IsAssociatedFunction Self "deserialize_with_defaults" deserialize_with_defaults.
    
    (*
        pub fn deserialize_with_config(
            binary: &[u8],
            binary_config: &BinaryConfig,
        ) -> BinaryLoaderResult<Self> {
            let module = deserialize_compiled_module(binary, binary_config)?;
            BoundsChecker::verify_module(&module)?;
            Ok(module)
        }
    *)
    Definition deserialize_with_config (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ binary; binary_config ] =>
        ltac:(M.monadic
          (let binary := M.alloc (| binary |) in
          let binary_config := M.alloc (| binary_config |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ module :=
                  M.copy (|
                    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.path "move_binary_format::file_format::CompiledModule";
                                Ty.path "move_binary_format::errors::PartialVMError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "move_binary_format::deserializer::deserialize_compiled_module",
                                []
                              |),
                              [ M.read (| binary |); M.read (| binary_config |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        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
                                              "move_binary_format::file_format::CompiledModule";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ]
                                        ],
                                        "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~ _ :=
                  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 "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::check_bounds::BoundsChecker",
                              "verify_module",
                              []
                            |),
                            [ module ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::file_format::CompiledModule";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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 (| module |) ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_deserialize_with_config :
      M.IsAssociatedFunction Self "deserialize_with_config" deserialize_with_config.
    
    (*
        pub fn deserialize_no_check_bounds(binary: &[u8]) -> BinaryLoaderResult<Self> {
            deserialize_compiled_module(binary, &BinaryConfig::with_extraneous_bytes_check(false))
        }
    *)
    Definition deserialize_no_check_bounds
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ binary ] =>
        ltac:(M.monadic
          (let binary := M.alloc (| binary |) in
          M.call_closure (|
            M.get_function (|
              "move_binary_format::deserializer::deserialize_compiled_module",
              []
            |),
            [
              M.read (| binary |);
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "move_binary_format::binary_config::BinaryConfig",
                    "with_extraneous_bytes_check",
                    []
                  |),
                  [ Value.Bool false ]
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_deserialize_no_check_bounds :
      M.IsAssociatedFunction Self "deserialize_no_check_bounds" deserialize_no_check_bounds.
  End Impl_move_binary_format_file_format_CompiledModule.
  
  (* StructRecord
    {
      name := "Table";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("kind", Ty.path "move_binary_format::file_format_common::TableType");
          ("offset", Ty.path "u32");
          ("count", Ty.path "u32")
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_move_binary_format_deserializer_Table.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::Table".
    
    (* 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
          Value.StructRecord
            "move_binary_format::deserializer::Table"
            [
              ("kind",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.path "move_binary_format::file_format_common::TableType",
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "move_binary_format::deserializer::Table",
                      "kind"
                    |)
                  ]
                |));
              ("offset",
                M.call_closure (|
                  M.get_trait_method (| "core::clone::Clone", Ty.path "u32", [], "clone", [] |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "move_binary_format::deserializer::Table",
                      "offset"
                    |)
                  ]
                |));
              ("count",
                M.call_closure (|
                  M.get_trait_method (| "core::clone::Clone", Ty.path "u32", [], "clone", [] |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "move_binary_format::deserializer::Table",
                      "count"
                    |)
                  ]
                |))
            ]))
      | _, _, _ => 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_deserializer_Table.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_deserializer_Table.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::Table".
    
    (* 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_field3_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "Table" |);
              M.read (| Value.String "kind" |);
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::Table",
                "kind"
              |);
              M.read (| Value.String "offset" |);
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::Table",
                "offset"
              |);
              M.read (| Value.String "count" |);
              M.alloc (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "move_binary_format::deserializer::Table",
                  "count"
                |)
              |)
            ]
          |)))
      | _, _, _ => 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_deserializer_Table.
  
  Module Impl_move_binary_format_deserializer_Table.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::Table".
    
    (*
        fn new(kind: TableType, offset: u32, count: u32) -> Table {
            Table {
                kind,
                offset,
                count,
            }
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ kind; offset; count ] =>
        ltac:(M.monadic
          (let kind := M.alloc (| kind |) in
          let offset := M.alloc (| offset |) in
          let count := M.alloc (| count |) in
          Value.StructRecord
            "move_binary_format::deserializer::Table"
            [
              ("kind", M.read (| kind |));
              ("offset", M.read (| offset |));
              ("count", M.read (| count |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
  End Impl_move_binary_format_deserializer_Table.
  
  (*
  fn read_u16_internal(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u16> {
      let mut u16_bytes = [0; 2];
      cursor
          .read_exact(&mut u16_bytes)
          .map_err(|_| PartialVMError::new(StatusCode::BAD_U16))?;
      Ok(u16::from_le_bytes(u16_bytes))
  }
  *)
  Definition read_u16_internal (ε : 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~ u16_bytes :=
                M.alloc (|
                  repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 2 |)
                |) 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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::result::Result")
                              []
                              [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                            "map_err",
                            [
                              Ty.path "move_binary_format::errors::PartialVMError";
                              Ty.function
                                [ Ty.tuple [ Ty.path "std::io::error::Error" ] ]
                                (Ty.path "move_binary_format::errors::PartialVMError")
                            ]
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "std::io::Read",
                                Ty.path "move_binary_format::deserializer::VersionedCursor",
                                [],
                                "read_exact",
                                []
                              |),
                              [ M.read (| cursor |); u16_bytes ]
                            |);
                            M.closure
                              (fun γ =>
                                ltac:(M.monadic
                                  match γ with
                                  | [ α0 ] =>
                                    ltac:(M.monadic
                                      (M.match_operator (|
                                        M.alloc (| α0 |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::BAD_U16"
                                                    []
                                                ]
                                              |)))
                                        ]
                                      |)))
                                  | _ => M.impossible "wrong number of arguments"
                                  end))
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "u16";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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 "u16", "from_le_bytes", [] |),
                      [ M.read (| u16_bytes |) ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u16_internal :
    M.IsFunction "move_binary_format::deserializer::read_u16_internal" read_u16_internal.
  
  (*
  fn read_u32_internal(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u32> {
      let mut u32_bytes = [0; 4];
      cursor
          .read_exact(&mut u32_bytes)
          .map_err(|_| PartialVMError::new(StatusCode::BAD_U32))?;
      Ok(u32::from_le_bytes(u32_bytes))
  }
  *)
  Definition read_u32_internal (ε : 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~ u32_bytes :=
                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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::result::Result")
                              []
                              [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                            "map_err",
                            [
                              Ty.path "move_binary_format::errors::PartialVMError";
                              Ty.function
                                [ Ty.tuple [ Ty.path "std::io::error::Error" ] ]
                                (Ty.path "move_binary_format::errors::PartialVMError")
                            ]
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "std::io::Read",
                                Ty.path "move_binary_format::deserializer::VersionedCursor",
                                [],
                                "read_exact",
                                []
                              |),
                              [ M.read (| cursor |); u32_bytes ]
                            |);
                            M.closure
                              (fun γ =>
                                ltac:(M.monadic
                                  match γ with
                                  | [ α0 ] =>
                                    ltac:(M.monadic
                                      (M.match_operator (|
                                        M.alloc (| α0 |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::BAD_U32"
                                                    []
                                                ]
                                              |)))
                                        ]
                                      |)))
                                  | _ => M.impossible "wrong number of arguments"
                                  end))
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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 (| u32_bytes |) ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u32_internal :
    M.IsFunction "move_binary_format::deserializer::read_u32_internal" read_u32_internal.
  
  (*
  fn read_u64_internal(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u64> {
      let mut u64_bytes = [0; 8];
      cursor
          .read_exact(&mut u64_bytes)
          .map_err(|_| PartialVMError::new(StatusCode::BAD_U64))?;
      Ok(u64::from_le_bytes(u64_bytes))
  }
  *)
  Definition read_u64_internal (ε : 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~ u64_bytes :=
                M.alloc (|
                  repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 8 |)
                |) 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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::result::Result")
                              []
                              [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                            "map_err",
                            [
                              Ty.path "move_binary_format::errors::PartialVMError";
                              Ty.function
                                [ Ty.tuple [ Ty.path "std::io::error::Error" ] ]
                                (Ty.path "move_binary_format::errors::PartialVMError")
                            ]
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "std::io::Read",
                                Ty.path "move_binary_format::deserializer::VersionedCursor",
                                [],
                                "read_exact",
                                []
                              |),
                              [ M.read (| cursor |); u64_bytes ]
                            |);
                            M.closure
                              (fun γ =>
                                ltac:(M.monadic
                                  match γ with
                                  | [ α0 ] =>
                                    ltac:(M.monadic
                                      (M.match_operator (|
                                        M.alloc (| α0 |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::BAD_U64"
                                                    []
                                                ]
                                              |)))
                                        ]
                                      |)))
                                  | _ => M.impossible "wrong number of arguments"
                                  end))
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "u64";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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 "u64", "from_le_bytes", [] |),
                      [ M.read (| u64_bytes |) ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u64_internal :
    M.IsFunction "move_binary_format::deserializer::read_u64_internal" read_u64_internal.
  
  (*
  fn read_u128_internal(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u128> {
      let mut u128_bytes = [0; 16];
      cursor
          .read_exact(&mut u128_bytes)
          .map_err(|_| PartialVMError::new(StatusCode::BAD_U128))?;
      Ok(u128::from_le_bytes(u128_bytes))
  }
  *)
  Definition read_u128_internal (ε : 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~ u128_bytes :=
                M.alloc (|
                  repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 16 |)
                |) 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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::result::Result")
                              []
                              [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                            "map_err",
                            [
                              Ty.path "move_binary_format::errors::PartialVMError";
                              Ty.function
                                [ Ty.tuple [ Ty.path "std::io::error::Error" ] ]
                                (Ty.path "move_binary_format::errors::PartialVMError")
                            ]
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "std::io::Read",
                                Ty.path "move_binary_format::deserializer::VersionedCursor",
                                [],
                                "read_exact",
                                []
                              |),
                              [ M.read (| cursor |); u128_bytes ]
                            |);
                            M.closure
                              (fun γ =>
                                ltac:(M.monadic
                                  match γ with
                                  | [ α0 ] =>
                                    ltac:(M.monadic
                                      (M.match_operator (|
                                        M.alloc (| α0 |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::BAD_U128"
                                                    []
                                                ]
                                              |)))
                                        ]
                                      |)))
                                  | _ => M.impossible "wrong number of arguments"
                                  end))
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "u128";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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 "u128", "from_le_bytes", [] |),
                      [ M.read (| u128_bytes |) ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u128_internal :
    M.IsFunction "move_binary_format::deserializer::read_u128_internal" read_u128_internal.
  
  (*
  fn read_u256_internal(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<move_core_types::u256::U256> {
      let mut u256_bytes = [0; 32];
      cursor
          .read_exact(&mut u256_bytes)
          .map_err(|_| PartialVMError::new(StatusCode::BAD_U256))?;
      Ok(move_core_types::u256::U256::from_le_bytes(&u256_bytes))
  }
  *)
  Definition read_u256_internal (ε : 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~ u256_bytes :=
                M.alloc (|
                  repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 32 |)
                |) 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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::result::Result")
                              []
                              [ Ty.tuple []; Ty.path "std::io::error::Error" ],
                            "map_err",
                            [
                              Ty.path "move_binary_format::errors::PartialVMError";
                              Ty.function
                                [ Ty.tuple [ Ty.path "std::io::error::Error" ] ]
                                (Ty.path "move_binary_format::errors::PartialVMError")
                            ]
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "std::io::Read",
                                Ty.path "move_binary_format::deserializer::VersionedCursor",
                                [],
                                "read_exact",
                                []
                              |),
                              [ M.read (| cursor |); u256_bytes ]
                            |);
                            M.closure
                              (fun γ =>
                                ltac:(M.monadic
                                  match γ with
                                  | [ α0 ] =>
                                    ltac:(M.monadic
                                      (M.match_operator (|
                                        M.alloc (| α0 |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::BAD_U256"
                                                    []
                                                ]
                                              |)))
                                        ]
                                      |)))
                                  | _ => M.impossible "wrong number of arguments"
                                  end))
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "move_core_types::u256::U256";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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 "move_core_types::u256::U256",
                        "from_le_bytes",
                        []
                      |),
                      [ u256_bytes ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_u256_internal :
    M.IsFunction "move_binary_format::deserializer::read_u256_internal" read_u256_internal.
  
  (*
  fn read_uleb_internal<T>(cursor: &mut VersionedCursor, max: u64) -> BinaryLoaderResult<T>
  where
      u64: TryInto<T>,
  {
      let x = cursor.read_uleb128_as_u64().map_err(|_| {
          PartialVMError::new(StatusCode::MALFORMED).with_message("Bad Uleb".to_string())
      })?;
      if x > max {
          return Err(PartialVMError::new(StatusCode::MALFORMED)
              .with_message("Uleb greater than max requested".to_string()));
      }
  
      x.try_into().map_err(|_| {
          // TODO: review this status code.
          let msg = "Failed to convert u64 to target integer type. This should not happen. Is the maximum value correct?".to_string();
          PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR).with_message(msg)
      })
  }
  *)
  Definition read_uleb_internal (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [ T ], [ cursor; max ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        let max := M.alloc (| max |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ x :=
                M.copy (|
                  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.path "u64"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::result::Result")
                                []
                                [ Ty.path "u64"; Ty.path "anyhow::Error" ],
                              "map_err",
                              [
                                Ty.path "move_binary_format::errors::PartialVMError";
                                Ty.function
                                  [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                  (Ty.path "move_binary_format::errors::PartialVMError")
                              ]
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "move_binary_format::deserializer::VersionedCursor",
                                  "read_uleb128_as_u64",
                                  []
                                |),
                                [ M.read (| cursor |) ]
                              |);
                              M.closure
                                (fun γ =>
                                  ltac:(M.monadic
                                    match γ with
                                    | [ α0 ] =>
                                      ltac:(M.monadic
                                        (M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError",
                                                    "with_message",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError",
                                                        "new",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructTuple
                                                          "move_core_types::vm_status::StatusCode::MALFORMED"
                                                          []
                                                      ]
                                                    |);
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "alloc::string::ToString",
                                                        Ty.path "str",
                                                        [],
                                                        "to_string",
                                                        []
                                                      |),
                                                      [ M.read (| Value.String "Bad Uleb" |) ]
                                                    |)
                                                  ]
                                                |)))
                                          ]
                                        |)))
                                    | _ => M.impossible "wrong number of arguments"
                                    end))
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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")
                                        []
                                        [ T; Ty.path "move_binary_format::errors::PartialVMError" ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ _ :=
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use (M.alloc (| BinOp.gt (| M.read (| x |), M.read (| max |) |) |)) 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.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::errors::PartialVMError",
                                        "with_message",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "move_binary_format::errors::PartialVMError",
                                            "new",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "move_core_types::vm_status::StatusCode::MALFORMED"
                                              []
                                          ]
                                        |);
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "alloc::string::ToString",
                                            Ty.path "str",
                                            [],
                                            "to_string",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              Value.String "Uleb greater than max requested"
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  ]
                              |)
                            |)
                          |)
                        |)));
                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                  ]
                |) in
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply (Ty.path "core::result::Result") [] [ T; Ty.associated ],
                    "map_err",
                    [
                      Ty.path "move_binary_format::errors::PartialVMError";
                      Ty.function
                        [ Ty.tuple [ Ty.associated ] ]
                        (Ty.path "move_binary_format::errors::PartialVMError")
                    ]
                  |),
                  [
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::convert::TryInto",
                        Ty.path "u64",
                        [ T ],
                        "try_into",
                        []
                      |),
                      [ M.read (| x |) ]
                    |);
                    M.closure
                      (fun γ =>
                        ltac:(M.monadic
                          match γ with
                          | [ α0 ] =>
                            ltac:(M.monadic
                              (M.match_operator (|
                                M.alloc (| α0 |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (M.read (|
                                        let~ msg :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "alloc::string::ToString",
                                                Ty.path "str",
                                                [],
                                                "to_string",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  Value.String
                                                    "Failed to convert u64 to target integer type. This should not happen. Is the maximum value correct?"
                                                |)
                                              ]
                                            |)
                                          |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "move_binary_format::errors::PartialVMError",
                                              "with_message",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR"
                                                    []
                                                ]
                                              |);
                                              M.read (| msg |)
                                            ]
                                          |)
                                        |)
                                      |)))
                                ]
                              |)))
                          | _ => M.impossible "wrong number of arguments"
                          end))
                  ]
                |)
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_uleb_internal :
    M.IsFunction "move_binary_format::deserializer::read_uleb_internal" read_uleb_internal.
  
  (*
  fn load_signature_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<SignatureIndex> {
      Ok(SignatureIndex(read_uleb_internal(
          cursor,
          SIGNATURE_INDEX_MAX,
      )?))
  }
  *)
  Definition load_signature_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::SignatureIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::SIGNATURE_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::SignatureIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_signature_index :
    M.IsFunction "move_binary_format::deserializer::load_signature_index" load_signature_index.
  
  (*
  fn load_module_handle_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<ModuleHandleIndex> {
      Ok(ModuleHandleIndex(read_uleb_internal(
          cursor,
          MODULE_HANDLE_INDEX_MAX,
      )?))
  }
  *)
  Definition load_module_handle_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::ModuleHandleIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::MODULE_HANDLE_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::ModuleHandleIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_module_handle_index :
    M.IsFunction
      "move_binary_format::deserializer::load_module_handle_index"
      load_module_handle_index.
  
  (*
  fn load_identifier_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<IdentifierIndex> {
      Ok(IdentifierIndex(read_uleb_internal(
          cursor,
          IDENTIFIER_INDEX_MAX,
      )?))
  }
  *)
  Definition load_identifier_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::IdentifierIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::IDENTIFIER_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::IdentifierIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_identifier_index :
    M.IsFunction "move_binary_format::deserializer::load_identifier_index" load_identifier_index.
  
  (*
  fn load_struct_handle_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<StructHandleIndex> {
      Ok(StructHandleIndex(read_uleb_internal(
          cursor,
          STRUCT_HANDLE_INDEX_MAX,
      )?))
  }
  *)
  Definition load_struct_handle_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::StructHandleIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::STRUCT_HANDLE_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::StructHandleIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_handle_index :
    M.IsFunction
      "move_binary_format::deserializer::load_struct_handle_index"
      load_struct_handle_index.
  
  (*
  fn load_address_identifier_index(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<AddressIdentifierIndex> {
      Ok(AddressIdentifierIndex(read_uleb_internal(
          cursor,
          ADDRESS_INDEX_MAX,
      )?))
  }
  *)
  Definition load_address_identifier_index
      (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::AddressIdentifierIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::ADDRESS_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::AddressIdentifierIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_address_identifier_index :
    M.IsFunction
      "move_binary_format::deserializer::load_address_identifier_index"
      load_address_identifier_index.
  
  (*
  fn load_struct_def_index(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<StructDefinitionIndex> {
      Ok(StructDefinitionIndex(read_uleb_internal(
          cursor,
          STRUCT_DEF_INDEX_MAX,
      )?))
  }
  *)
  Definition load_struct_def_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::StructDefinitionIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::STRUCT_DEF_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::StructDefinitionIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_def_index :
    M.IsFunction "move_binary_format::deserializer::load_struct_def_index" load_struct_def_index.
  
  (*
  fn load_function_handle_index(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<FunctionHandleIndex> {
      Ok(FunctionHandleIndex(read_uleb_internal(
          cursor,
          FUNCTION_HANDLE_INDEX_MAX,
      )?))
  }
  *)
  Definition load_function_handle_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::FunctionHandleIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::FUNCTION_HANDLE_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::FunctionHandleIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_function_handle_index :
    M.IsFunction
      "move_binary_format::deserializer::load_function_handle_index"
      load_function_handle_index.
  
  (*
  fn load_field_handle_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<FieldHandleIndex> {
      Ok(FieldHandleIndex(read_uleb_internal(
          cursor,
          FIELD_HANDLE_INDEX_MAX,
      )?))
  }
  *)
  Definition load_field_handle_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::FieldHandleIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::FIELD_HANDLE_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::FieldHandleIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_handle_index :
    M.IsFunction
      "move_binary_format::deserializer::load_field_handle_index"
      load_field_handle_index.
  
  (*
  fn load_field_inst_index(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<FieldInstantiationIndex> {
      Ok(FieldInstantiationIndex(read_uleb_internal(
          cursor,
          FIELD_INST_INDEX_MAX,
      )?))
  }
  *)
  Definition load_field_inst_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::FieldInstantiationIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::FIELD_INST_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::FieldInstantiationIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_inst_index :
    M.IsFunction "move_binary_format::deserializer::load_field_inst_index" load_field_inst_index.
  
  (*
  fn load_function_inst_index(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<FunctionInstantiationIndex> {
      Ok(FunctionInstantiationIndex(read_uleb_internal(
          cursor,
          FUNCTION_INST_INDEX_MAX,
      )?))
  }
  *)
  Definition load_function_inst_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::FunctionInstantiationIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::FUNCTION_INST_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::FunctionInstantiationIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_function_inst_index :
    M.IsFunction
      "move_binary_format::deserializer::load_function_inst_index"
      load_function_inst_index.
  
  (*
  fn load_struct_def_inst_index(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<StructDefInstantiationIndex> {
      Ok(StructDefInstantiationIndex(read_uleb_internal(
          cursor,
          STRUCT_DEF_INST_INDEX_MAX,
      )?))
  }
  *)
  Definition load_struct_def_inst_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::StructDefInstantiationIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::STRUCT_DEF_INST_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::StructDefInstantiationIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_def_inst_index :
    M.IsFunction
      "move_binary_format::deserializer::load_struct_def_inst_index"
      load_struct_def_inst_index.
  
  (*
  fn load_constant_pool_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<ConstantPoolIndex> {
      Ok(ConstantPoolIndex(read_uleb_internal(
          cursor,
          CONSTANT_INDEX_MAX,
      )?))
  }
  *)
  Definition load_constant_pool_index (ε : 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
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                Value.StructTuple
                  "move_binary_format::file_format::ConstantPoolIndex"
                  [
                    M.read (|
                      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.path "u16";
                                  Ty.path "move_binary_format::errors::PartialVMError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_binary_format::deserializer::read_uleb_internal",
                                  [ Ty.path "u16" ]
                                |),
                                [
                                  M.read (| cursor |);
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::CONSTANT_INDEX_MAX"
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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
                                                "move_binary_format::file_format::ConstantPoolIndex";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ]
                                          ],
                                          "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))
                        ]
                      |)
                    |)
                  ]
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_constant_pool_index :
    M.IsFunction
      "move_binary_format::deserializer::load_constant_pool_index"
      load_constant_pool_index.
  
  (*
  fn load_bytecode_count(cursor: &mut VersionedCursor) -> BinaryLoaderResult<usize> {
      read_uleb_internal(cursor, BYTECODE_COUNT_MAX)
  }
  *)
  Definition load_bytecode_count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "usize" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::BYTECODE_COUNT_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_bytecode_count :
    M.IsFunction "move_binary_format::deserializer::load_bytecode_count" load_bytecode_count.
  
  (*
  fn load_bytecode_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u16> {
      read_uleb_internal(cursor, BYTECODE_INDEX_MAX)
  }
  *)
  Definition load_bytecode_index (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u16" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::BYTECODE_INDEX_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_bytecode_index :
    M.IsFunction "move_binary_format::deserializer::load_bytecode_index" load_bytecode_index.
  
  (*
  fn load_acquires_count(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u64> {
      read_uleb_internal(cursor, ACQUIRES_COUNT_MAX)
  }
  *)
  Definition load_acquires_count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u64" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::ACQUIRES_COUNT_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_acquires_count :
    M.IsFunction "move_binary_format::deserializer::load_acquires_count" load_acquires_count.
  
  (*
  fn load_field_count(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u64> {
      read_uleb_internal(cursor, FIELD_COUNT_MAX)
  }
  *)
  Definition load_field_count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u64" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::FIELD_COUNT_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_count :
    M.IsFunction "move_binary_format::deserializer::load_field_count" load_field_count.
  
  (*
  fn load_type_parameter_count(cursor: &mut VersionedCursor) -> BinaryLoaderResult<usize> {
      read_uleb_internal(cursor, TYPE_PARAMETER_COUNT_MAX)
  }
  *)
  Definition load_type_parameter_count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "usize" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (|
                "move_binary_format::file_format_common::TYPE_PARAMETER_COUNT_MAX"
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_type_parameter_count :
    M.IsFunction
      "move_binary_format::deserializer::load_type_parameter_count"
      load_type_parameter_count.
  
  (*
  fn load_signature_size(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u64> {
      read_uleb_internal(cursor, SIGNATURE_SIZE_MAX)
  }
  *)
  Definition load_signature_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u64" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::SIGNATURE_SIZE_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_signature_size :
    M.IsFunction "move_binary_format::deserializer::load_signature_size" load_signature_size.
  
  (*
  fn load_constant_size(cursor: &mut VersionedCursor) -> BinaryLoaderResult<usize> {
      read_uleb_internal(cursor, CONSTANT_SIZE_MAX)
  }
  *)
  Definition load_constant_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "usize" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::CONSTANT_SIZE_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_constant_size :
    M.IsFunction "move_binary_format::deserializer::load_constant_size" load_constant_size.
  
  (*
  fn load_metadata_key_size(cursor: &mut VersionedCursor) -> BinaryLoaderResult<usize> {
      read_uleb_internal(cursor, METADATA_KEY_SIZE_MAX)
  }
  *)
  Definition load_metadata_key_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "usize" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::METADATA_KEY_SIZE_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_metadata_key_size :
    M.IsFunction "move_binary_format::deserializer::load_metadata_key_size" load_metadata_key_size.
  
  (*
  fn load_metadata_value_size(cursor: &mut VersionedCursor) -> BinaryLoaderResult<usize> {
      read_uleb_internal(cursor, METADATA_VALUE_SIZE_MAX)
  }
  *)
  Definition load_metadata_value_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "usize" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::METADATA_VALUE_SIZE_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_metadata_value_size :
    M.IsFunction
      "move_binary_format::deserializer::load_metadata_value_size"
      load_metadata_value_size.
  
  (*
  fn load_identifier_size(cursor: &mut VersionedCursor) -> BinaryLoaderResult<usize> {
      read_uleb_internal(cursor, IDENTIFIER_SIZE_MAX)
  }
  *)
  Definition load_identifier_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "usize" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::IDENTIFIER_SIZE_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_identifier_size :
    M.IsFunction "move_binary_format::deserializer::load_identifier_size" load_identifier_size.
  
  (*
  fn load_type_parameter_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u16> {
      read_uleb_internal(cursor, TYPE_PARAMETER_INDEX_MAX)
  }
  *)
  Definition load_type_parameter_index (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u16" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (|
                "move_binary_format::file_format_common::TYPE_PARAMETER_INDEX_MAX"
              |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_type_parameter_index :
    M.IsFunction
      "move_binary_format::deserializer::load_type_parameter_index"
      load_type_parameter_index.
  
  (*
  fn load_field_offset(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u16> {
      read_uleb_internal(cursor, FIELD_OFFSET_MAX)
  }
  *)
  Definition load_field_offset (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u16" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::FIELD_OFFSET_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_offset :
    M.IsFunction "move_binary_format::deserializer::load_field_offset" load_field_offset.
  
  (*
  fn load_table_count(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u8> {
      read_uleb_internal(cursor, TABLE_COUNT_MAX)
  }
  *)
  Definition load_table_count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u8" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::TABLE_COUNT_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_table_count :
    M.IsFunction "move_binary_format::deserializer::load_table_count" load_table_count.
  
  (*
  fn load_table_offset(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u32> {
      read_uleb_internal(cursor, TABLE_OFFSET_MAX)
  }
  *)
  Definition load_table_offset (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u32" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::TABLE_OFFSET_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_table_offset :
    M.IsFunction "move_binary_format::deserializer::load_table_offset" load_table_offset.
  
  (*
  fn load_table_size(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u32> {
      read_uleb_internal(cursor, TABLE_SIZE_MAX)
  }
  *)
  Definition load_table_size (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u32" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::TABLE_SIZE_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_table_size :
    M.IsFunction "move_binary_format::deserializer::load_table_size" load_table_size.
  
  (*
  fn load_local_index(cursor: &mut VersionedCursor) -> BinaryLoaderResult<u8> {
      read_uleb_internal(cursor, LOCAL_INDEX_MAX)
  }
  *)
  Definition load_local_index (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        M.call_closure (|
          M.get_function (|
            "move_binary_format::deserializer::read_uleb_internal",
            [ Ty.path "u8" ]
          |),
          [
            M.read (| cursor |);
            M.read (|
              M.get_constant (| "move_binary_format::file_format_common::LOCAL_INDEX_MAX" |)
            |)
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_local_index :
    M.IsFunction "move_binary_format::deserializer::load_local_index" load_local_index.
  
  (*
  fn deserialize_compiled_module(
      binary: &[u8],
      binary_config: &BinaryConfig,
  ) -> BinaryLoaderResult<CompiledModule> {
      let versioned_binary = VersionedBinary::initialize(binary, binary_config, true)?;
      let version = versioned_binary.version();
      let self_module_handle_idx = versioned_binary.module_idx();
      let mut module = CompiledModule {
          version,
          self_module_handle_idx,
          ..Default::default()
      };
  
      build_compiled_module(&mut module, &versioned_binary, &versioned_binary.tables)?;
  
      let end_pos = versioned_binary.binary_end_offset();
      let had_remaining_bytes = end_pos < binary.len();
      if binary_config.check_no_extraneous_bytes && had_remaining_bytes {
          return Err(PartialVMError::new(StatusCode::TRAILING_BYTES));
      }
      Ok(module)
  }
  *)
  Definition deserialize_compiled_module
      (ε : list Value.t)
      (τ : list Ty.t)
      (α : list Value.t)
      : M :=
    match ε, τ, α with
    | [], [], [ binary; binary_config ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let binary_config := M.alloc (| binary_config |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ versioned_binary :=
                M.copy (|
                  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.path "move_binary_format::deserializer::VersionedBinary";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::deserializer::VersionedBinary",
                              "initialize",
                              []
                            |),
                            [ M.read (| binary |); M.read (| binary_config |); Value.Bool true ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::file_format::CompiledModule";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ version :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "version",
                      []
                    |),
                    [ versioned_binary ]
                  |)
                |) in
              let~ self_module_handle_idx :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "module_idx",
                      []
                    |),
                    [ versioned_binary ]
                  |)
                |) in
              let~ module :=
                M.alloc (|
                  M.struct_record_update
                    (M.call_closure (|
                      M.get_trait_method (|
                        "core::default::Default",
                        Ty.path "move_binary_format::file_format::CompiledModule",
                        [],
                        "default",
                        []
                      |),
                      []
                    |))
                    [
                      ("version", M.read (| version |));
                      ("self_module_handle_idx", M.read (| self_module_handle_idx |))
                    ]
                |) 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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_function (|
                            "move_binary_format::deserializer::build_compiled_module",
                            []
                          |),
                          [
                            module;
                            versioned_binary;
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  []
                                  [
                                    Ty.path "move_binary_format::deserializer::Table";
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  versioned_binary,
                                  "move_binary_format::deserializer::VersionedBinary",
                                  "tables"
                                |)
                              ]
                            |)
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "move_binary_format::file_format::CompiledModule";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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~ end_pos :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "binary_end_offset",
                      []
                    |),
                    [ versioned_binary ]
                  |)
                |) in
              let~ had_remaining_bytes :=
                M.alloc (|
                  BinOp.lt (|
                    M.read (| end_pos |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                        "len",
                        []
                      |),
                      [ M.read (| binary |) ]
                    |)
                  |)
                |) in
              let~ _ :=
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              LogicalOp.and (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| binary_config |),
                                    "move_binary_format::binary_config::BinaryConfig",
                                    "check_no_extraneous_bytes"
                                  |)
                                |),
                                ltac:(M.monadic (M.read (| had_remaining_bytes |)))
                              |)
                            |)) 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.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::errors::PartialVMError",
                                        "new",
                                        []
                                      |),
                                      [
                                        Value.StructTuple
                                          "move_core_types::vm_status::StatusCode::TRAILING_BYTES"
                                          []
                                      ]
                                    |)
                                  ]
                              |)
                            |)
                          |)
                        |)));
                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                  ]
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| module |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_deserialize_compiled_module :
    M.IsFunction
      "move_binary_format::deserializer::deserialize_compiled_module"
      deserialize_compiled_module.
  
  (*
  fn read_tables(
      cursor: &mut VersionedCursor,
      table_count: u8,
      tables: &mut Vec<Table>,
  ) -> BinaryLoaderResult<()> {
      for _count in 0..table_count {
          tables.push(read_table(cursor)?);
      }
      Ok(())
  }
  *)
  Definition read_tables (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor; table_count; tables ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        let table_count := M.alloc (| table_count |) in
        let tables := M.alloc (| tables |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "u8" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [
                              ("start", Value.Integer IntegerKind.U8 0);
                              ("end_", M.read (| table_count |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "u8" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let _count := M.copy (| γ0_0 |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::deserializer::Table";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                M.read (| tables |);
                                                M.read (|
                                                  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.path
                                                                "move_binary_format::deserializer::Table";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "move_binary_format::deserializer::read_table",
                                                              []
                                                            |),
                                                            [ M.read (| cursor |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_tables :
    M.IsFunction "move_binary_format::deserializer::read_tables" read_tables.
  
  (*
  fn read_table(cursor: &mut VersionedCursor) -> BinaryLoaderResult<Table> {
      let kind = match cursor.read_u8() {
          Ok(kind) => kind,
          Err(_) => {
              return Err(PartialVMError::new(StatusCode::MALFORMED)
                  .with_message("Error reading table".to_string()))
          }
      };
      let table_offset = load_table_offset(cursor)?;
      let count = load_table_size(cursor)?;
      Ok(Table::new(TableType::from_u8(kind)?, table_offset, count))
  }
  *)
  Definition read_table (ε : 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~ kind :=
                M.copy (|
                  M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "move_binary_format::deserializer::VersionedCursor",
                          "read_u8",
                          []
                        |),
                        [ M.read (| cursor |) ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let kind := M.copy (| γ0_0 |) in
                          kind));
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Err",
                              0
                            |) in
                          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 "move_binary_format::errors::PartialVMError",
                                          "with_message",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "move_binary_format::errors::PartialVMError",
                                              "new",
                                              []
                                            |),
                                            [
                                              Value.StructTuple
                                                "move_core_types::vm_status::StatusCode::MALFORMED"
                                                []
                                            ]
                                          |);
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "alloc::string::ToString",
                                              Ty.path "str",
                                              [],
                                              "to_string",
                                              []
                                            |),
                                            [ M.read (| Value.String "Error reading table" |) ]
                                          |)
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)))
                    ]
                  |)
                |) in
              let~ table_offset :=
                M.copy (|
                  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.path "u32"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_table_offset",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::deserializer::Table";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ count :=
                M.copy (|
                  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.path "u32"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_table_size",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::deserializer::Table";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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 "move_binary_format::deserializer::Table",
                        "new",
                        []
                      |),
                      [
                        M.read (|
                          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.path "move_binary_format::file_format_common::TableType";
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "move_binary_format::file_format_common::TableType",
                                      "from_u8",
                                      []
                                    |),
                                    [ M.read (| kind |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              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 "move_binary_format::deserializer::Table";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ]
                                              ],
                                              "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))
                            ]
                          |)
                        |);
                        M.read (| table_offset |);
                        M.read (| count |)
                      ]
                    |)
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_read_table :
    M.IsFunction "move_binary_format::deserializer::read_table" read_table.
  
  (*
  fn check_tables(tables: &mut Vec<Table>, binary_len: usize) -> BinaryLoaderResult<u32> {
      // there is no real reason to pass a mutable reference but we are sorting next line
      tables.sort_by(|t1, t2| t1.offset.cmp(&t2.offset));
  
      let mut current_offset: u32 = 0;
      let mut table_types = HashSet::new();
      for table in tables {
          if table.offset != current_offset {
              return Err(PartialVMError::new(StatusCode::BAD_HEADER_TABLE));
          }
          if table.count == 0 {
              return Err(PartialVMError::new(StatusCode::BAD_HEADER_TABLE));
          }
          match current_offset.checked_add(table.count) {
              Some(checked_offset) => current_offset = checked_offset,
              None => return Err(PartialVMError::new(StatusCode::BAD_HEADER_TABLE)),
          }
          if !table_types.insert(table.kind) {
              return Err(PartialVMError::new(StatusCode::DUPLICATE_TABLE));
          }
          if current_offset as usize > binary_len {
              return Err(PartialVMError::new(StatusCode::BAD_HEADER_TABLE));
          }
      }
      Ok(current_offset)
  }
  *)
  Definition check_tables (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ tables; binary_len ] =>
      ltac:(M.monadic
        (let tables := M.alloc (| tables |) in
        let binary_len := M.alloc (| binary_len |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ _ :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "slice")
                        []
                        [ Ty.path "move_binary_format::deserializer::Table" ],
                      "sort_by",
                      [
                        Ty.function
                          [
                            Ty.tuple
                              [
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.path "move_binary_format::deserializer::Table" ];
                                Ty.apply
                                  (Ty.path "&")
                                  []
                                  [ Ty.path "move_binary_format::deserializer::Table" ]
                              ]
                          ]
                          (Ty.path "core::cmp::Ordering")
                      ]
                    |),
                    [
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::ops::deref::DerefMut",
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            []
                            [
                              Ty.path "move_binary_format::deserializer::Table";
                              Ty.path "alloc::alloc::Global"
                            ],
                          [],
                          "deref_mut",
                          []
                        |),
                        [ M.read (| tables |) ]
                      |);
                      M.closure
                        (fun γ =>
                          ltac:(M.monadic
                            match γ with
                            | [ α0; α1 ] =>
                              ltac:(M.monadic
                                (M.match_operator (|
                                  M.alloc (| α0 |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let t1 := M.copy (| γ |) in
                                        M.match_operator (|
                                          M.alloc (| α1 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let t2 := M.copy (| γ |) in
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::cmp::Ord",
                                                    Ty.path "u32",
                                                    [],
                                                    "cmp",
                                                    []
                                                  |),
                                                  [
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.read (| t1 |),
                                                      "move_binary_format::deserializer::Table",
                                                      "offset"
                                                    |);
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.read (| t2 |),
                                                      "move_binary_format::deserializer::Table",
                                                      "offset"
                                                    |)
                                                  ]
                                                |)))
                                          ]
                                        |)))
                                  ]
                                |)))
                            | _ => M.impossible "wrong number of arguments"
                            end))
                    ]
                  |)
                |) in
              let~ current_offset := M.alloc (| Value.Integer IntegerKind.U32 0 |) in
              let~ table_types :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "std::collections::hash::set::HashSet")
                        []
                        [
                          Ty.path "move_binary_format::file_format_common::TableType";
                          Ty.path "std::hash::random::RandomState"
                        ],
                      "new",
                      []
                    |),
                    []
                  |)
                |) in
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply
                            (Ty.path "&mut")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [
                                  Ty.path "move_binary_format::deserializer::Table";
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ],
                          [],
                          "into_iter",
                          []
                        |),
                        [ M.read (| tables |) ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::slice::iter::IterMut")
                                          []
                                          [ Ty.path "move_binary_format::deserializer::Table" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let table := M.copy (| γ0_0 |) in
                                        let~ _ :=
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        BinOp.ne (|
                                                          M.read (|
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (| table |),
                                                              "move_binary_format::deserializer::Table",
                                                              "offset"
                                                            |)
                                                          |),
                                                          M.read (| current_offset |)
                                                        |)
                                                      |)) 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.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "new",
                                                                  []
                                                                |),
                                                                [
                                                                  Value.StructTuple
                                                                    "move_core_types::vm_status::StatusCode::BAD_HEADER_TABLE"
                                                                    []
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |) in
                                        let~ _ :=
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        BinOp.eq (|
                                                          M.read (|
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (| table |),
                                                              "move_binary_format::deserializer::Table",
                                                              "count"
                                                            |)
                                                          |),
                                                          Value.Integer IntegerKind.U32 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.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "new",
                                                                  []
                                                                |),
                                                                [
                                                                  Value.StructTuple
                                                                    "move_core_types::vm_status::StatusCode::BAD_HEADER_TABLE"
                                                                    []
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |) in
                                        let~ _ :=
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "u32",
                                                  "checked_add",
                                                  []
                                                |),
                                                [
                                                  M.read (| current_offset |);
                                                  M.read (|
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.read (| table |),
                                                      "move_binary_format::deserializer::Table",
                                                      "count"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::option::Option::Some",
                                                      0
                                                    |) in
                                                  let checked_offset := M.copy (| γ0_0 |) in
                                                  M.write (|
                                                    current_offset,
                                                    M.read (| checked_offset |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let _ :=
                                                    M.is_struct_tuple (|
                                                      γ,
                                                      "core::option::Option::None"
                                                    |) in
                                                  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
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "new",
                                                                  []
                                                                |),
                                                                [
                                                                  Value.StructTuple
                                                                    "move_core_types::vm_status::StatusCode::BAD_HEADER_TABLE"
                                                                    []
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)))
                                            ]
                                          |) in
                                        let~ _ :=
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        UnOp.not (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.apply
                                                                (Ty.path
                                                                  "std::collections::hash::set::HashSet")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "move_binary_format::file_format_common::TableType";
                                                                  Ty.path
                                                                    "std::hash::random::RandomState"
                                                                ],
                                                              "insert",
                                                              []
                                                            |),
                                                            [
                                                              table_types;
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (| table |),
                                                                  "move_binary_format::deserializer::Table",
                                                                  "kind"
                                                                |)
                                                              |)
                                                            ]
                                                          |)
                                                        |)
                                                      |)) 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.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "new",
                                                                  []
                                                                |),
                                                                [
                                                                  Value.StructTuple
                                                                    "move_core_types::vm_status::StatusCode::DUPLICATE_TABLE"
                                                                    []
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |) in
                                        M.match_operator (|
                                          M.alloc (| Value.Tuple [] |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ :=
                                                  M.use
                                                    (M.alloc (|
                                                      BinOp.gt (|
                                                        M.rust_cast (M.read (| current_offset |)),
                                                        M.read (| binary_len |)
                                                      |)
                                                    |)) 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.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.path
                                                                  "move_binary_format::errors::PartialVMError",
                                                                "new",
                                                                []
                                                              |),
                                                              [
                                                                Value.StructTuple
                                                                  "move_core_types::vm_status::StatusCode::BAD_HEADER_TABLE"
                                                                  []
                                                              ]
                                                            |)
                                                          ]
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                          ]
                                        |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (|
                Value.StructTuple "core::result::Result::Ok" [ M.read (| current_offset |) ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_check_tables :
    M.IsFunction "move_binary_format::deserializer::check_tables" check_tables.
  
  (* Trait *)
  (* Empty module 'CommonTables' *)
  
  Module Impl_move_binary_format_deserializer_CommonTables_for_move_binary_format_file_format_CompiledModule.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format::CompiledModule".
    
    (*
        fn get_module_handles(&mut self) -> &mut Vec<ModuleHandle> {
            &mut self.module_handles
        }
    *)
    Definition get_module_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "module_handles"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_struct_handles(&mut self) -> &mut Vec<StructHandle> {
            &mut self.struct_handles
        }
    *)
    Definition get_struct_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "struct_handles"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_function_handles(&mut self) -> &mut Vec<FunctionHandle> {
            &mut self.function_handles
        }
    *)
    Definition get_function_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "function_handles"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_function_instantiations(&mut self) -> &mut Vec<FunctionInstantiation> {
            &mut self.function_instantiations
        }
    *)
    Definition get_function_instantiations
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "function_instantiations"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_signatures(&mut self) -> &mut SignaturePool {
            &mut self.signatures
        }
    *)
    Definition get_signatures (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "signatures"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_identifiers(&mut self) -> &mut IdentifierPool {
            &mut self.identifiers
        }
    *)
    Definition get_identifiers (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "identifiers"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_address_identifiers(&mut self) -> &mut AddressIdentifierPool {
            &mut self.address_identifiers
        }
    *)
    Definition get_address_identifiers (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "address_identifiers"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_constant_pool(&mut self) -> &mut ConstantPool {
            &mut self.constant_pool
        }
    *)
    Definition get_constant_pool (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "constant_pool"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn get_metadata(&mut self) -> &mut Vec<Metadata> {
            &mut self.metadata
        }
    *)
    Definition get_metadata (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.SubPointer.get_struct_record_field (|
            M.read (| self |),
            "move_binary_format::file_format::CompiledModule",
            "metadata"
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "move_binary_format::deserializer::CommonTables"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("get_module_handles", InstanceField.Method get_module_handles);
          ("get_struct_handles", InstanceField.Method get_struct_handles);
          ("get_function_handles", InstanceField.Method get_function_handles);
          ("get_function_instantiations", InstanceField.Method get_function_instantiations);
          ("get_signatures", InstanceField.Method get_signatures);
          ("get_identifiers", InstanceField.Method get_identifiers);
          ("get_address_identifiers", InstanceField.Method get_address_identifiers);
          ("get_constant_pool", InstanceField.Method get_constant_pool);
          ("get_metadata", InstanceField.Method get_metadata)
        ].
  End Impl_move_binary_format_deserializer_CommonTables_for_move_binary_format_file_format_CompiledModule.
  
  (*
  fn build_compiled_module(
      module: &mut CompiledModule,
      binary: &VersionedBinary,
      tables: &[Table],
  ) -> BinaryLoaderResult<()> {
      build_common_tables(binary, tables, module)?;
      build_module_tables(binary, tables, module)?;
      Ok(())
  }
  *)
  Definition build_compiled_module (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ module; binary; tables ] =>
      ltac:(M.monadic
        (let module := M.alloc (| module |) in
        let binary := M.alloc (| binary |) in
        let tables := M.alloc (| tables |) in
        M.catch_return (|
          ltac:(M.monadic
            (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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_function (|
                            "move_binary_format::deserializer::build_common_tables",
                            [ Ty.path "move_binary_format::file_format::CompiledModule" ]
                          |),
                          [ M.read (| binary |); M.read (| tables |); M.read (| module |) ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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~ _ :=
                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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_function (|
                            "move_binary_format::deserializer::build_module_tables",
                            []
                          |),
                          [ M.read (| binary |); M.read (| tables |); M.read (| module |) ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_build_compiled_module :
    M.IsFunction "move_binary_format::deserializer::build_compiled_module" build_compiled_module.
  
  (*
  fn build_common_tables(
      binary: &VersionedBinary,
      tables: &[Table],
      common: &mut impl CommonTables,
  ) -> BinaryLoaderResult<()> {
      let TableConfig {
          // common tables
          module_handles: module_handles_max,
          struct_handles: struct_handles_max,
          function_handles: function_handles_max,
          function_instantiations: function_instantiations_max,
          signatures: signatures_max,
          constant_pool: constant_pool_max,
          identifiers: identifiers_max,
          address_identifiers: address_identifiers_max,
          // module tables
          struct_defs: _,
          struct_def_instantiations: _,
          function_defs: _,
          field_handles: _,
          field_instantiations: _,
          friend_decls: _,
      } = &binary.binary_config.table_config;
      for table in tables {
          // minimize code that checks limits with a local macro that knows the context (`table: &Table`)
          macro_rules! check_table_size {
              ($vec:expr, $max:expr) => {
                  if $vec.len() > $max as usize {
                      return Err(
                          PartialVMError::new(StatusCode::MALFORMED).with_message(format!(
                              "Exceeded size ({} > {})  in {:?}",
                              $vec.len(),
                              $max,
                              table.kind,
                          )),
                      );
                  }
              };
          }
  
          match table.kind {
              TableType::MODULE_HANDLES => {
                  let module_handles = common.get_module_handles();
                  load_module_handles(binary, table, module_handles)?;
                  check_table_size!(module_handles, *module_handles_max);
              }
              TableType::STRUCT_HANDLES => {
                  let struct_handles = common.get_struct_handles();
                  load_struct_handles(binary, table, struct_handles)?;
                  check_table_size!(struct_handles, *struct_handles_max);
              }
              TableType::FUNCTION_HANDLES => {
                  let function_handles = common.get_function_handles();
                  load_function_handles(binary, table, function_handles)?;
                  check_table_size!(function_handles, *function_handles_max);
              }
              TableType::FUNCTION_INST => {
                  let function_instantiations = common.get_function_instantiations();
                  load_function_instantiations(binary, table, function_instantiations)?;
                  check_table_size!(function_instantiations, *function_instantiations_max);
              }
              TableType::SIGNATURES => {
                  let signatures = common.get_signatures();
                  load_signatures(binary, table, signatures)?;
                  check_table_size!(signatures, *signatures_max);
              }
              TableType::CONSTANT_POOL => {
                  let constant_pool = common.get_constant_pool();
                  load_constant_pool(binary, table, constant_pool)?;
                  check_table_size!(constant_pool, *constant_pool_max);
              }
              TableType::METADATA => {
                  if binary.check_no_extraneous_bytes() || binary.version() < VERSION_5 {
                      return Err(
                          PartialVMError::new(StatusCode::MALFORMED).with_message(format!(
                              "metadata declarations not applicable in bytecode version {}",
                              binary.version()
                          )),
                      );
                  }
                  load_metadata(binary, table, common.get_metadata())?;
                  // we do not read metadata, nothing to check
              }
              TableType::IDENTIFIERS => {
                  let identifiers = common.get_identifiers();
                  load_identifiers(binary, table, identifiers)?;
                  check_table_size!(identifiers, *identifiers_max);
              }
              TableType::ADDRESS_IDENTIFIERS => {
                  let address_identifiers = common.get_address_identifiers();
                  load_address_identifiers(binary, table, address_identifiers)?;
                  check_table_size!(address_identifiers, *address_identifiers_max);
              }
              TableType::FUNCTION_DEFS
              | TableType::STRUCT_DEFS
              | TableType::STRUCT_DEF_INST
              | TableType::FIELD_HANDLE
              | TableType::FIELD_INST => (),
              TableType::FRIEND_DECLS => {
                  // friend declarations do not exist before VERSION_2
                  if binary.version() < VERSION_2 {
                      return Err(PartialVMError::new(StatusCode::MALFORMED).with_message(
                          "Friend declarations not applicable in bytecode version 1".to_string(),
                      ));
                  }
              }
          }
      }
      Ok(())
  }
  *)
  Definition build_common_tables (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [ impl_CommonTables ], [ binary; tables; common ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let tables := M.alloc (| tables |) in
        let common := M.alloc (| common |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              M.match_operator (|
                M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| binary |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "binary_config"
                      |)
                    |),
                    "move_binary_format::binary_config::BinaryConfig",
                    "table_config"
                  |)
                |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "module_handles"
                        |) in
                      let γ1_1 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "struct_handles"
                        |) in
                      let γ1_2 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "function_handles"
                        |) in
                      let γ1_3 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "function_instantiations"
                        |) in
                      let γ1_4 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "signatures"
                        |) in
                      let γ1_5 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "constant_pool"
                        |) in
                      let γ1_6 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "identifiers"
                        |) in
                      let γ1_7 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "address_identifiers"
                        |) in
                      let γ1_8 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "struct_defs"
                        |) in
                      let γ1_9 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "struct_def_instantiations"
                        |) in
                      let γ1_10 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "function_defs"
                        |) in
                      let γ1_11 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "field_handles"
                        |) in
                      let γ1_12 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "field_instantiations"
                        |) in
                      let γ1_13 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "friend_decls"
                        |) in
                      let module_handles_max := M.alloc (| γ1_0 |) in
                      let struct_handles_max := M.alloc (| γ1_1 |) in
                      let function_handles_max := M.alloc (| γ1_2 |) in
                      let function_instantiations_max := M.alloc (| γ1_3 |) in
                      let signatures_max := M.alloc (| γ1_4 |) in
                      let constant_pool_max := M.alloc (| γ1_5 |) in
                      let identifiers_max := M.alloc (| γ1_6 |) in
                      let address_identifiers_max := M.alloc (| γ1_7 |) in
                      let~ _ :=
                        M.use
                          (M.match_operator (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::traits::collect::IntoIterator",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "slice")
                                        []
                                        [ Ty.path "move_binary_format::deserializer::Table" ]
                                    ],
                                  [],
                                  "into_iter",
                                  []
                                |),
                                [ M.read (| tables |) ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let iter := M.copy (| γ |) in
                                  M.loop (|
                                    ltac:(M.monadic
                                      (let~ _ :=
                                        M.match_operator (|
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::iter::traits::iterator::Iterator",
                                                Ty.apply
                                                  (Ty.path "core::slice::iter::Iter")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::deserializer::Table"
                                                  ],
                                                [],
                                                "next",
                                                []
                                              |),
                                              [ iter ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let _ :=
                                                  M.is_struct_tuple (|
                                                    γ,
                                                    "core::option::Option::None"
                                                  |) in
                                                M.alloc (|
                                                  M.never_to_any (| M.read (| M.break (||) |) |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::option::Option::Some",
                                                    0
                                                  |) in
                                                let table := M.copy (| γ0_0 |) in
                                                M.match_operator (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| table |),
                                                    "move_binary_format::deserializer::Table",
                                                    "kind"
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::MODULE_HANDLES"
                                                          |) in
                                                        let~ module_handles :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_module_handles",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_module_handles",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (| module_handles |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::ModuleHandle";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                module_handles
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                module_handles_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::ModuleHandle";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      module_handles
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                module_handles_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::STRUCT_HANDLES"
                                                          |) in
                                                        let~ struct_handles :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_struct_handles",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_struct_handles",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (| struct_handles |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::StructHandle";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                struct_handles
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                struct_handles_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::StructHandle";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      struct_handles
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                struct_handles_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FUNCTION_HANDLES"
                                                          |) in
                                                        let~ function_handles :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_function_handles",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_function_handles",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (| function_handles |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::FunctionHandle";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                function_handles
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                function_handles_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::FunctionHandle";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      function_handles
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                function_handles_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FUNCTION_INST"
                                                          |) in
                                                        let~ function_instantiations :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_function_instantiations",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_function_instantiations",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (|
                                                                        function_instantiations
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::FunctionInstantiation";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                function_instantiations
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                function_instantiations_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::FunctionInstantiation";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      function_instantiations
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                function_instantiations_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::SIGNATURES"
                                                          |) in
                                                        let~ signatures :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_signatures",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_signatures",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (| signatures |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::Signature";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                signatures
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                signatures_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::Signature";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      signatures
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                signatures_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::CONSTANT_POOL"
                                                          |) in
                                                        let~ constant_pool :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_constant_pool",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_constant_pool",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (| constant_pool |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::Constant";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                constant_pool
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                constant_pool_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::Constant";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      constant_pool
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                constant_pool_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::METADATA"
                                                          |) in
                                                        let~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        LogicalOp.or (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.path
                                                                                "move_binary_format::deserializer::VersionedBinary",
                                                                              "check_no_extraneous_bytes",
                                                                              []
                                                                            |),
                                                                            [ M.read (| binary |) ]
                                                                          |),
                                                                          ltac:(M.monadic
                                                                            (BinOp.lt (|
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::deserializer::VersionedBinary",
                                                                                  "version",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.read (|
                                                                                    binary
                                                                                  |)
                                                                                ]
                                                                              |),
                                                                              M.read (|
                                                                                M.get_constant (|
                                                                                  "move_binary_format::file_format_common::VERSION_5"
                                                                                |)
                                                                              |)
                                                                            |)))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "metadata declarations not applicable in bytecode version "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    M.alloc (|
                                                                                                      Value.Array
                                                                                                        [
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u32"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.alloc (|
                                                                                                                M.call_closure (|
                                                                                                                  M.get_associated_function (|
                                                                                                                    Ty.path
                                                                                                                      "move_binary_format::deserializer::VersionedBinary",
                                                                                                                    "version",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      binary
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_metadata",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.call_closure (|
                                                                        M.get_trait_method (|
                                                                          "move_binary_format::deserializer::CommonTables",
                                                                          impl_CommonTables,
                                                                          [],
                                                                          "get_metadata",
                                                                          []
                                                                        |),
                                                                        [ M.read (| common |) ]
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::IDENTIFIERS"
                                                          |) in
                                                        let~ identifiers :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_identifiers",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_identifiers",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (| identifiers |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_core_types::identifier::Identifier";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                identifiers
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                identifiers_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_core_types::identifier::Identifier";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      identifiers
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                identifiers_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::ADDRESS_IDENTIFIERS"
                                                          |) in
                                                        let~ address_identifiers :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "move_binary_format::deserializer::CommonTables",
                                                                impl_CommonTables,
                                                                [],
                                                                "get_address_identifiers",
                                                                []
                                                              |),
                                                              [ M.read (| common |) ]
                                                            |)
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_address_identifiers",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.read (|
                                                                        address_identifiers
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_core_types::account_address::AccountAddress";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                address_identifiers
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                address_identifiers_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_core_types::account_address::AccountAddress";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.read (|
                                                                                                                      address_identifiers
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                address_identifiers_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.find_or_pattern (|
                                                          γ,
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::FUNCTION_DEFS"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::STRUCT_DEFS"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::STRUCT_DEF_INST"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::FIELD_HANDLE"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::FIELD_INST"
                                                                  |) in
                                                                Value.Tuple []))
                                                          ],
                                                          M.closure
                                                            (fun γ =>
                                                              ltac:(M.monadic
                                                                match γ with
                                                                | [] =>
                                                                  ltac:(M.monadic
                                                                    (M.alloc (| Value.Tuple [] |)))
                                                                | _ =>
                                                                  M.impossible
                                                                    "wrong number of arguments"
                                                                end))
                                                        |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FRIEND_DECLS"
                                                          |) in
                                                        M.match_operator (|
                                                          M.alloc (| Value.Tuple [] |),
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let γ :=
                                                                  M.use
                                                                    (M.alloc (|
                                                                      BinOp.lt (|
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.path
                                                                              "move_binary_format::deserializer::VersionedBinary",
                                                                            "version",
                                                                            []
                                                                          |),
                                                                          [ M.read (| binary |) ]
                                                                        |),
                                                                        M.read (|
                                                                          M.get_constant (|
                                                                            "move_binary_format::file_format_common::VERSION_2"
                                                                          |)
                                                                        |)
                                                                      |)
                                                                    |)) 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.call_closure (|
                                                                              M.get_associated_function (|
                                                                                Ty.path
                                                                                  "move_binary_format::errors::PartialVMError",
                                                                                "with_message",
                                                                                []
                                                                              |),
                                                                              [
                                                                                M.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError",
                                                                                    "new",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    Value.StructTuple
                                                                                      "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                      []
                                                                                  ]
                                                                                |);
                                                                                M.call_closure (|
                                                                                  M.get_trait_method (|
                                                                                    "alloc::string::ToString",
                                                                                    Ty.path "str",
                                                                                    [],
                                                                                    "to_string",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    M.read (|
                                                                                      Value.String
                                                                                        "Friend declarations not applicable in bytecode version 1"
                                                                                    |)
                                                                                  ]
                                                                                |)
                                                                              ]
                                                                            |)
                                                                          ]
                                                                      |)
                                                                    |)
                                                                  |)
                                                                |)));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (M.alloc (| Value.Tuple [] |)))
                                                          ]
                                                        |)))
                                                  ]
                                                |)))
                                          ]
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                  |)))
                            ]
                          |)) in
                      M.alloc (|
                        Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_build_common_tables :
    M.IsFunction "move_binary_format::deserializer::build_common_tables" build_common_tables.
  
  (*
  fn build_module_tables(
      binary: &VersionedBinary,
      tables: &[Table],
      module: &mut CompiledModule,
  ) -> BinaryLoaderResult<()> {
      let TableConfig {
          // common tables
          module_handles: _,
          struct_handles: _,
          function_handles: _,
          function_instantiations: _,
          signatures: _,
          constant_pool: _,
          identifiers: _,
          address_identifiers: _,
          // module tables
          struct_defs: struct_defs_max,
          struct_def_instantiations: struct_def_instantiations_max,
          function_defs: function_defs_max,
          field_handles: field_handles_max,
          field_instantiations: field_instantiations_max,
          friend_decls: friend_decls_max,
      } = &binary.binary_config.table_config;
      for table in tables {
          // minimize code that checks limits bu a local macro that know the context
          macro_rules! check_table_size {
              ($vec:expr, $max:expr) => {
                  if $vec.len() > $max as usize {
                      return Err(
                          PartialVMError::new(StatusCode::MALFORMED).with_message(format!(
                              "Exceeded size ({} > {})  in {:?}",
                              $vec.len(),
                              $max,
                              table.kind,
                          )),
                      );
                  }
              };
          }
  
          match table.kind {
              TableType::STRUCT_DEFS => {
                  load_struct_defs(binary, table, &mut module.struct_defs)?;
                  check_table_size!(&module.struct_defs, *struct_defs_max);
              }
              TableType::STRUCT_DEF_INST => {
                  load_struct_instantiations(binary, table, &mut module.struct_def_instantiations)?;
                  check_table_size!(
                      &module.struct_def_instantiations,
                      *struct_def_instantiations_max
                  );
              }
              TableType::FUNCTION_DEFS => {
                  load_function_defs(binary, table, &mut module.function_defs)?;
                  check_table_size!(&module.function_defs, *function_defs_max);
              }
              TableType::FIELD_HANDLE => {
                  load_field_handles(binary, table, &mut module.field_handles)?;
                  check_table_size!(&module.field_handles, *field_handles_max);
              }
              TableType::FIELD_INST => {
                  load_field_instantiations(binary, table, &mut module.field_instantiations)?;
                  check_table_size!(&module.field_instantiations, *field_instantiations_max);
              }
              TableType::FRIEND_DECLS => {
                  load_module_handles(binary, table, &mut module.friend_decls)?;
                  check_table_size!(&module.friend_decls, *friend_decls_max);
              }
              TableType::MODULE_HANDLES
              | TableType::STRUCT_HANDLES
              | TableType::FUNCTION_HANDLES
              | TableType::FUNCTION_INST
              | TableType::IDENTIFIERS
              | TableType::ADDRESS_IDENTIFIERS
              | TableType::CONSTANT_POOL
              | TableType::METADATA
              | TableType::SIGNATURES => (),
          }
      }
      Ok(())
  }
  *)
  Definition build_module_tables (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; tables; module ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let tables := M.alloc (| tables |) in
        let module := M.alloc (| module |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              M.match_operator (|
                M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| binary |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "binary_config"
                      |)
                    |),
                    "move_binary_format::binary_config::BinaryConfig",
                    "table_config"
                  |)
                |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "module_handles"
                        |) in
                      let γ1_1 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "struct_handles"
                        |) in
                      let γ1_2 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "function_handles"
                        |) in
                      let γ1_3 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "function_instantiations"
                        |) in
                      let γ1_4 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "signatures"
                        |) in
                      let γ1_5 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "constant_pool"
                        |) in
                      let γ1_6 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "identifiers"
                        |) in
                      let γ1_7 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "address_identifiers"
                        |) in
                      let γ1_8 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "struct_defs"
                        |) in
                      let γ1_9 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "struct_def_instantiations"
                        |) in
                      let γ1_10 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "function_defs"
                        |) in
                      let γ1_11 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "field_handles"
                        |) in
                      let γ1_12 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "field_instantiations"
                        |) in
                      let γ1_13 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::binary_config::TableConfig",
                          "friend_decls"
                        |) in
                      let struct_defs_max := M.alloc (| γ1_8 |) in
                      let struct_def_instantiations_max := M.alloc (| γ1_9 |) in
                      let function_defs_max := M.alloc (| γ1_10 |) in
                      let field_handles_max := M.alloc (| γ1_11 |) in
                      let field_instantiations_max := M.alloc (| γ1_12 |) in
                      let friend_decls_max := M.alloc (| γ1_13 |) in
                      let~ _ :=
                        M.use
                          (M.match_operator (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::traits::collect::IntoIterator",
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "slice")
                                        []
                                        [ Ty.path "move_binary_format::deserializer::Table" ]
                                    ],
                                  [],
                                  "into_iter",
                                  []
                                |),
                                [ M.read (| tables |) ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let iter := M.copy (| γ |) in
                                  M.loop (|
                                    ltac:(M.monadic
                                      (let~ _ :=
                                        M.match_operator (|
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::iter::traits::iterator::Iterator",
                                                Ty.apply
                                                  (Ty.path "core::slice::iter::Iter")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::deserializer::Table"
                                                  ],
                                                [],
                                                "next",
                                                []
                                              |),
                                              [ iter ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let _ :=
                                                  M.is_struct_tuple (|
                                                    γ,
                                                    "core::option::Option::None"
                                                  |) in
                                                M.alloc (|
                                                  M.never_to_any (| M.read (| M.break (||) |) |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::option::Option::Some",
                                                    0
                                                  |) in
                                                let table := M.copy (| γ0_0 |) in
                                                M.match_operator (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| table |),
                                                    "move_binary_format::deserializer::Table",
                                                    "kind"
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::STRUCT_DEFS"
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_struct_defs",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (| module |),
                                                                        "move_binary_format::file_format::CompiledModule",
                                                                        "struct_defs"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::StructDefinition";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| module |),
                                                                                "move_binary_format::file_format::CompiledModule",
                                                                                "struct_defs"
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                struct_defs_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::StructDefinition";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                                      M.read (|
                                                                                                                        module
                                                                                                                      |),
                                                                                                                      "move_binary_format::file_format::CompiledModule",
                                                                                                                      "struct_defs"
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                struct_defs_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::STRUCT_DEF_INST"
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_struct_instantiations",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (| module |),
                                                                        "move_binary_format::file_format::CompiledModule",
                                                                        "struct_def_instantiations"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::StructDefInstantiation";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| module |),
                                                                                "move_binary_format::file_format::CompiledModule",
                                                                                "struct_def_instantiations"
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                struct_def_instantiations_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::StructDefInstantiation";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                                      M.read (|
                                                                                                                        module
                                                                                                                      |),
                                                                                                                      "move_binary_format::file_format::CompiledModule",
                                                                                                                      "struct_def_instantiations"
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                struct_def_instantiations_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FUNCTION_DEFS"
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_function_defs",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (| module |),
                                                                        "move_binary_format::file_format::CompiledModule",
                                                                        "function_defs"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::FunctionDefinition";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| module |),
                                                                                "move_binary_format::file_format::CompiledModule",
                                                                                "function_defs"
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                function_defs_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::FunctionDefinition";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                                      M.read (|
                                                                                                                        module
                                                                                                                      |),
                                                                                                                      "move_binary_format::file_format::CompiledModule",
                                                                                                                      "function_defs"
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                function_defs_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FIELD_HANDLE"
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_field_handles",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (| module |),
                                                                        "move_binary_format::file_format::CompiledModule",
                                                                        "field_handles"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::FieldHandle";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| module |),
                                                                                "move_binary_format::file_format::CompiledModule",
                                                                                "field_handles"
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                field_handles_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::FieldHandle";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                                      M.read (|
                                                                                                                        module
                                                                                                                      |),
                                                                                                                      "move_binary_format::file_format::CompiledModule",
                                                                                                                      "field_handles"
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                field_handles_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FIELD_INST"
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_field_instantiations",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (| module |),
                                                                        "move_binary_format::file_format::CompiledModule",
                                                                        "field_instantiations"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::FieldInstantiation";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| module |),
                                                                                "move_binary_format::file_format::CompiledModule",
                                                                                "field_instantiations"
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                field_instantiations_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::FieldInstantiation";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                                      M.read (|
                                                                                                                        module
                                                                                                                      |),
                                                                                                                      "move_binary_format::file_format::CompiledModule",
                                                                                                                      "field_instantiations"
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                field_instantiations_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let _ :=
                                                          M.is_struct_tuple (|
                                                            γ,
                                                            "move_binary_format::file_format_common::TableType::FRIEND_DECLS"
                                                          |) 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
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [],
                                                                  "branch",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_function (|
                                                                      "move_binary_format::deserializer::load_module_handles",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (| binary |);
                                                                      M.read (| table |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (| module |),
                                                                        "move_binary_format::file_format::CompiledModule",
                                                                        "friend_decls"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |),
                                                            [
                                                              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
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ],
                                                                              [
                                                                                Ty.apply
                                                                                  (Ty.path
                                                                                    "core::result::Result")
                                                                                  []
                                                                                  [
                                                                                    Ty.path
                                                                                      "core::convert::Infallible";
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError"
                                                                                  ]
                                                                              ],
                                                                              "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~ _ :=
                                                          M.match_operator (|
                                                            M.alloc (| Value.Tuple [] |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (let γ :=
                                                                    M.use
                                                                      (M.alloc (|
                                                                        BinOp.gt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "alloc::vec::Vec")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "move_binary_format::file_format::ModuleHandle";
                                                                                  Ty.path
                                                                                    "alloc::alloc::Global"
                                                                                ],
                                                                              "len",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| module |),
                                                                                "move_binary_format::file_format::CompiledModule",
                                                                                "friend_decls"
                                                                              |)
                                                                            ]
                                                                          |),
                                                                          M.rust_cast
                                                                            (M.read (|
                                                                              M.read (|
                                                                                friend_decls_max
                                                                              |)
                                                                            |))
                                                                        |)
                                                                      |)) 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.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "with_message",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.call_closure (|
                                                                                    M.get_associated_function (|
                                                                                      Ty.path
                                                                                        "move_binary_format::errors::PartialVMError",
                                                                                      "new",
                                                                                      []
                                                                                    |),
                                                                                    [
                                                                                      Value.StructTuple
                                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                        []
                                                                                    ]
                                                                                  |);
                                                                                  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
                                                                                                              "Exceeded size ("
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              " > "
                                                                                                          |);
                                                                                                          M.read (|
                                                                                                            Value.String
                                                                                                              ")  in "
                                                                                                          |)
                                                                                                        ]
                                                                                                    |);
                                                                                                    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.apply
                                                                                                                      (Ty.path
                                                                                                                        "alloc::vec::Vec")
                                                                                                                      []
                                                                                                                      [
                                                                                                                        Ty.path
                                                                                                                          "move_binary_format::file_format::ModuleHandle";
                                                                                                                        Ty.path
                                                                                                                          "alloc::alloc::Global"
                                                                                                                      ],
                                                                                                                    "len",
                                                                                                                    []
                                                                                                                  |),
                                                                                                                  [
                                                                                                                    M.SubPointer.get_struct_record_field (|
                                                                                                                      M.read (|
                                                                                                                        module
                                                                                                                      |),
                                                                                                                      "move_binary_format::file_format::CompiledModule",
                                                                                                                      "friend_decls"
                                                                                                                    |)
                                                                                                                  ]
                                                                                                                |)
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_display",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "u16"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.read (|
                                                                                                                friend_decls_max
                                                                                                              |)
                                                                                                            ]
                                                                                                          |);
                                                                                                          M.call_closure (|
                                                                                                            M.get_associated_function (|
                                                                                                              Ty.path
                                                                                                                "core::fmt::rt::Argument",
                                                                                                              "new_debug",
                                                                                                              [
                                                                                                                Ty.path
                                                                                                                  "move_binary_format::file_format_common::TableType"
                                                                                                              ]
                                                                                                            |),
                                                                                                            [
                                                                                                              M.SubPointer.get_struct_record_field (|
                                                                                                                M.read (|
                                                                                                                  table
                                                                                                                |),
                                                                                                                "move_binary_format::deserializer::Table",
                                                                                                                "kind"
                                                                                                              |)
                                                                                                            ]
                                                                                                          |)
                                                                                                        ]
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              ]
                                                                                            |)
                                                                                          |) in
                                                                                        res
                                                                                      |)
                                                                                    ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      |)
                                                                    |)
                                                                  |)));
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.find_or_pattern (|
                                                          γ,
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::MODULE_HANDLES"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::STRUCT_HANDLES"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::FUNCTION_HANDLES"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::FUNCTION_INST"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::IDENTIFIERS"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::ADDRESS_IDENTIFIERS"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::CONSTANT_POOL"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::METADATA"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::TableType::SIGNATURES"
                                                                  |) in
                                                                Value.Tuple []))
                                                          ],
                                                          M.closure
                                                            (fun γ =>
                                                              ltac:(M.monadic
                                                                match γ with
                                                                | [] =>
                                                                  ltac:(M.monadic
                                                                    (M.alloc (| Value.Tuple [] |)))
                                                                | _ =>
                                                                  M.impossible
                                                                    "wrong number of arguments"
                                                                end))
                                                        |)))
                                                  ]
                                                |)))
                                          ]
                                        |) in
                                      M.alloc (| Value.Tuple [] |)))
                                  |)))
                            ]
                          |)) in
                      M.alloc (|
                        Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_build_module_tables :
    M.IsFunction "move_binary_format::deserializer::build_module_tables" build_module_tables.
  
  (*
  fn load_module_handles(
      binary: &VersionedBinary,
      table: &Table,
      module_handles: &mut Vec<ModuleHandle>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < table.count as u64 {
          let address = load_address_identifier_index(&mut cursor)?;
          let name = load_identifier_index(&mut cursor)?;
          module_handles.push(ModuleHandle { address, name });
      }
      Ok(())
  }
  *)
  Definition load_module_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; module_handles ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let module_handles := M.alloc (| module_handles |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.rust_cast
                                      (M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| table |),
                                          "move_binary_format::deserializer::Table",
                                          "count"
                                        |)
                                      |))
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ address :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::AddressIdentifierIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_address_identifier_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ name :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::IdentifierIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_identifier_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::ModuleHandle";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| module_handles |);
                                    Value.StructRecord
                                      "move_binary_format::file_format::ModuleHandle"
                                      [
                                        ("address", M.read (| address |));
                                        ("name", M.read (| name |))
                                      ]
                                  ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_module_handles :
    M.IsFunction "move_binary_format::deserializer::load_module_handles" load_module_handles.
  
  (*
  fn load_struct_handles(
      binary: &VersionedBinary,
      table: &Table,
      struct_handles: &mut Vec<StructHandle>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < table.count as u64 {
          let module = load_module_handle_index(&mut cursor)?;
          let name = load_identifier_index(&mut cursor)?;
          let abilities = load_ability_set(&mut cursor, AbilitySetPosition::StructHandle)?;
          let type_parameters = load_struct_type_parameters(&mut cursor)?;
          struct_handles.push(StructHandle {
              module,
              name,
              abilities,
              type_parameters,
          });
      }
      Ok(())
  }
  *)
  Definition load_struct_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; struct_handles ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let struct_handles := M.alloc (| struct_handles |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.rust_cast
                                      (M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| table |),
                                          "move_binary_format::deserializer::Table",
                                          "count"
                                        |)
                                      |))
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ module :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::ModuleHandleIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_module_handle_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ name :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::IdentifierIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_identifier_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ abilities :=
                              M.copy (|
                                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.path "move_binary_format::file_format::AbilitySet";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_ability_set",
                                            []
                                          |),
                                          [
                                            cursor;
                                            Value.StructTuple
                                              "move_binary_format::deserializer::AbilitySetPosition::StructHandle"
                                              []
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ type_parameters :=
                              M.copy (|
                                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.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path
                                                  "move_binary_format::file_format::StructTypeParameter";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_struct_type_parameters",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::StructHandle";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| struct_handles |);
                                    Value.StructRecord
                                      "move_binary_format::file_format::StructHandle"
                                      [
                                        ("module", M.read (| module |));
                                        ("name", M.read (| name |));
                                        ("abilities", M.read (| abilities |));
                                        ("type_parameters", M.read (| type_parameters |))
                                      ]
                                  ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_handles :
    M.IsFunction "move_binary_format::deserializer::load_struct_handles" load_struct_handles.
  
  (*
  fn load_function_handles(
      binary: &VersionedBinary,
      table: &Table,
      function_handles: &mut Vec<FunctionHandle>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < table.count as u64 {
          let module = load_module_handle_index(&mut cursor)?;
          let name = load_identifier_index(&mut cursor)?;
          let parameters = load_signature_index(&mut cursor)?;
          let return_ = load_signature_index(&mut cursor)?;
          let type_parameters =
              load_ability_sets(&mut cursor, AbilitySetPosition::FunctionTypeParameters)?;
  
          function_handles.push(FunctionHandle {
              module,
              name,
              parameters,
              return_,
              type_parameters,
          });
      }
      Ok(())
  }
  *)
  Definition load_function_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; function_handles ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let function_handles := M.alloc (| function_handles |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.rust_cast
                                      (M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| table |),
                                          "move_binary_format::deserializer::Table",
                                          "count"
                                        |)
                                      |))
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ module :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::ModuleHandleIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_module_handle_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ name :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::IdentifierIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_identifier_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ parameters :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::SignatureIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_signature_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ return_ :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::SignatureIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_signature_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ type_parameters :=
                              M.copy (|
                                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.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path
                                                  "move_binary_format::file_format::AbilitySet";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_ability_sets",
                                            []
                                          |),
                                          [
                                            cursor;
                                            Value.StructTuple
                                              "move_binary_format::deserializer::AbilitySetPosition::FunctionTypeParameters"
                                              []
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::FunctionHandle";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| function_handles |);
                                    Value.StructRecord
                                      "move_binary_format::file_format::FunctionHandle"
                                      [
                                        ("module", M.read (| module |));
                                        ("name", M.read (| name |));
                                        ("parameters", M.read (| parameters |));
                                        ("return_", M.read (| return_ |));
                                        ("type_parameters", M.read (| type_parameters |))
                                      ]
                                  ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_function_handles :
    M.IsFunction "move_binary_format::deserializer::load_function_handles" load_function_handles.
  
  (*
  fn load_struct_instantiations(
      binary: &VersionedBinary,
      table: &Table,
      struct_insts: &mut Vec<StructDefInstantiation>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
  
      while cursor.position() < table.count as u64 {
          let def = load_struct_def_index(&mut cursor)?;
          let type_parameters = load_signature_index(&mut cursor)?;
          struct_insts.push(StructDefInstantiation {
              def,
              type_parameters,
          });
      }
      Ok(())
  }
  *)
  Definition load_struct_instantiations (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; struct_insts ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let struct_insts := M.alloc (| struct_insts |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.rust_cast
                                      (M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| table |),
                                          "move_binary_format::deserializer::Table",
                                          "count"
                                        |)
                                      |))
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ def :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::StructDefinitionIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_struct_def_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ type_parameters :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::SignatureIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_signature_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path
                                          "move_binary_format::file_format::StructDefInstantiation";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| struct_insts |);
                                    Value.StructRecord
                                      "move_binary_format::file_format::StructDefInstantiation"
                                      [
                                        ("def", M.read (| def |));
                                        ("type_parameters", M.read (| type_parameters |))
                                      ]
                                  ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_instantiations :
    M.IsFunction
      "move_binary_format::deserializer::load_struct_instantiations"
      load_struct_instantiations.
  
  (*
  fn load_function_instantiations(
      binary: &VersionedBinary,
      table: &Table,
      func_insts: &mut Vec<FunctionInstantiation>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < table.count as u64 {
          let handle = load_function_handle_index(&mut cursor)?;
          let type_parameters = load_signature_index(&mut cursor)?;
          func_insts.push(FunctionInstantiation {
              handle,
              type_parameters,
          });
      }
      Ok(())
  }
  *)
  Definition load_function_instantiations
      (ε : list Value.t)
      (τ : list Ty.t)
      (α : list Value.t)
      : M :=
    match ε, τ, α with
    | [], [], [ binary; table; func_insts ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let func_insts := M.alloc (| func_insts |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.rust_cast
                                      (M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| table |),
                                          "move_binary_format::deserializer::Table",
                                          "count"
                                        |)
                                      |))
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ handle :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::FunctionHandleIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_function_handle_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ type_parameters :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::SignatureIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_signature_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path
                                          "move_binary_format::file_format::FunctionInstantiation";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| func_insts |);
                                    Value.StructRecord
                                      "move_binary_format::file_format::FunctionInstantiation"
                                      [
                                        ("handle", M.read (| handle |));
                                        ("type_parameters", M.read (| type_parameters |))
                                      ]
                                  ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_function_instantiations :
    M.IsFunction
      "move_binary_format::deserializer::load_function_instantiations"
      load_function_instantiations.
  
  (*
  fn load_identifiers(
      binary: &VersionedBinary,
      table: &Table,
      identifiers: &mut IdentifierPool,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < u64::from(table.count) {
          let size = load_identifier_size(&mut cursor)?;
          let mut buffer: Vec<u8> = vec![0u8; size];
          if let Ok(count) = cursor.read(&mut buffer) {
              if count != size {
                  return Err(PartialVMError::new(StatusCode::MALFORMED)
                      .with_message("Bad Identifier pool size".to_string()));
              }
              let s = Identifier::from_utf8(buffer).map_err(|_| {
                  PartialVMError::new(StatusCode::MALFORMED)
                      .with_message("Invalid Identifier".to_string())
              })?;
              identifiers.push(s);
          }
      }
      Ok(())
  }
  *)
  Definition load_identifiers (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; identifiers ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let identifiers := M.alloc (| identifiers |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::convert::From",
                                        Ty.path "u64",
                                        [ Ty.path "u32" ],
                                        "from",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| table |),
                                            "move_binary_format::deserializer::Table",
                                            "count"
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ size :=
                              M.copy (|
                                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.path "usize";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_identifier_size",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ buffer :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (| "alloc::vec::from_elem", [ Ty.path "u8" ] |),
                                  [ Value.Integer IntegerKind.U8 0; M.read (| size |) ]
                                |)
                              |) in
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "std::io::Read",
                                            Ty.path
                                              "move_binary_format::deserializer::VersionedCursor",
                                            [],
                                            "read",
                                            []
                                          |),
                                          [
                                            cursor;
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::deref::DerefMut",
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                                [],
                                                "deref_mut",
                                                []
                                              |),
                                              [ buffer ]
                                            |)
                                          ]
                                        |)
                                      |) in
                                    let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::result::Result::Ok",
                                        0
                                      |) in
                                    let count := M.copy (| γ0_0 |) in
                                    let~ _ :=
                                      M.match_operator (|
                                        M.alloc (| Value.Tuple [] |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ :=
                                                M.use
                                                  (M.alloc (|
                                                    BinOp.ne (|
                                                      M.read (| count |),
                                                      M.read (| size |)
                                                    |)
                                                  |)) 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.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError",
                                                              "with_message",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "new",
                                                                  []
                                                                |),
                                                                [
                                                                  Value.StructTuple
                                                                    "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                    []
                                                                ]
                                                              |);
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "alloc::string::ToString",
                                                                  Ty.path "str",
                                                                  [],
                                                                  "to_string",
                                                                  []
                                                                |),
                                                                [
                                                                  M.read (|
                                                                    Value.String
                                                                      "Bad Identifier pool size"
                                                                  |)
                                                                ]
                                                              |)
                                                            ]
                                                          |)
                                                        ]
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                        ]
                                      |) in
                                    let~ s :=
                                      M.copy (|
                                        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.path
                                                      "move_core_types::identifier::Identifier";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path
                                                          "move_core_types::identifier::Identifier";
                                                        Ty.path "anyhow::Error"
                                                      ],
                                                    "map_err",
                                                    [
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError";
                                                      Ty.function
                                                        [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                                        (Ty.path
                                                          "move_binary_format::errors::PartialVMError")
                                                    ]
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "move_core_types::identifier::Identifier",
                                                        "from_utf8",
                                                        []
                                                      |),
                                                      [ M.read (| buffer |) ]
                                                    |);
                                                    M.closure
                                                      (fun γ =>
                                                        ltac:(M.monadic
                                                          match γ with
                                                          | [ α0 ] =>
                                                            ltac:(M.monadic
                                                              (M.match_operator (|
                                                                M.alloc (| α0 |),
                                                                [
                                                                  fun γ =>
                                                                    ltac:(M.monadic
                                                                      (M.call_closure (|
                                                                        M.get_associated_function (|
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError",
                                                                          "with_message",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError",
                                                                              "new",
                                                                              []
                                                                            |),
                                                                            [
                                                                              Value.StructTuple
                                                                                "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                []
                                                                            ]
                                                                          |);
                                                                          M.call_closure (|
                                                                            M.get_trait_method (|
                                                                              "alloc::string::ToString",
                                                                              Ty.path "str",
                                                                              [],
                                                                              "to_string",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.read (|
                                                                                Value.String
                                                                                  "Invalid Identifier"
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        ]
                                                                      |)))
                                                                ]
                                                              |)))
                                                          | _ =>
                                                            M.impossible "wrong number of arguments"
                                                          end))
                                                  ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            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
                                                                  "move_binary_format::errors::PartialVMError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError"
                                                                ]
                                                            ],
                                                            "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~ _ :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              []
                                              [
                                                Ty.path "move_core_types::identifier::Identifier";
                                                Ty.path "alloc::alloc::Global"
                                              ],
                                            "push",
                                            []
                                          |),
                                          [ M.read (| identifiers |); M.read (| s |) ]
                                        |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)));
                                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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_identifiers :
    M.IsFunction "move_binary_format::deserializer::load_identifiers" load_identifiers.
  
  (*
  fn load_address_identifiers(
      binary: &VersionedBinary,
      table: &Table,
      addresses: &mut AddressIdentifierPool,
  ) -> BinaryLoaderResult<()> {
      let mut start = table.offset as usize;
      if table.count as usize % AccountAddress::LENGTH != 0 {
          return Err(PartialVMError::new(StatusCode::MALFORMED)
              .with_message("Bad Address Identifier pool size".to_string()));
      }
      for _i in 0..table.count as usize / AccountAddress::LENGTH {
          let end_addr = start + AccountAddress::LENGTH;
          let address = binary.slice(start, end_addr).try_into();
          if address.is_err() {
              return Err(PartialVMError::new(StatusCode::MALFORMED)
                  .with_message("Invalid Address format".to_string()));
          }
          start = end_addr;
  
          addresses.push(address.unwrap());
      }
      Ok(())
  }
  *)
  Definition load_address_identifiers (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; addresses ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let addresses := M.alloc (| addresses |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ _ :=
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              BinOp.ne (|
                                BinOp.Wrap.rem (|
                                  M.rust_cast
                                    (M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| table |),
                                        "move_binary_format::deserializer::Table",
                                        "count"
                                      |)
                                    |)),
                                  M.read (|
                                    M.get_constant (| "move_core_types::account_address::LENGTH" |)
                                  |)
                                |),
                                Value.Integer IntegerKind.Usize 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.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::errors::PartialVMError",
                                        "with_message",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "move_binary_format::errors::PartialVMError",
                                            "new",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "move_core_types::vm_status::StatusCode::MALFORMED"
                                              []
                                          ]
                                        |);
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "alloc::string::ToString",
                                            Ty.path "str",
                                            [],
                                            "to_string",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              Value.String "Bad Address Identifier pool size"
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  ]
                              |)
                            |)
                          |)
                        |)));
                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                  ]
                |) in
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "usize" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [
                              ("start", Value.Integer IntegerKind.Usize 0);
                              ("end_",
                                BinOp.Wrap.div (|
                                  M.rust_cast
                                    (M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| table |),
                                        "move_binary_format::deserializer::Table",
                                        "count"
                                      |)
                                    |)),
                                  M.read (|
                                    M.get_constant (| "move_core_types::account_address::LENGTH" |)
                                  |)
                                |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "usize" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let _i := M.copy (| γ0_0 |) in
                                        let~ end_addr :=
                                          M.alloc (|
                                            BinOp.Wrap.add (|
                                              M.read (| start |),
                                              M.read (|
                                                M.get_constant (|
                                                  "move_core_types::account_address::LENGTH"
                                                |)
                                              |)
                                            |)
                                          |) in
                                        let~ address :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::convert::TryInto",
                                                Ty.apply
                                                  (Ty.path "&")
                                                  []
                                                  [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ]
                                                  ],
                                                [
                                                  Ty.path
                                                    "move_core_types::account_address::AccountAddress"
                                                ],
                                                "try_into",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::deserializer::VersionedBinary",
                                                    "slice",
                                                    []
                                                  |),
                                                  [
                                                    M.read (| binary |);
                                                    M.read (| start |);
                                                    M.read (| end_addr |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          |) 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::result::Result")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "move_core_types::account_address::AccountAddress";
                                                                Ty.path
                                                                  "move_core_types::account_address::AccountAddressParseError"
                                                              ],
                                                            "is_err",
                                                            []
                                                          |),
                                                          [ address ]
                                                        |)
                                                      |)) 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.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "with_message",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError",
                                                                      "new",
                                                                      []
                                                                    |),
                                                                    [
                                                                      Value.StructTuple
                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                        []
                                                                    ]
                                                                  |);
                                                                  M.call_closure (|
                                                                    M.get_trait_method (|
                                                                      "alloc::string::ToString",
                                                                      Ty.path "str",
                                                                      [],
                                                                      "to_string",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (|
                                                                        Value.String
                                                                          "Invalid Address format"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |) in
                                        let~ _ := M.write (| start, M.read (| end_addr |) |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_core_types::account_address::AccountAddress";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                M.read (| addresses |);
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path
                                                          "move_core_types::account_address::AccountAddress";
                                                        Ty.path
                                                          "move_core_types::account_address::AccountAddressParseError"
                                                      ],
                                                    "unwrap",
                                                    []
                                                  |),
                                                  [ M.read (| address |) ]
                                                |)
                                              ]
                                            |)
                                          |) in
                                        M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_address_identifiers :
    M.IsFunction
      "move_binary_format::deserializer::load_address_identifiers"
      load_address_identifiers.
  
  (*
  fn load_constant_pool(
      binary: &VersionedBinary,
      table: &Table,
      constants: &mut ConstantPool,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < u64::from(table.count) {
          constants.push(load_constant(&mut cursor)?)
      }
      Ok(())
  }
  *)
  Definition load_constant_pool (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; constants ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let constants := M.alloc (| constants |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::convert::From",
                                        Ty.path "u64",
                                        [ Ty.path "u32" ],
                                        "from",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| table |),
                                            "move_binary_format::deserializer::Table",
                                            "count"
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [
                                      Ty.path "move_binary_format::file_format::Constant";
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "push",
                                  []
                                |),
                                [
                                  M.read (| constants |);
                                  M.read (|
                                    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.path "move_binary_format::file_format::Constant";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "move_binary_format::deserializer::load_constant",
                                                []
                                              |),
                                              [ cursor ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ]
                                                        ],
                                                        "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))
                                      ]
                                    |)
                                  |)
                                ]
                              |)
                            |)));
                        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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_constant_pool :
    M.IsFunction "move_binary_format::deserializer::load_constant_pool" load_constant_pool.
  
  (*
  fn load_constant(cursor: &mut VersionedCursor) -> BinaryLoaderResult<Constant> {
      let type_ = load_signature_token(cursor)?;
      let data = load_byte_blob(cursor, load_constant_size)?;
      Ok(Constant { type_, data })
  }
  *)
  Definition load_constant (ε : 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~ type_ :=
                M.copy (|
                  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.path "move_binary_format::file_format::SignatureToken";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_signature_token",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::file_format::Constant";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ data :=
                M.copy (|
                  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.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ];
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_byte_blob",
                              [
                                Ty.function
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "move_binary_format::deserializer::VersionedCursor"
                                      ]
                                  ]
                                  (Ty.apply
                                    (Ty.path "core::result::Result")
                                    []
                                    [
                                      Ty.path "usize";
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ])
                              ]
                            |),
                            [
                              M.read (| cursor |);
                              M.get_function (|
                                "move_binary_format::deserializer::load_constant_size",
                                []
                              |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::file_format::Constant";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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"
                  [
                    Value.StructRecord
                      "move_binary_format::file_format::Constant"
                      [ ("type_", M.read (| type_ |)); ("data", M.read (| data |)) ]
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_constant :
    M.IsFunction "move_binary_format::deserializer::load_constant" load_constant.
  
  (*
  fn load_metadata(
      binary: &VersionedBinary,
      table: &Table,
      metadata: &mut Vec<Metadata>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < u64::from(table.count) {
          metadata.push(load_metadata_entry(&mut cursor)?)
      }
      Ok(())
  }
  *)
  Definition load_metadata (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; metadata ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let metadata := M.alloc (| metadata |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::convert::From",
                                        Ty.path "u64",
                                        [ Ty.path "u32" ],
                                        "from",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| table |),
                                            "move_binary_format::deserializer::Table",
                                            "count"
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    []
                                    [
                                      Ty.path "move_core_types::metadata::Metadata";
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "push",
                                  []
                                |),
                                [
                                  M.read (| metadata |);
                                  M.read (|
                                    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.path "move_core_types::metadata::Metadata";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "move_binary_format::deserializer::load_metadata_entry",
                                                []
                                              |),
                                              [ cursor ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ]
                                                        ],
                                                        "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))
                                      ]
                                    |)
                                  |)
                                ]
                              |)
                            |)));
                        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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_metadata :
    M.IsFunction "move_binary_format::deserializer::load_metadata" load_metadata.
  
  (*
  fn load_metadata_entry(cursor: &mut VersionedCursor) -> BinaryLoaderResult<Metadata> {
      let key = load_byte_blob(cursor, load_metadata_key_size)?;
      let value = load_byte_blob(cursor, load_metadata_value_size)?;
      Ok(Metadata { key, value })
  }
  *)
  Definition load_metadata_entry (ε : 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~ key :=
                M.copy (|
                  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.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ];
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_byte_blob",
                              [
                                Ty.function
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "move_binary_format::deserializer::VersionedCursor"
                                      ]
                                  ]
                                  (Ty.apply
                                    (Ty.path "core::result::Result")
                                    []
                                    [
                                      Ty.path "usize";
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ])
                              ]
                            |),
                            [
                              M.read (| cursor |);
                              M.get_function (|
                                "move_binary_format::deserializer::load_metadata_key_size",
                                []
                              |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_core_types::metadata::Metadata";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ value :=
                M.copy (|
                  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.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ];
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_byte_blob",
                              [
                                Ty.function
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "move_binary_format::deserializer::VersionedCursor"
                                      ]
                                  ]
                                  (Ty.apply
                                    (Ty.path "core::result::Result")
                                    []
                                    [
                                      Ty.path "usize";
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ])
                              ]
                            |),
                            [
                              M.read (| cursor |);
                              M.get_function (|
                                "move_binary_format::deserializer::load_metadata_value_size",
                                []
                              |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_core_types::metadata::Metadata";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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"
                  [
                    Value.StructRecord
                      "move_core_types::metadata::Metadata"
                      [ ("key", M.read (| key |)); ("value", M.read (| value |)) ]
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_metadata_entry :
    M.IsFunction "move_binary_format::deserializer::load_metadata_entry" load_metadata_entry.
  
  (*
  fn load_byte_blob(
      cursor: &mut VersionedCursor,
      size_loader: impl Fn(&mut VersionedCursor) -> BinaryLoaderResult<usize>,
  ) -> BinaryLoaderResult<Vec<u8>> {
      let size = size_loader(cursor)?;
      let mut data: Vec<u8> = vec![0u8; size];
      let count = cursor.read(&mut data).map_err(|_| {
          PartialVMError::new(StatusCode::MALFORMED)
              .with_message("Unexpected end of table".to_string())
      })?;
      if count != size {
          return Err(PartialVMError::new(StatusCode::MALFORMED)
              .with_message("Bad byte blob size".to_string()));
      }
      Ok(data)
  }
  *)
  Definition load_byte_blob (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [],
        [ impl_Fn__mut_VersionedCursor__arrow_BinaryLoaderResult_usize_ ],
        [ cursor; size_loader ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        let size_loader := M.alloc (| size_loader |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ size :=
                M.copy (|
                  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.path "usize"; Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::function::Fn",
                              impl_Fn__mut_VersionedCursor__arrow_BinaryLoaderResult_usize_,
                              [
                                Ty.tuple
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [ Ty.path "move_binary_format::deserializer::VersionedCursor"
                                      ]
                                  ]
                              ],
                              "call",
                              []
                            |),
                            [ size_loader; Value.Tuple [ M.read (| cursor |) ] ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ data :=
                M.alloc (|
                  M.call_closure (|
                    M.get_function (| "alloc::vec::from_elem", [ Ty.path "u8" ] |),
                    [ Value.Integer IntegerKind.U8 0; M.read (| size |) ]
                  |)
                |) in
              let~ count :=
                M.copy (|
                  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.path "usize"; Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::result::Result")
                                []
                                [ Ty.path "usize"; Ty.path "std::io::error::Error" ],
                              "map_err",
                              [
                                Ty.path "move_binary_format::errors::PartialVMError";
                                Ty.function
                                  [ Ty.tuple [ Ty.path "std::io::error::Error" ] ]
                                  (Ty.path "move_binary_format::errors::PartialVMError")
                              ]
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "std::io::Read",
                                  Ty.path "move_binary_format::deserializer::VersionedCursor",
                                  [],
                                  "read",
                                  []
                                |),
                                [
                                  M.read (| cursor |);
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::deref::DerefMut",
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        []
                                        [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                                      [],
                                      "deref_mut",
                                      []
                                    |),
                                    [ data ]
                                  |)
                                ]
                              |);
                              M.closure
                                (fun γ =>
                                  ltac:(M.monadic
                                    match γ with
                                    | [ α0 ] =>
                                      ltac:(M.monadic
                                        (M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError",
                                                    "with_message",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError",
                                                        "new",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructTuple
                                                          "move_core_types::vm_status::StatusCode::MALFORMED"
                                                          []
                                                      ]
                                                    |);
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "alloc::string::ToString",
                                                        Ty.path "str",
                                                        [],
                                                        "to_string",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          Value.String "Unexpected end of table"
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)))
                                          ]
                                        |)))
                                    | _ => M.impossible "wrong number of arguments"
                                    end))
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ _ :=
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (| BinOp.ne (| M.read (| count |), M.read (| size |) |) |)) 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.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::errors::PartialVMError",
                                        "with_message",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "move_binary_format::errors::PartialVMError",
                                            "new",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "move_core_types::vm_status::StatusCode::MALFORMED"
                                              []
                                          ]
                                        |);
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "alloc::string::ToString",
                                            Ty.path "str",
                                            [],
                                            "to_string",
                                            []
                                          |),
                                          [ M.read (| Value.String "Bad byte blob size" |) ]
                                        |)
                                      ]
                                    |)
                                  ]
                              |)
                            |)
                          |)
                        |)));
                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                  ]
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| data |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_byte_blob :
    M.IsFunction "move_binary_format::deserializer::load_byte_blob" load_byte_blob.
  
  (*
  fn load_signatures(
      binary: &VersionedBinary,
      table: &Table,
      signatures: &mut SignaturePool,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < u64::from(table.count) {
          signatures.push(Signature(load_signature_tokens(&mut cursor)?));
      }
      Ok(())
  }
  *)
  Definition load_signatures (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; signatures ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let signatures := M.alloc (| signatures |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::convert::From",
                                        Ty.path "u64",
                                        [ Ty.path "u32" ],
                                        "from",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| table |),
                                            "move_binary_format::deserializer::Table",
                                            "count"
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)
                                |)) 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 "move_binary_format::file_format::Signature";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| signatures |);
                                    Value.StructTuple
                                      "move_binary_format::file_format::Signature"
                                      [
                                        M.read (|
                                          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.apply
                                                        (Ty.path "alloc::vec::Vec")
                                                        []
                                                        [
                                                          Ty.path
                                                            "move_binary_format::file_format::SignatureToken";
                                                          Ty.path "alloc::alloc::Global"
                                                        ];
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_function (|
                                                      "move_binary_format::deserializer::load_signature_tokens",
                                                      []
                                                    |),
                                                    [ cursor ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              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
                                                                    "move_binary_format::errors::PartialVMError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ]
                                                              ],
                                                              "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.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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_signatures :
    M.IsFunction "move_binary_format::deserializer::load_signatures" load_signatures.
  
  (*
  fn load_signature_tokens(cursor: &mut VersionedCursor) -> BinaryLoaderResult<Vec<SignatureToken>> {
      let len = load_signature_size(cursor)?;
      let mut tokens = vec![];
      for _ in 0..len {
          tokens.push(load_signature_token(cursor)?);
      }
      Ok(tokens)
  }
  *)
  Definition load_signature_tokens (ε : 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~ len :=
                M.copy (|
                  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.path "u64"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_signature_size",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path
                                                "move_binary_format::file_format::SignatureToken";
                                              Ty.path "alloc::alloc::Global"
                                            ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ tokens :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [
                          Ty.path "move_binary_format::file_format::SignatureToken";
                          Ty.path "alloc::alloc::Global"
                        ],
                      "new",
                      []
                    |),
                    []
                  |)
                |) in
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "u64" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [ ("start", Value.Integer IntegerKind.U64 0); ("end_", M.read (| len |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "u64" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::SignatureToken";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                tokens;
                                                M.read (|
                                                  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.path
                                                                "move_binary_format::file_format::SignatureToken";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "move_binary_format::deserializer::load_signature_token",
                                                              []
                                                            |),
                                                            [ M.read (| cursor |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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.apply
                                                                            (Ty.path
                                                                              "alloc::vec::Vec")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "move_binary_format::file_format::SignatureToken";
                                                                              Ty.path
                                                                                "alloc::alloc::Global"
                                                                            ];
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| tokens |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_signature_tokens :
    M.IsFunction "move_binary_format::deserializer::load_signature_tokens" load_signature_tokens.
  
  (*
  fn load_signature_token(cursor: &mut VersionedCursor) -> BinaryLoaderResult<SignatureToken> {
      // The following algorithm works by storing partially constructed types on a stack.
      //
      // Example:
      //
      //     SignatureToken: `Foo<u8, Foo<u64, bool, Bar>, address>`
      //     Byte Stream:    Foo u8 Foo u64 bool Bar address
      //
      // Stack Transitions:
      //     []
      //     [Foo<?, ?, ?>]
      //     [Foo<?, ?, ?>, u8]
      //     [Foo<u8, ?, ?>]
      //     [Foo<u8, ?, ?>, Foo<?, ?, ?>]
      //     [Foo<u8, ?, ?>, Foo<?, ?, ?>, u64]
      //     [Foo<u8, ?, ?>, Foo<u64, ?, ?>]
      //     [Foo<u8, ?, ?>, Foo<u64, ?, ?>, bool]
      //     [Foo<u8, ?, ?>, Foo<u64, bool, ?>]
      //     [Foo<u8, ?, ?>, Foo<u64, bool, ?>, Bar]
      //     [Foo<u8, ?, ?>, Foo<u64, bool, Bar>]
      //     [Foo<u8, Foo<u64, bool, Bar>, ?>]
      //     [Foo<u8, Foo<u64, bool, Bar>, ?>, address]
      //     [Foo<u8, Foo<u64, bool, Bar>, address>]        (done)
  
      use SerializedType as S;
  
      enum TypeBuilder {
          Saturated(SignatureToken),
          Vector,
          Reference,
          MutableReference,
          StructInst {
              sh_idx: StructHandleIndex,
              arity: usize,
              ty_args: Vec<SignatureToken>,
          },
      }
  
      impl TypeBuilder {
          fn apply(self, tok: SignatureToken) -> Self {
              match self {
                  T::Vector => T::Saturated(SignatureToken::Vector(Box::new(tok))),
                  T::Reference => T::Saturated(SignatureToken::Reference(Box::new(tok))),
                  T::MutableReference => {
                      T::Saturated(SignatureToken::MutableReference(Box::new(tok)))
                  }
                  T::StructInst {
                      sh_idx,
                      arity,
                      mut ty_args,
                  } => {
                      ty_args.push(tok);
                      if ty_args.len() >= arity {
                          T::Saturated(SignatureToken::StructInstantiation(Box::new((
                              sh_idx, ty_args,
                          ))))
                      } else {
                          T::StructInst {
                              sh_idx,
                              arity,
                              ty_args,
                          }
                      }
                  }
                  _ => unreachable!("invalid type constructor application"),
              }
          }
  
          fn is_saturated(&self) -> bool {
              matches!(self, T::Saturated(_))
          }
  
          fn unwrap_saturated(self) -> SignatureToken {
              match self {
                  T::Saturated(tok) => tok,
                  _ => unreachable!("cannot unwrap unsaturated type constructor"),
              }
          }
      }
  
      use TypeBuilder as T;
  
      let mut read_next = || {
          if let Ok(byte) = cursor.read_u8() {
              match S::from_u8(byte)? {
                  S::U16 | S::U32 | S::U256 if (cursor.version() < VERSION_6) => {
                      return Err(
                          PartialVMError::new(StatusCode::MALFORMED).with_message(format!(
                              "u16, u32, u256 integers not supported in bytecode version {}",
                              cursor.version()
                          )),
                      );
                  }
                  _ => (),
              };
  
              Ok(match S::from_u8(byte)? {
                  S::BOOL => T::Saturated(SignatureToken::Bool),
                  S::U8 => T::Saturated(SignatureToken::U8),
                  S::U16 => T::Saturated(SignatureToken::U16),
                  S::U32 => T::Saturated(SignatureToken::U32),
                  S::U64 => T::Saturated(SignatureToken::U64),
                  S::U128 => T::Saturated(SignatureToken::U128),
                  S::U256 => T::Saturated(SignatureToken::U256),
                  S::ADDRESS => T::Saturated(SignatureToken::Address),
                  S::SIGNER => T::Saturated(SignatureToken::Signer),
                  S::VECTOR => T::Vector,
                  S::REFERENCE => T::Reference,
                  S::MUTABLE_REFERENCE => T::MutableReference,
                  S::STRUCT => {
                      let sh_idx = load_struct_handle_index(cursor)?;
                      T::Saturated(SignatureToken::Struct(sh_idx))
                  }
                  S::STRUCT_INST => {
                      let sh_idx = load_struct_handle_index(cursor)?;
                      let arity = load_type_parameter_count(cursor)?;
                      if arity == 0 {
                          return Err(PartialVMError::new(StatusCode::MALFORMED)
                              .with_message("Struct inst with arity 0".to_string()));
                      }
                      T::StructInst {
                          sh_idx,
                          arity,
                          ty_args: vec![],
                      }
                  }
                  S::TYPE_PARAMETER => {
                      let idx = load_type_parameter_index(cursor)?;
                      T::Saturated(SignatureToken::TypeParameter(idx))
                  }
              })
          } else {
              Err(PartialVMError::new(StatusCode::MALFORMED)
                  .with_message("Unexpected EOF".to_string()))
          }
      };
  
      let mut stack = match read_next()? {
          T::Saturated(tok) => return Ok(tok),
          t => vec![t],
      };
  
      loop {
          if stack.len() > SIGNATURE_TOKEN_DEPTH_MAX {
              return Err(PartialVMError::new(StatusCode::MALFORMED)
                  .with_message("Maximum recursion depth reached".to_string()));
          }
          if stack.last().unwrap().is_saturated() {
              let tok = stack.pop().unwrap().unwrap_saturated();
              match stack.pop() {
                  Some(t) => stack.push(t.apply(tok)),
                  None => return Ok(tok),
              }
          } else {
              stack.push(read_next()?)
          }
      }
  }
  *)
  Definition load_signature_token (ε : 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~ read_next :=
                M.alloc (|
                  M.closure
                    (fun γ =>
                      ltac:(M.monadic
                        match γ with
                        | [ α0 ] =>
                          ltac:(M.monadic
                            (M.match_operator (|
                              M.alloc (| α0 |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (M.read (|
                                      M.match_operator (|
                                        M.alloc (| Value.Tuple [] |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ :=
                                                M.alloc (|
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.path
                                                        "move_binary_format::deserializer::VersionedCursor",
                                                      "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~ _ :=
                                                M.match_operator (|
                                                  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.path
                                                                "move_binary_format::file_format_common::SerializedType";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path
                                                                "move_binary_format::file_format_common::SerializedType",
                                                              "from_u8",
                                                              []
                                                            |),
                                                            [ M.read (| byte |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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
                                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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))
                                                    ]
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.find_or_pattern (|
                                                          γ,
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::SerializedType::U16"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::SerializedType::U32"
                                                                  |) in
                                                                Value.Tuple []));
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let _ :=
                                                                  M.is_struct_tuple (|
                                                                    γ,
                                                                    "move_binary_format::file_format_common::SerializedType::U256"
                                                                  |) in
                                                                Value.Tuple []))
                                                          ],
                                                          M.closure
                                                            (fun γ =>
                                                              ltac:(M.monadic
                                                                match γ with
                                                                | [] =>
                                                                  ltac:(M.monadic
                                                                    (let γ :=
                                                                      M.alloc (|
                                                                        BinOp.lt (|
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.path
                                                                                "move_binary_format::deserializer::VersionedCursor",
                                                                              "version",
                                                                              []
                                                                            |),
                                                                            [ M.read (| cursor |) ]
                                                                          |),
                                                                          M.read (|
                                                                            M.get_constant (|
                                                                              "move_binary_format::file_format_common::VERSION_6"
                                                                            |)
                                                                          |)
                                                                        |)
                                                                      |) 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.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError",
                                                                                    "with_message",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    M.call_closure (|
                                                                                      M.get_associated_function (|
                                                                                        Ty.path
                                                                                          "move_binary_format::errors::PartialVMError",
                                                                                        "new",
                                                                                        []
                                                                                      |),
                                                                                      [
                                                                                        Value.StructTuple
                                                                                          "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                          []
                                                                                      ]
                                                                                    |);
                                                                                    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
                                                                                                                "u16, u32, u256 integers not supported in bytecode version "
                                                                                                            |)
                                                                                                          ]
                                                                                                      |);
                                                                                                      M.alloc (|
                                                                                                        Value.Array
                                                                                                          [
                                                                                                            M.call_closure (|
                                                                                                              M.get_associated_function (|
                                                                                                                Ty.path
                                                                                                                  "core::fmt::rt::Argument",
                                                                                                                "new_display",
                                                                                                                [
                                                                                                                  Ty.path
                                                                                                                    "u32"
                                                                                                                ]
                                                                                                              |),
                                                                                                              [
                                                                                                                M.alloc (|
                                                                                                                  M.call_closure (|
                                                                                                                    M.get_associated_function (|
                                                                                                                      Ty.path
                                                                                                                        "move_binary_format::deserializer::VersionedCursor",
                                                                                                                      "version",
                                                                                                                      []
                                                                                                                    |),
                                                                                                                    [
                                                                                                                      M.read (|
                                                                                                                        cursor
                                                                                                                      |)
                                                                                                                    ]
                                                                                                                  |)
                                                                                                                |)
                                                                                                              ]
                                                                                                            |)
                                                                                                          ]
                                                                                                      |)
                                                                                                    ]
                                                                                                  |)
                                                                                                ]
                                                                                              |)
                                                                                            |) in
                                                                                          res
                                                                                        |)
                                                                                      ]
                                                                                    |)
                                                                                  ]
                                                                                |)
                                                                              ]
                                                                          |)
                                                                        |)
                                                                      |)
                                                                    |)))
                                                                | _ =>
                                                                  M.impossible
                                                                    "wrong number of arguments"
                                                                end))
                                                        |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.alloc (| Value.Tuple [] |)))
                                                  ]
                                                |) in
                                              M.alloc (|
                                                Value.StructTuple
                                                  "core::result::Result::Ok"
                                                  [
                                                    M.read (|
                                                      M.match_operator (|
                                                        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.path
                                                                      "move_binary_format::file_format_common::SerializedType";
                                                                    Ty.path
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [],
                                                                "branch",
                                                                []
                                                              |),
                                                              [
                                                                M.call_closure (|
                                                                  M.get_associated_function (|
                                                                    Ty.path
                                                                      "move_binary_format::file_format_common::SerializedType",
                                                                    "from_u8",
                                                                    []
                                                                  |),
                                                                  [ M.read (| byte |) ]
                                                                |)
                                                              ]
                                                            |)
                                                          |),
                                                          [
                                                            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
                                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                                                Ty.path
                                                                                  "move_binary_format::errors::PartialVMError"
                                                                              ],
                                                                            [
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "core::result::Result")
                                                                                []
                                                                                [
                                                                                  Ty.path
                                                                                    "core::convert::Infallible";
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError"
                                                                                ]
                                                                            ],
                                                                            "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))
                                                          ]
                                                        |),
                                                        [
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::BOOL"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::Bool"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::U8"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::U8"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::U16"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::U16"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::U32"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::U32"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::U64"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::U64"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::U128"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::U128"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::U256"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::U256"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::ADDRESS"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::Address"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::SIGNER"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::Signer"
                                                                      []
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::VECTOR"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Vector"
                                                                  []
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::REFERENCE"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Reference"
                                                                  []
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::MUTABLE_REFERENCE"
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructTuple
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::MutableReference"
                                                                  []
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::STRUCT"
                                                                |) in
                                                              let~ sh_idx :=
                                                                M.copy (|
                                                                  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.path
                                                                                "move_binary_format::file_format::StructHandleIndex";
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError"
                                                                            ],
                                                                          [],
                                                                          "branch",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "move_binary_format::deserializer::load_struct_handle_index",
                                                                              []
                                                                            |),
                                                                            [ M.read (| cursor |) ]
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |),
                                                                    [
                                                                      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
                                                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                                                          Ty.path
                                                                                            "move_binary_format::errors::PartialVMError"
                                                                                        ],
                                                                                      [
                                                                                        Ty.apply
                                                                                          (Ty.path
                                                                                            "core::result::Result")
                                                                                          []
                                                                                          [
                                                                                            Ty.path
                                                                                              "core::convert::Infallible";
                                                                                            Ty.path
                                                                                              "move_binary_format::errors::PartialVMError"
                                                                                          ]
                                                                                      ],
                                                                                      "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
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::Struct"
                                                                      [ M.read (| sh_idx |) ]
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::STRUCT_INST"
                                                                |) in
                                                              let~ sh_idx :=
                                                                M.copy (|
                                                                  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.path
                                                                                "move_binary_format::file_format::StructHandleIndex";
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError"
                                                                            ],
                                                                          [],
                                                                          "branch",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "move_binary_format::deserializer::load_struct_handle_index",
                                                                              []
                                                                            |),
                                                                            [ M.read (| cursor |) ]
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |),
                                                                    [
                                                                      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
                                                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                                                          Ty.path
                                                                                            "move_binary_format::errors::PartialVMError"
                                                                                        ],
                                                                                      [
                                                                                        Ty.apply
                                                                                          (Ty.path
                                                                                            "core::result::Result")
                                                                                          []
                                                                                          [
                                                                                            Ty.path
                                                                                              "core::convert::Infallible";
                                                                                            Ty.path
                                                                                              "move_binary_format::errors::PartialVMError"
                                                                                          ]
                                                                                      ],
                                                                                      "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~ arity :=
                                                                M.copy (|
                                                                  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.path "usize";
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError"
                                                                            ],
                                                                          [],
                                                                          "branch",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "move_binary_format::deserializer::load_type_parameter_count",
                                                                              []
                                                                            |),
                                                                            [ M.read (| cursor |) ]
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |),
                                                                    [
                                                                      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
                                                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                                                          Ty.path
                                                                                            "move_binary_format::errors::PartialVMError"
                                                                                        ],
                                                                                      [
                                                                                        Ty.apply
                                                                                          (Ty.path
                                                                                            "core::result::Result")
                                                                                          []
                                                                                          [
                                                                                            Ty.path
                                                                                              "core::convert::Infallible";
                                                                                            Ty.path
                                                                                              "move_binary_format::errors::PartialVMError"
                                                                                          ]
                                                                                      ],
                                                                                      "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~ _ :=
                                                                M.match_operator (|
                                                                  M.alloc (| Value.Tuple [] |),
                                                                  [
                                                                    fun γ =>
                                                                      ltac:(M.monadic
                                                                        (let γ :=
                                                                          M.use
                                                                            (M.alloc (|
                                                                              BinOp.eq (|
                                                                                M.read (| arity |),
                                                                                Value.Integer
                                                                                  IntegerKind.Usize
                                                                                  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.call_closure (|
                                                                                      M.get_associated_function (|
                                                                                        Ty.path
                                                                                          "move_binary_format::errors::PartialVMError",
                                                                                        "with_message",
                                                                                        []
                                                                                      |),
                                                                                      [
                                                                                        M.call_closure (|
                                                                                          M.get_associated_function (|
                                                                                            Ty.path
                                                                                              "move_binary_format::errors::PartialVMError",
                                                                                            "new",
                                                                                            []
                                                                                          |),
                                                                                          [
                                                                                            Value.StructTuple
                                                                                              "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                              []
                                                                                          ]
                                                                                        |);
                                                                                        M.call_closure (|
                                                                                          M.get_trait_method (|
                                                                                            "alloc::string::ToString",
                                                                                            Ty.path
                                                                                              "str",
                                                                                            [],
                                                                                            "to_string",
                                                                                            []
                                                                                          |),
                                                                                          [
                                                                                            M.read (|
                                                                                              Value.String
                                                                                                "Struct inst with arity 0"
                                                                                            |)
                                                                                          ]
                                                                                        |)
                                                                                      ]
                                                                                    |)
                                                                                  ]
                                                                              |)
                                                                            |)
                                                                          |)
                                                                        |)));
                                                                    fun γ =>
                                                                      ltac:(M.monadic
                                                                        (M.alloc (|
                                                                          Value.Tuple []
                                                                        |)))
                                                                  ]
                                                                |) in
                                                              M.alloc (|
                                                                Value.StructRecord
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::StructInst"
                                                                  [
                                                                    ("sh_idx", M.read (| sh_idx |));
                                                                    ("arity", M.read (| arity |));
                                                                    ("ty_args",
                                                                      M.call_closure (|
                                                                        M.get_associated_function (|
                                                                          Ty.apply
                                                                            (Ty.path
                                                                              "alloc::vec::Vec")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "move_binary_format::file_format::SignatureToken";
                                                                              Ty.path
                                                                                "alloc::alloc::Global"
                                                                            ],
                                                                          "new",
                                                                          []
                                                                        |),
                                                                        []
                                                                      |))
                                                                  ]
                                                              |)));
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (let _ :=
                                                                M.is_struct_tuple (|
                                                                  γ,
                                                                  "move_binary_format::file_format_common::SerializedType::TYPE_PARAMETER"
                                                                |) in
                                                              let~ idx :=
                                                                M.copy (|
                                                                  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.path "u16";
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError"
                                                                            ],
                                                                          [],
                                                                          "branch",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "move_binary_format::deserializer::load_type_parameter_index",
                                                                              []
                                                                            |),
                                                                            [ M.read (| cursor |) ]
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |),
                                                                    [
                                                                      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
                                                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                                                          Ty.path
                                                                                            "move_binary_format::errors::PartialVMError"
                                                                                        ],
                                                                                      [
                                                                                        Ty.apply
                                                                                          (Ty.path
                                                                                            "core::result::Result")
                                                                                          []
                                                                                          [
                                                                                            Ty.path
                                                                                              "core::convert::Infallible";
                                                                                            Ty.path
                                                                                              "move_binary_format::errors::PartialVMError"
                                                                                          ]
                                                                                      ],
                                                                                      "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
                                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                                                  [
                                                                    Value.StructTuple
                                                                      "move_binary_format::file_format::SignatureToken::TypeParameter"
                                                                      [ M.read (| idx |) ]
                                                                  ]
                                                              |)))
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (M.alloc (|
                                                Value.StructTuple
                                                  "core::result::Result::Err"
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError",
                                                        "with_message",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError",
                                                            "new",
                                                            []
                                                          |),
                                                          [
                                                            Value.StructTuple
                                                              "move_core_types::vm_status::StatusCode::MALFORMED"
                                                              []
                                                          ]
                                                        |);
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "alloc::string::ToString",
                                                            Ty.path "str",
                                                            [],
                                                            "to_string",
                                                            []
                                                          |),
                                                          [
                                                            M.read (|
                                                              Value.String "Unexpected EOF"
                                                            |)
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                              |)))
                                        ]
                                      |)
                                    |)))
                              ]
                            |)))
                        | _ => M.impossible "wrong number of arguments"
                        end))
                |) in
              let~ stack :=
                M.copy (|
                  M.match_operator (|
                    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.path
                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                Ty.path "move_binary_format::errors::PartialVMError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::function::FnMut",
                                Ty.function
                                  [ Ty.tuple [] ]
                                  (Ty.apply
                                    (Ty.path "core::result::Result")
                                    []
                                    [
                                      Ty.path
                                        "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ]),
                                [ Ty.tuple [] ],
                                "call_mut",
                                []
                              |),
                              [ read_next; Value.Tuple [] ]
                            |)
                          ]
                        |)
                      |),
                      [
                        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
                                              "move_binary_format::file_format::SignatureToken";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ]
                                        ],
                                        "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))
                      ]
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated",
                              0
                            |) in
                          let tok := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple "core::result::Result::Ok" [ M.read (| tok |) ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let t := M.copy (| γ |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "slice")
                                  []
                                  [
                                    Ty.path
                                      "move_binary_format::deserializer::load_signature_token::TypeBuilder"
                                  ],
                                "into_vec",
                                [ Ty.path "alloc::alloc::Global" ]
                              |),
                              [
                                M.read (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::boxed::Box")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "array")
                                            [ Value.Integer IntegerKind.Usize 1 ]
                                            [
                                              Ty.path
                                                "move_binary_format::deserializer::load_signature_token::TypeBuilder"
                                            ];
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "new",
                                      []
                                    |),
                                    [ M.alloc (| Value.Array [ M.read (| t |) ] |) ]
                                  |)
                                |)
                              ]
                            |)
                          |)))
                    ]
                  |)
                |) in
              M.alloc (|
                M.never_to_any (|
                  M.read (|
                    M.loop (|
                      ltac:(M.monadic
                        (let~ _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        BinOp.gt (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path
                                                    "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                  Ty.path "alloc::alloc::Global"
                                                ],
                                              "len",
                                              []
                                            |),
                                            [ stack ]
                                          |),
                                          M.read (|
                                            M.get_constant (|
                                              "move_binary_format::file_format_common::SIGNATURE_TOKEN_DEPTH_MAX"
                                            |)
                                          |)
                                        |)
                                      |)) 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.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "with_message",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError",
                                                      "new",
                                                      []
                                                    |),
                                                    [
                                                      Value.StructTuple
                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                        []
                                                    ]
                                                  |);
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "alloc::string::ToString",
                                                      Ty.path "str",
                                                      [],
                                                      "to_string",
                                                      []
                                                    |),
                                                    [
                                                      M.read (|
                                                        Value.String
                                                          "Maximum recursion depth reached"
                                                      |)
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.use
                                    (M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder",
                                          "is_saturated",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    []
                                                    [
                                                      Ty.path
                                                        "move_binary_format::deserializer::load_signature_token::TypeBuilder"
                                                    ]
                                                ],
                                              "unwrap",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "slice")
                                                    []
                                                    [
                                                      Ty.path
                                                        "move_binary_format::deserializer::load_signature_token::TypeBuilder"
                                                    ],
                                                  "last",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::deref::Deref",
                                                      Ty.apply
                                                        (Ty.path "alloc::vec::Vec")
                                                        []
                                                        [
                                                          Ty.path
                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                          Ty.path "alloc::alloc::Global"
                                                        ],
                                                      [],
                                                      "deref",
                                                      []
                                                    |),
                                                    [ stack ]
                                                  |)
                                                ]
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |)) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                let~ tok :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path
                                          "move_binary_format::deserializer::load_signature_token::TypeBuilder",
                                        "unwrap_saturated",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::option::Option")
                                              []
                                              [
                                                Ty.path
                                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder"
                                              ],
                                            "unwrap",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "pop",
                                                []
                                              |),
                                              [ stack ]
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  |) in
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path
                                              "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                            Ty.path "alloc::alloc::Global"
                                          ],
                                        "pop",
                                        []
                                      |),
                                      [ stack ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let t := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path
                                                    "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                  Ty.path "alloc::alloc::Global"
                                                ],
                                              "push",
                                              []
                                            |),
                                            [
                                              stack;
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::deserializer::load_signature_token::TypeBuilder",
                                                  "apply",
                                                  []
                                                |),
                                                [ M.read (| t |); M.read (| tok |) ]
                                              |)
                                            ]
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                Value.StructTuple
                                                  "core::result::Result::Ok"
                                                  [ M.read (| tok |) ]
                                              |)
                                            |)
                                          |)
                                        |)))
                                  ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        []
                                        [
                                          Ty.path
                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "push",
                                      []
                                    |),
                                    [
                                      stack;
                                      M.read (|
                                        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.path
                                                      "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::function::FnMut",
                                                    Ty.function
                                                      [ Ty.tuple [] ]
                                                      (Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path
                                                            "move_binary_format::deserializer::load_signature_token::TypeBuilder";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]),
                                                    [ Ty.tuple [] ],
                                                    "call_mut",
                                                    []
                                                  |),
                                                  [ read_next; Value.Tuple [] ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            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
                                                                  "move_binary_format::file_format::SignatureToken";
                                                                Ty.path
                                                                  "move_binary_format::errors::PartialVMError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError"
                                                                ]
                                                            ],
                                                            "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))
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)))
                          ]
                        |)))
                    |)
                  |)
                |)
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_signature_token :
    M.IsFunction "move_binary_format::deserializer::load_signature_token" load_signature_token.
  
  Module load_signature_token.
    (*
    Enum TypeBuilder
    {
      const_params := [];
      ty_params := [];
      variants :=
        [
          {
            name := "Saturated";
            item := StructTuple [ Ty.path "move_binary_format::file_format::SignatureToken" ];
            discriminant := None;
          };
          {
            name := "Vector";
            item := StructTuple [];
            discriminant := None;
          };
          {
            name := "Reference";
            item := StructTuple [];
            discriminant := None;
          };
          {
            name := "MutableReference";
            item := StructTuple [];
            discriminant := None;
          };
          {
            name := "StructInst";
            item :=
              StructRecord
                [
                  ("sh_idx", Ty.path "move_binary_format::file_format::StructHandleIndex");
                  ("arity", Ty.path "usize");
                  ("ty_args",
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.path "move_binary_format::file_format::SignatureToken";
                        Ty.path "alloc::alloc::Global"
                      ])
                ];
            discriminant := None;
          }
        ];
    }
    *)
    
    Module Impl_move_binary_format_deserializer_load_signature_token_TypeBuilder.
      Definition Self : Ty.t :=
        Ty.path "move_binary_format::deserializer::load_signature_token::TypeBuilder".
      
      (*
              fn apply(self, tok: SignatureToken) -> Self {
                  match self {
                      T::Vector => T::Saturated(SignatureToken::Vector(Box::new(tok))),
                      T::Reference => T::Saturated(SignatureToken::Reference(Box::new(tok))),
                      T::MutableReference => {
                          T::Saturated(SignatureToken::MutableReference(Box::new(tok)))
                      }
                      T::StructInst {
                          sh_idx,
                          arity,
                          mut ty_args,
                      } => {
                          ty_args.push(tok);
                          if ty_args.len() >= arity {
                              T::Saturated(SignatureToken::StructInstantiation(Box::new((
                                  sh_idx, ty_args,
                              ))))
                          } else {
                              T::StructInst {
                                  sh_idx,
                                  arity,
                                  ty_args,
                              }
                          }
                      }
                      _ => unreachable!("invalid type constructor application"),
                  }
              }
      *)
      Definition apply (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
        match ε, τ, α with
        | [], [], [ self; tok ] =>
          ltac:(M.monadic
            (let self := M.alloc (| self |) in
            let tok := M.alloc (| tok |) in
            M.read (|
              M.match_operator (|
                self,
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Vector"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                          [
                            Value.StructTuple
                              "move_binary_format::file_format::SignatureToken::Vector"
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::boxed::Box")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::SignatureToken";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "new",
                                    []
                                  |),
                                  [ M.read (| tok |) ]
                                |)
                              ]
                          ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Reference"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                          [
                            Value.StructTuple
                              "move_binary_format::file_format::SignatureToken::Reference"
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::boxed::Box")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::SignatureToken";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "new",
                                    []
                                  |),
                                  [ M.read (| tok |) ]
                                |)
                              ]
                          ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let _ :=
                        M.is_struct_tuple (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::MutableReference"
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                          [
                            Value.StructTuple
                              "move_binary_format::file_format::SignatureToken::MutableReference"
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::boxed::Box")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::SignatureToken";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "new",
                                    []
                                  |),
                                  [ M.read (| tok |) ]
                                |)
                              ]
                          ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ0_0 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::StructInst",
                          "sh_idx"
                        |) in
                      let γ0_1 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::StructInst",
                          "arity"
                        |) in
                      let γ0_2 :=
                        M.SubPointer.get_struct_record_field (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::StructInst",
                          "ty_args"
                        |) in
                      let sh_idx := M.copy (| γ0_0 |) in
                      let arity := M.copy (| γ0_1 |) in
                      let ty_args := M.copy (| γ0_2 |) in
                      let~ _ :=
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [
                                  Ty.path "move_binary_format::file_format::SignatureToken";
                                  Ty.path "alloc::alloc::Global"
                                ],
                              "push",
                              []
                            |),
                            [ ty_args; M.read (| tok |) ]
                          |)
                        |) in
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    BinOp.ge (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path
                                                "move_binary_format::file_format::SignatureToken";
                                              Ty.path "alloc::alloc::Global"
                                            ],
                                          "len",
                                          []
                                        |),
                                        [ ty_args ]
                                      |),
                                      M.read (| arity |)
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              M.alloc (|
                                Value.StructTuple
                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated"
                                  [
                                    Value.StructTuple
                                      "move_binary_format::file_format::SignatureToken::StructInstantiation"
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "alloc::boxed::Box")
                                              []
                                              [
                                                Ty.tuple
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::StructHandleIndex";
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      []
                                                      [
                                                        Ty.path
                                                          "move_binary_format::file_format::SignatureToken";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ];
                                                Ty.path "alloc::alloc::Global"
                                              ],
                                            "new",
                                            []
                                          |),
                                          [
                                            Value.Tuple
                                              [ M.read (| sh_idx |); M.read (| ty_args |) ]
                                          ]
                                        |)
                                      ]
                                  ]
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                Value.StructRecord
                                  "move_binary_format::deserializer::load_signature_token::TypeBuilder::StructInst"
                                  [
                                    ("sh_idx", M.read (| sh_idx |));
                                    ("arity", M.read (| arity |));
                                    ("ty_args", M.read (| ty_args |))
                                  ]
                              |)))
                        ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (M.alloc (|
                        M.never_to_any (|
                          M.call_closure (|
                            M.get_function (| "core::panicking::panic_fmt", [] |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "core::fmt::Arguments",
                                  "new_v1",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.read (|
                                          Value.String
                                            "internal error: entered unreachable code: invalid type constructor application"
                                        |)
                                      ]
                                  |);
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "core::fmt::rt::Argument",
                                        "none",
                                        []
                                      |),
                                      []
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |)
                      |)))
                ]
              |)
            |)))
        | _, _, _ => M.impossible "wrong number of arguments"
        end.
      
      Axiom AssociatedFunction_apply : M.IsAssociatedFunction Self "apply" apply.
      
      (*
              fn is_saturated(&self) -> bool {
                  matches!(self, T::Saturated(_))
              }
      *)
      Definition is_saturated (ε : 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.match_operator (|
                self,
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := M.read (| γ |) in
                      let γ1_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated",
                          0
                        |) in
                      M.alloc (| Value.Bool true |)));
                  fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |)))
                ]
              |)
            |)))
        | _, _, _ => M.impossible "wrong number of arguments"
        end.
      
      Axiom AssociatedFunction_is_saturated :
        M.IsAssociatedFunction Self "is_saturated" is_saturated.
      
      (*
              fn unwrap_saturated(self) -> SignatureToken {
                  match self {
                      T::Saturated(tok) => tok,
                      _ => unreachable!("cannot unwrap unsaturated type constructor"),
                  }
              }
      *)
      Definition unwrap_saturated (ε : 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.match_operator (|
                self,
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ0_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_binary_format::deserializer::load_signature_token::TypeBuilder::Saturated",
                          0
                        |) in
                      let tok := M.copy (| γ0_0 |) in
                      tok));
                  fun γ =>
                    ltac:(M.monadic
                      (M.alloc (|
                        M.never_to_any (|
                          M.call_closure (|
                            M.get_function (| "core::panicking::panic_fmt", [] |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "core::fmt::Arguments",
                                  "new_v1",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.read (|
                                          Value.String
                                            "internal error: entered unreachable code: cannot unwrap unsaturated type constructor"
                                        |)
                                      ]
                                  |);
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "core::fmt::rt::Argument",
                                        "none",
                                        []
                                      |),
                                      []
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |)
                      |)))
                ]
              |)
            |)))
        | _, _, _ => M.impossible "wrong number of arguments"
        end.
      
      Axiom AssociatedFunction_unwrap_saturated :
        M.IsAssociatedFunction Self "unwrap_saturated" unwrap_saturated.
    End Impl_move_binary_format_deserializer_load_signature_token_TypeBuilder.
  End load_signature_token.
  
  (*
  Enum AbilitySetPosition
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "FunctionTypeParameters";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "StructTypeParameters";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "StructHandle";
          item := StructTuple [];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_marker_Copy_for_move_binary_format_deserializer_AbilitySetPosition.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::AbilitySetPosition".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_move_binary_format_deserializer_AbilitySetPosition.
  
  Module Impl_core_clone_Clone_for_move_binary_format_deserializer_AbilitySetPosition.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::AbilitySetPosition".
    
    (* 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_deserializer_AbilitySetPosition.
  
  (*
  fn load_ability_set(
      cursor: &mut VersionedCursor,
      pos: AbilitySetPosition,
  ) -> BinaryLoaderResult<AbilitySet> {
      // If the module was on the old kind system:
      // - For struct declarations
      //   - resource kind structs become store+resource structs
      //   - copyable kind structs become store+copy+drop structs
      // - For function type parameter constraints
      //   - all kind becomes store, since it might be used in global storage
      //   - resource kind becomes store+resource
      //   - copyable kind becomes store+copy+drop
      // - For struct type parameter constraints
      //   - all kind becomes empty
      //   - resource kind becomes resource
      //   - copyable kind becomes copy+drop
      // In summary, we do not need store on the struct type parameter case for backwards
      // compatibility because any old code paths or entry points will use them with store types.
      // Any new code paths gain flexibility by being able to use the struct with possibly non-store
      // instantiations
      if cursor.version() < 2 {
          let byte = match cursor.read_u8() {
              Ok(byte) => byte,
              Err(_) => {
                  return Err(PartialVMError::new(StatusCode::MALFORMED)
                      .with_message("Unexpected EOF".to_string()))
              }
          };
          match pos {
              AbilitySetPosition::StructHandle => {
                  Ok(match DeprecatedNominalResourceFlag::from_u8(byte)? {
                      DeprecatedNominalResourceFlag::NOMINAL_RESOURCE => {
                          AbilitySet::EMPTY | Ability::Store | Ability::Key
                      }
                      DeprecatedNominalResourceFlag::NORMAL_STRUCT => {
                          AbilitySet::EMPTY | Ability::Store | Ability::Copy | Ability::Drop
                      }
                  })
              }
              AbilitySetPosition::FunctionTypeParameters
              | AbilitySetPosition::StructTypeParameters => {
                  let set = match DeprecatedKind::from_u8(byte)? {
                      DeprecatedKind::ALL => AbilitySet::EMPTY,
                      DeprecatedKind::COPYABLE => AbilitySet::EMPTY | Ability::Copy | Ability::Drop,
                      DeprecatedKind::RESOURCE => AbilitySet::EMPTY | Ability::Key,
                  };
                  Ok(match pos {
                      AbilitySetPosition::StructHandle => unreachable!(),
                      AbilitySetPosition::FunctionTypeParameters => set | Ability::Store,
                      AbilitySetPosition::StructTypeParameters => set,
                  })
              }
          }
      } else {
          // The uleb here doesn't really do anything as it is bounded currently to 0xF, but the
          // if we get many more constraints in the future, uleb will be helpful.
          let u = read_uleb_internal(cursor, AbilitySet::ALL.into_u8() as u64)?;
          match AbilitySet::from_u8(u) {
              Some(abilities) => Ok(abilities),
              None => Err(PartialVMError::new(StatusCode::UNKNOWN_ABILITY)),
          }
      }
  }
  *)
  Definition load_ability_set (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor; pos ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        let pos := M.alloc (| pos |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              M.match_operator (|
                M.alloc (| Value.Tuple [] |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ :=
                        M.use
                          (M.alloc (|
                            BinOp.lt (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "move_binary_format::deserializer::VersionedCursor",
                                  "version",
                                  []
                                |),
                                [ M.read (| cursor |) ]
                              |),
                              Value.Integer IntegerKind.U32 2
                            |)
                          |)) in
                      let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                      let~ byte :=
                        M.copy (|
                          M.match_operator (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "move_binary_format::deserializer::VersionedCursor",
                                  "read_u8",
                                  []
                                |),
                                [ M.read (| cursor |) ]
                              |)
                            |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Ok",
                                      0
                                    |) in
                                  let byte := M.copy (| γ0_0 |) in
                                  byte));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Err",
                                      0
                                    |) in
                                  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
                                                    "move_binary_format::errors::PartialVMError",
                                                  "with_message",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError",
                                                      "new",
                                                      []
                                                    |),
                                                    [
                                                      Value.StructTuple
                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                        []
                                                    ]
                                                  |);
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "alloc::string::ToString",
                                                      Ty.path "str",
                                                      [],
                                                      "to_string",
                                                      []
                                                    |),
                                                    [ M.read (| Value.String "Unexpected EOF" |) ]
                                                  |)
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)))
                            ]
                          |)
                        |) in
                      M.match_operator (|
                        pos,
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let _ :=
                                M.is_struct_tuple (|
                                  γ,
                                  "move_binary_format::deserializer::AbilitySetPosition::StructHandle"
                                |) in
                              M.alloc (|
                                Value.StructTuple
                                  "core::result::Result::Ok"
                                  [
                                    M.read (|
                                      M.match_operator (|
                                        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.path
                                                      "move_binary_format::deserializer::DeprecatedNominalResourceFlag";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::deserializer::DeprecatedNominalResourceFlag",
                                                    "from_u8",
                                                    []
                                                  |),
                                                  [ M.read (| byte |) ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            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
                                                                  "move_binary_format::file_format::AbilitySet";
                                                                Ty.path
                                                                  "move_binary_format::errors::PartialVMError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError"
                                                                ]
                                                            ],
                                                            "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))
                                          ]
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::deserializer::DeprecatedNominalResourceFlag::NOMINAL_RESOURCE"
                                                |) in
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::bit::BitOr",
                                                    Ty.path
                                                      "move_binary_format::file_format::AbilitySet",
                                                    [
                                                      Ty.path
                                                        "move_binary_format::file_format::Ability"
                                                    ],
                                                    "bitor",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::bit::BitOr",
                                                        Ty.path
                                                          "move_binary_format::file_format::AbilitySet",
                                                        [
                                                          Ty.path
                                                            "move_binary_format::file_format::Ability"
                                                        ],
                                                        "bitor",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.get_constant (|
                                                            "move_binary_format::file_format::EMPTY"
                                                          |)
                                                        |);
                                                        Value.StructTuple
                                                          "move_binary_format::file_format::Ability::Store"
                                                          []
                                                      ]
                                                    |);
                                                    Value.StructTuple
                                                      "move_binary_format::file_format::Ability::Key"
                                                      []
                                                  ]
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::deserializer::DeprecatedNominalResourceFlag::NORMAL_STRUCT"
                                                |) in
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::bit::BitOr",
                                                    Ty.path
                                                      "move_binary_format::file_format::AbilitySet",
                                                    [
                                                      Ty.path
                                                        "move_binary_format::file_format::Ability"
                                                    ],
                                                    "bitor",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::bit::BitOr",
                                                        Ty.path
                                                          "move_binary_format::file_format::AbilitySet",
                                                        [
                                                          Ty.path
                                                            "move_binary_format::file_format::Ability"
                                                        ],
                                                        "bitor",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::bit::BitOr",
                                                            Ty.path
                                                              "move_binary_format::file_format::AbilitySet",
                                                            [
                                                              Ty.path
                                                                "move_binary_format::file_format::Ability"
                                                            ],
                                                            "bitor",
                                                            []
                                                          |),
                                                          [
                                                            M.read (|
                                                              M.get_constant (|
                                                                "move_binary_format::file_format::EMPTY"
                                                              |)
                                                            |);
                                                            Value.StructTuple
                                                              "move_binary_format::file_format::Ability::Store"
                                                              []
                                                          ]
                                                        |);
                                                        Value.StructTuple
                                                          "move_binary_format::file_format::Ability::Copy"
                                                          []
                                                      ]
                                                    |);
                                                    Value.StructTuple
                                                      "move_binary_format::file_format::Ability::Drop"
                                                      []
                                                  ]
                                                |)
                                              |)))
                                        ]
                                      |)
                                    |)
                                  ]
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.find_or_pattern (|
                                γ,
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let _ :=
                                        M.is_struct_tuple (|
                                          γ,
                                          "move_binary_format::deserializer::AbilitySetPosition::FunctionTypeParameters"
                                        |) in
                                      Value.Tuple []));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let _ :=
                                        M.is_struct_tuple (|
                                          γ,
                                          "move_binary_format::deserializer::AbilitySetPosition::StructTypeParameters"
                                        |) in
                                      Value.Tuple []))
                                ],
                                M.closure
                                  (fun γ =>
                                    ltac:(M.monadic
                                      match γ with
                                      | [] =>
                                        ltac:(M.monadic
                                          (let~ set :=
                                            M.copy (|
                                              M.match_operator (|
                                                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.path
                                                              "move_binary_format::deserializer::DeprecatedKind";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "move_binary_format::deserializer::DeprecatedKind",
                                                            "from_u8",
                                                            []
                                                          |),
                                                          [ M.read (| byte |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::file_format::AbilitySet";
                                                                        Ty.path
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let _ :=
                                                        M.is_struct_tuple (|
                                                          γ,
                                                          "move_binary_format::deserializer::DeprecatedKind::ALL"
                                                        |) in
                                                      M.get_constant (|
                                                        "move_binary_format::file_format::EMPTY"
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let _ :=
                                                        M.is_struct_tuple (|
                                                          γ,
                                                          "move_binary_format::deserializer::DeprecatedKind::COPYABLE"
                                                        |) in
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::bit::BitOr",
                                                            Ty.path
                                                              "move_binary_format::file_format::AbilitySet",
                                                            [
                                                              Ty.path
                                                                "move_binary_format::file_format::Ability"
                                                            ],
                                                            "bitor",
                                                            []
                                                          |),
                                                          [
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::bit::BitOr",
                                                                Ty.path
                                                                  "move_binary_format::file_format::AbilitySet",
                                                                [
                                                                  Ty.path
                                                                    "move_binary_format::file_format::Ability"
                                                                ],
                                                                "bitor",
                                                                []
                                                              |),
                                                              [
                                                                M.read (|
                                                                  M.get_constant (|
                                                                    "move_binary_format::file_format::EMPTY"
                                                                  |)
                                                                |);
                                                                Value.StructTuple
                                                                  "move_binary_format::file_format::Ability::Copy"
                                                                  []
                                                              ]
                                                            |);
                                                            Value.StructTuple
                                                              "move_binary_format::file_format::Ability::Drop"
                                                              []
                                                          ]
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let _ :=
                                                        M.is_struct_tuple (|
                                                          γ,
                                                          "move_binary_format::deserializer::DeprecatedKind::RESOURCE"
                                                        |) in
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::bit::BitOr",
                                                            Ty.path
                                                              "move_binary_format::file_format::AbilitySet",
                                                            [
                                                              Ty.path
                                                                "move_binary_format::file_format::Ability"
                                                            ],
                                                            "bitor",
                                                            []
                                                          |),
                                                          [
                                                            M.read (|
                                                              M.get_constant (|
                                                                "move_binary_format::file_format::EMPTY"
                                                              |)
                                                            |);
                                                            Value.StructTuple
                                                              "move_binary_format::file_format::Ability::Key"
                                                              []
                                                          ]
                                                        |)
                                                      |)))
                                                ]
                                              |)
                                            |) in
                                          M.alloc (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [
                                                M.read (|
                                                  M.match_operator (|
                                                    pos,
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let _ :=
                                                            M.is_struct_tuple (|
                                                              γ,
                                                              "move_binary_format::deserializer::AbilitySetPosition::StructHandle"
                                                            |) in
                                                          M.alloc (|
                                                            M.never_to_any (|
                                                              M.call_closure (|
                                                                M.get_function (|
                                                                  "core::panicking::panic",
                                                                  []
                                                                |),
                                                                [
                                                                  M.read (|
                                                                    Value.String
                                                                      "internal error: entered unreachable code"
                                                                  |)
                                                                ]
                                                              |)
                                                            |)
                                                          |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let _ :=
                                                            M.is_struct_tuple (|
                                                              γ,
                                                              "move_binary_format::deserializer::AbilitySetPosition::FunctionTypeParameters"
                                                            |) in
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::bit::BitOr",
                                                                Ty.path
                                                                  "move_binary_format::file_format::AbilitySet",
                                                                [
                                                                  Ty.path
                                                                    "move_binary_format::file_format::Ability"
                                                                ],
                                                                "bitor",
                                                                []
                                                              |),
                                                              [
                                                                M.read (| set |);
                                                                Value.StructTuple
                                                                  "move_binary_format::file_format::Ability::Store"
                                                                  []
                                                              ]
                                                            |)
                                                          |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let _ :=
                                                            M.is_struct_tuple (|
                                                              γ,
                                                              "move_binary_format::deserializer::AbilitySetPosition::StructTypeParameters"
                                                            |) in
                                                          set))
                                                    ]
                                                  |)
                                                |)
                                              ]
                                          |)))
                                      | _ => M.impossible "wrong number of arguments"
                                      end))
                              |)))
                        ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let~ u :=
                        M.copy (|
                          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.path "u8";
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_function (|
                                      "move_binary_format::deserializer::read_uleb_internal",
                                      [ Ty.path "u8" ]
                                    |),
                                    [
                                      M.read (| cursor |);
                                      M.rust_cast
                                        (M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "move_binary_format::file_format::AbilitySet",
                                            "into_u8",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              M.get_constant (|
                                                "move_binary_format::file_format::ALL"
                                              |)
                                            |)
                                          ]
                                        |))
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              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
                                                    "move_binary_format::file_format::AbilitySet";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ]
                                              ],
                                              "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.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::file_format::AbilitySet",
                              "from_u8",
                              []
                            |),
                            [ M.read (| u |) ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::option::Option::Some",
                                  0
                                |) in
                              let abilities := M.copy (| γ0_0 |) in
                              M.alloc (|
                                Value.StructTuple
                                  "core::result::Result::Ok"
                                  [ M.read (| abilities |) ]
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                              M.alloc (|
                                Value.StructTuple
                                  "core::result::Result::Err"
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::errors::PartialVMError",
                                        "new",
                                        []
                                      |),
                                      [
                                        Value.StructTuple
                                          "move_core_types::vm_status::StatusCode::UNKNOWN_ABILITY"
                                          []
                                      ]
                                    |)
                                  ]
                              |)))
                        ]
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_ability_set :
    M.IsFunction "move_binary_format::deserializer::load_ability_set" load_ability_set.
  
  (*
  fn load_ability_sets(
      cursor: &mut VersionedCursor,
      pos: AbilitySetPosition,
  ) -> BinaryLoaderResult<Vec<AbilitySet>> {
      let len = load_type_parameter_count(cursor)?;
      let mut kinds = vec![];
      for _ in 0..len {
          kinds.push(load_ability_set(cursor, pos)?);
      }
      Ok(kinds)
  }
  *)
  Definition load_ability_sets (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor; pos ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        let pos := M.alloc (| pos |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ len :=
                M.copy (|
                  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.path "usize"; Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_type_parameter_count",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path "move_binary_format::file_format::AbilitySet";
                                              Ty.path "alloc::alloc::Global"
                                            ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ kinds :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [
                          Ty.path "move_binary_format::file_format::AbilitySet";
                          Ty.path "alloc::alloc::Global"
                        ],
                      "new",
                      []
                    |),
                    []
                  |)
                |) in
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "usize" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [
                              ("start", Value.Integer IntegerKind.Usize 0);
                              ("end_", M.read (| len |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "usize" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::AbilitySet";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                kinds;
                                                M.read (|
                                                  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.path
                                                                "move_binary_format::file_format::AbilitySet";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "move_binary_format::deserializer::load_ability_set",
                                                              []
                                                            |),
                                                            [ M.read (| cursor |); M.read (| pos |)
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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.apply
                                                                            (Ty.path
                                                                              "alloc::vec::Vec")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "move_binary_format::file_format::AbilitySet";
                                                                              Ty.path
                                                                                "alloc::alloc::Global"
                                                                            ];
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| kinds |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_ability_sets :
    M.IsFunction "move_binary_format::deserializer::load_ability_sets" load_ability_sets.
  
  (*
  fn load_struct_type_parameters(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<Vec<StructTypeParameter>> {
      let len = load_type_parameter_count(cursor)?;
      let mut type_params = Vec::with_capacity(len);
      for _ in 0..len {
          type_params.push(load_struct_type_parameter(cursor)?);
      }
      Ok(type_params)
  }
  *)
  Definition load_struct_type_parameters
      (ε : 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~ len :=
                M.copy (|
                  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.path "usize"; Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_type_parameter_count",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path
                                                "move_binary_format::file_format::StructTypeParameter";
                                              Ty.path "alloc::alloc::Global"
                                            ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ type_params :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [
                          Ty.path "move_binary_format::file_format::StructTypeParameter";
                          Ty.path "alloc::alloc::Global"
                        ],
                      "with_capacity",
                      []
                    |),
                    [ M.read (| len |) ]
                  |)
                |) in
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "usize" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [
                              ("start", Value.Integer IntegerKind.Usize 0);
                              ("end_", M.read (| len |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "usize" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::StructTypeParameter";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                type_params;
                                                M.read (|
                                                  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.path
                                                                "move_binary_format::file_format::StructTypeParameter";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "move_binary_format::deserializer::load_struct_type_parameter",
                                                              []
                                                            |),
                                                            [ M.read (| cursor |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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.apply
                                                                            (Ty.path
                                                                              "alloc::vec::Vec")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "move_binary_format::file_format::StructTypeParameter";
                                                                              Ty.path
                                                                                "alloc::alloc::Global"
                                                                            ];
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (|
                Value.StructTuple "core::result::Result::Ok" [ M.read (| type_params |) ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_type_parameters :
    M.IsFunction
      "move_binary_format::deserializer::load_struct_type_parameters"
      load_struct_type_parameters.
  
  (*
  fn load_struct_type_parameter(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<StructTypeParameter> {
      let constraints = load_ability_set(cursor, AbilitySetPosition::StructTypeParameters)?;
      let is_phantom = if cursor.version() < VERSION_3 {
          false
      } else {
          let byte: u8 = read_uleb_internal(cursor, 1)?;
          byte != 0
      };
      Ok(StructTypeParameter {
          constraints,
          is_phantom,
      })
  }
  *)
  Definition load_struct_type_parameter (ε : 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~ constraints :=
                M.copy (|
                  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.path "move_binary_format::file_format::AbilitySet";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_ability_set",
                              []
                            |),
                            [
                              M.read (| cursor |);
                              Value.StructTuple
                                "move_binary_format::deserializer::AbilitySetPosition::StructTypeParameters"
                                []
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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
                                            "move_binary_format::file_format::StructTypeParameter";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ is_phantom :=
                M.copy (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.lt (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "move_binary_format::deserializer::VersionedCursor",
                                      "version",
                                      []
                                    |),
                                    [ M.read (| cursor |) ]
                                  |),
                                  M.read (|
                                    M.get_constant (|
                                      "move_binary_format::file_format_common::VERSION_3"
                                    |)
                                  |)
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (| Value.Bool false |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let~ byte :=
                            M.copy (|
                              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.path "u8";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "move_binary_format::deserializer::read_uleb_internal",
                                          [ Ty.path "u8" ]
                                        |),
                                        [ M.read (| cursor |); Value.Integer IntegerKind.U64 1 ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  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
                                                        "move_binary_format::file_format::StructTypeParameter";
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ]
                                                  ],
                                                  "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 (|
                            BinOp.ne (| M.read (| byte |), Value.Integer IntegerKind.U8 0 |)
                          |)))
                    ]
                  |)
                |) in
              M.alloc (|
                Value.StructTuple
                  "core::result::Result::Ok"
                  [
                    Value.StructRecord
                      "move_binary_format::file_format::StructTypeParameter"
                      [
                        ("constraints", M.read (| constraints |));
                        ("is_phantom", M.read (| is_phantom |))
                      ]
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_type_parameter :
    M.IsFunction
      "move_binary_format::deserializer::load_struct_type_parameter"
      load_struct_type_parameter.
  
  (*
  fn load_struct_defs(
      binary: &VersionedBinary,
      table: &Table,
      struct_defs: &mut Vec<StructDefinition>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < u64::from(table.count) {
          let struct_handle = load_struct_handle_index(&mut cursor)?;
          let field_information_flag = match cursor.read_u8() {
              Ok(byte) => SerializedNativeStructFlag::from_u8(byte)?,
              Err(_) => {
                  return Err(PartialVMError::new(StatusCode::MALFORMED)
                      .with_message("Invalid field info in struct".to_string()))
              }
          };
          let field_information = match field_information_flag {
              SerializedNativeStructFlag::NATIVE => StructFieldInformation::Native,
              SerializedNativeStructFlag::DECLARED => {
                  let fields = load_field_defs(&mut cursor)?;
                  StructFieldInformation::Declared(fields)
              }
          };
          struct_defs.push(StructDefinition {
              struct_handle,
              field_information,
          });
      }
      Ok(())
  }
  *)
  Definition load_struct_defs (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; struct_defs ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let struct_defs := M.alloc (| struct_defs |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::convert::From",
                                        Ty.path "u64",
                                        [ Ty.path "u32" ],
                                        "from",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| table |),
                                            "move_binary_format::deserializer::Table",
                                            "count"
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ struct_handle :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::StructHandleIndex";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_struct_handle_index",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ field_information_flag :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "read_u8",
                                        []
                                      |),
                                      [ cursor ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::result::Result::Ok",
                                            0
                                          |) in
                                        let byte := M.copy (| γ0_0 |) in
                                        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.path
                                                      "move_binary_format::file_format_common::SerializedNativeStructFlag";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::file_format_common::SerializedNativeStructFlag",
                                                    "from_u8",
                                                    []
                                                  |),
                                                  [ M.read (| byte |) ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            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
                                                                  "move_binary_format::errors::PartialVMError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError"
                                                                ]
                                                            ],
                                                            "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))
                                          ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::result::Result::Err",
                                            0
                                          |) in
                                        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
                                                          "move_binary_format::errors::PartialVMError",
                                                        "with_message",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError",
                                                            "new",
                                                            []
                                                          |),
                                                          [
                                                            Value.StructTuple
                                                              "move_core_types::vm_status::StatusCode::MALFORMED"
                                                              []
                                                          ]
                                                        |);
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "alloc::string::ToString",
                                                            Ty.path "str",
                                                            [],
                                                            "to_string",
                                                            []
                                                          |),
                                                          [
                                                            M.read (|
                                                              Value.String
                                                                "Invalid field info in struct"
                                                            |)
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                              |)
                                            |)
                                          |)
                                        |)))
                                  ]
                                |)
                              |) in
                            let~ field_information :=
                              M.copy (|
                                M.match_operator (|
                                  field_information_flag,
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::SerializedNativeStructFlag::NATIVE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::StructFieldInformation::Native"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::SerializedNativeStructFlag::DECLARED"
                                          |) in
                                        let~ fields :=
                                          M.copy (|
                                            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.apply
                                                          (Ty.path "alloc::vec::Vec")
                                                          []
                                                          [
                                                            Ty.path
                                                              "move_binary_format::file_format::FieldDefinition";
                                                            Ty.path "alloc::alloc::Global"
                                                          ];
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "move_binary_format::deserializer::load_field_defs",
                                                        []
                                                      |),
                                                      [ cursor ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::StructFieldInformation::Declared"
                                            [ M.read (| fields |) ]
                                        |)))
                                  ]
                                |)
                              |) in
                            let~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::StructDefinition";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    M.read (| struct_defs |);
                                    Value.StructRecord
                                      "move_binary_format::file_format::StructDefinition"
                                      [
                                        ("struct_handle", M.read (| struct_handle |));
                                        ("field_information", M.read (| field_information |))
                                      ]
                                  ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_defs :
    M.IsFunction "move_binary_format::deserializer::load_struct_defs" load_struct_defs.
  
  (*
  fn load_field_defs(cursor: &mut VersionedCursor) -> BinaryLoaderResult<Vec<FieldDefinition>> {
      let mut fields = Vec::new();
      let field_count = load_field_count(cursor)?;
      for _ in 0..field_count {
          fields.push(load_field_def(cursor)?);
      }
      Ok(fields)
  }
  *)
  Definition load_field_defs (ε : 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~ fields :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [
                          Ty.path "move_binary_format::file_format::FieldDefinition";
                          Ty.path "alloc::alloc::Global"
                        ],
                      "new",
                      []
                    |),
                    []
                  |)
                |) in
              let~ field_count :=
                M.copy (|
                  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.path "u64"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_field_count",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path
                                                "move_binary_format::file_format::FieldDefinition";
                                              Ty.path "alloc::alloc::Global"
                                            ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "u64" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [
                              ("start", Value.Integer IntegerKind.U64 0);
                              ("end_", M.read (| field_count |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "u64" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::FieldDefinition";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                fields;
                                                M.read (|
                                                  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.path
                                                                "move_binary_format::file_format::FieldDefinition";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "move_binary_format::deserializer::load_field_def",
                                                              []
                                                            |),
                                                            [ M.read (| cursor |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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.apply
                                                                            (Ty.path
                                                                              "alloc::vec::Vec")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "move_binary_format::file_format::FieldDefinition";
                                                                              Ty.path
                                                                                "alloc::alloc::Global"
                                                                            ];
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| fields |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_defs :
    M.IsFunction "move_binary_format::deserializer::load_field_defs" load_field_defs.
  
  (*
  fn load_field_def(cursor: &mut VersionedCursor) -> BinaryLoaderResult<FieldDefinition> {
      let name = load_identifier_index(cursor)?;
      let signature = load_signature_token(cursor)?;
      Ok(FieldDefinition {
          name,
          signature: TypeSignature(signature),
      })
  }
  *)
  Definition load_field_def (ε : 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~ name :=
                M.copy (|
                  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.path "move_binary_format::file_format::IdentifierIndex";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_identifier_index",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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
                                            "move_binary_format::file_format::FieldDefinition";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ signature :=
                M.copy (|
                  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.path "move_binary_format::file_format::SignatureToken";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_signature_token",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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
                                            "move_binary_format::file_format::FieldDefinition";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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"
                  [
                    Value.StructRecord
                      "move_binary_format::file_format::FieldDefinition"
                      [
                        ("name", M.read (| name |));
                        ("signature",
                          Value.StructTuple
                            "move_binary_format::file_format::TypeSignature"
                            [ M.read (| signature |) ])
                      ]
                  ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_def :
    M.IsFunction "move_binary_format::deserializer::load_field_def" load_field_def.
  
  (*
  fn load_function_defs(
      binary: &VersionedBinary,
      table: &Table,
      func_defs: &mut Vec<FunctionDefinition>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      while cursor.position() < u64::from(table.count) {
          let func_def = load_function_def(&mut cursor)?;
          func_defs.push(func_def);
      }
      Ok(())
  }
  *)
  Definition load_function_defs (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; func_defs ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let func_defs := M.alloc (| func_defs |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ cursor ]
                                    |),
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::convert::From",
                                        Ty.path "u64",
                                        [ Ty.path "u32" ],
                                        "from",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| table |),
                                            "move_binary_format::deserializer::Table",
                                            "count"
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ func_def :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format::FunctionDefinition";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_binary_format::deserializer::load_function_def",
                                            []
                                          |),
                                          [ cursor ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path
                                          "move_binary_format::file_format::FunctionDefinition";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [ M.read (| func_defs |); M.read (| func_def |) ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_function_defs :
    M.IsFunction "move_binary_format::deserializer::load_function_defs" load_function_defs.
  
  (*
  fn load_field_handles(
      binary: &VersionedBinary,
      table: &Table,
      field_handles: &mut Vec<FieldHandle>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      loop {
          if cursor.position() == u64::from(table.count) {
              break;
          }
          let struct_idx = load_struct_def_index(&mut cursor)?;
          let offset = load_field_offset(&mut cursor)?;
          field_handles.push(FieldHandle {
              owner: struct_idx,
              field: offset,
          });
      }
      Ok(())
  }
  *)
  Definition load_field_handles (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; field_handles ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let field_handles := M.alloc (| field_handles |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (let~ _ :=
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    BinOp.eq (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "move_binary_format::deserializer::VersionedCursor",
                                          "position",
                                          []
                                        |),
                                        [ cursor ]
                                      |),
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::From",
                                          Ty.path "u64",
                                          [ Ty.path "u32" ],
                                          "from",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| table |),
                                              "move_binary_format::deserializer::Table",
                                              "count"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |)
                                  |)) 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 [] |)))
                        ]
                      |) in
                    let~ struct_idx :=
                      M.copy (|
                        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.path
                                      "move_binary_format::file_format::StructDefinitionIndex";
                                    Ty.path "move_binary_format::errors::PartialVMError"
                                  ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_function (|
                                    "move_binary_format::deserializer::load_struct_def_index",
                                    []
                                  |),
                                  [ cursor ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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 "move_binary_format::errors::PartialVMError"
                                              ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [
                                                  Ty.path "core::convert::Infallible";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ]
                                            ],
                                            "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~ offset :=
                      M.copy (|
                        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.path "u16";
                                    Ty.path "move_binary_format::errors::PartialVMError"
                                  ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_function (|
                                    "move_binary_format::deserializer::load_field_offset",
                                    []
                                  |),
                                  [ cursor ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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 "move_binary_format::errors::PartialVMError"
                                              ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [
                                                  Ty.path "core::convert::Infallible";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ]
                                            ],
                                            "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~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [
                                Ty.path "move_binary_format::file_format::FieldHandle";
                                Ty.path "alloc::alloc::Global"
                              ],
                            "push",
                            []
                          |),
                          [
                            M.read (| field_handles |);
                            Value.StructRecord
                              "move_binary_format::file_format::FieldHandle"
                              [ ("owner", M.read (| struct_idx |)); ("field", M.read (| offset |)) ]
                          ]
                        |)
                      |) in
                    M.alloc (| Value.Tuple [] |)))
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_handles :
    M.IsFunction "move_binary_format::deserializer::load_field_handles" load_field_handles.
  
  (*
  fn load_field_instantiations(
      binary: &VersionedBinary,
      table: &Table,
      field_insts: &mut Vec<FieldInstantiation>,
  ) -> BinaryLoaderResult<()> {
      let start = table.offset as usize;
      let end = start + table.count as usize;
      let mut cursor = binary.new_cursor(start, end);
      loop {
          if cursor.position() == u64::from(table.count) {
              break;
          }
          let handle = load_field_handle_index(&mut cursor)?;
          let type_parameters = load_signature_index(&mut cursor)?;
          field_insts.push(FieldInstantiation {
              handle,
              type_parameters,
          });
      }
      Ok(())
  }
  *)
  Definition load_field_instantiations (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ binary; table; field_insts ] =>
      ltac:(M.monadic
        (let binary := M.alloc (| binary |) in
        let table := M.alloc (| table |) in
        let field_insts := M.alloc (| field_insts |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ start :=
                M.alloc (|
                  M.rust_cast
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| table |),
                        "move_binary_format::deserializer::Table",
                        "offset"
                      |)
                    |))
                |) in
              let~ end_ :=
                M.alloc (|
                  BinOp.Wrap.add (|
                    M.read (| start |),
                    M.rust_cast
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| table |),
                          "move_binary_format::deserializer::Table",
                          "count"
                        |)
                      |))
                  |)
                |) in
              let~ cursor :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "move_binary_format::deserializer::VersionedBinary",
                      "new_cursor",
                      []
                    |),
                    [ M.read (| binary |); M.read (| start |); M.read (| end_ |) ]
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (let~ _ :=
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    BinOp.eq (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "move_binary_format::deserializer::VersionedCursor",
                                          "position",
                                          []
                                        |),
                                        [ cursor ]
                                      |),
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::From",
                                          Ty.path "u64",
                                          [ Ty.path "u32" ],
                                          "from",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| table |),
                                              "move_binary_format::deserializer::Table",
                                              "count"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |)
                                  |)) 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 [] |)))
                        ]
                      |) in
                    let~ handle :=
                      M.copy (|
                        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.path "move_binary_format::file_format::FieldHandleIndex";
                                    Ty.path "move_binary_format::errors::PartialVMError"
                                  ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_function (|
                                    "move_binary_format::deserializer::load_field_handle_index",
                                    []
                                  |),
                                  [ cursor ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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 "move_binary_format::errors::PartialVMError"
                                              ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [
                                                  Ty.path "core::convert::Infallible";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ]
                                            ],
                                            "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~ type_parameters :=
                      M.copy (|
                        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.path "move_binary_format::file_format::SignatureIndex";
                                    Ty.path "move_binary_format::errors::PartialVMError"
                                  ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_function (|
                                    "move_binary_format::deserializer::load_signature_index",
                                    []
                                  |),
                                  [ cursor ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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 "move_binary_format::errors::PartialVMError"
                                              ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                []
                                                [
                                                  Ty.path "core::convert::Infallible";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ]
                                            ],
                                            "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~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [
                                Ty.path "move_binary_format::file_format::FieldInstantiation";
                                Ty.path "alloc::alloc::Global"
                              ],
                            "push",
                            []
                          |),
                          [
                            M.read (| field_insts |);
                            Value.StructRecord
                              "move_binary_format::file_format::FieldInstantiation"
                              [
                                ("handle", M.read (| handle |));
                                ("type_parameters", M.read (| type_parameters |))
                              ]
                          ]
                        |)
                      |) in
                    M.alloc (| Value.Tuple [] |)))
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_field_instantiations :
    M.IsFunction
      "move_binary_format::deserializer::load_field_instantiations"
      load_field_instantiations.
  
  (*
  fn load_function_def(cursor: &mut VersionedCursor) -> BinaryLoaderResult<FunctionDefinition> {
      let function = load_function_handle_index(cursor)?;
  
      let mut flags = cursor.read_u8().map_err(|_| {
          PartialVMError::new(StatusCode::MALFORMED).with_message("Unexpected EOF".to_string())
      })?;
  
      // NOTE: changes compared with VERSION_1
      // - in VERSION_1: the flags is a byte compositing both the visibility info and whether
      //                 the function is a native function
      // - in VERSION_2 onwards: the flags only represent the visibility info and we need to
      //                 advance the cursor to read up the next byte as flags
      // - in VERSION_5 onwards: script visibility has been deprecated for an entry function flag
      let (visibility, is_entry, mut extra_flags) = if cursor.version() == VERSION_1 {
          let vis = if (flags & FunctionDefinition::DEPRECATED_PUBLIC_BIT) != 0 {
              flags ^= FunctionDefinition::DEPRECATED_PUBLIC_BIT;
              Visibility::Public
          } else {
              Visibility::Private
          };
          (vis, false, flags)
      } else if cursor.version() < VERSION_5 {
          let (vis, is_entry) = if flags == Visibility::DEPRECATED_SCRIPT {
              (Visibility::Public, true)
          } else {
              let vis = flags.try_into().map_err(|_| {
                  PartialVMError::new(StatusCode::MALFORMED)
                      .with_message("Invalid visibility byte".to_string())
              })?;
              (vis, false)
          };
          let extra_flags = cursor.read_u8().map_err(|_| {
              PartialVMError::new(StatusCode::MALFORMED).with_message("Unexpected EOF".to_string())
          })?;
          (vis, is_entry, extra_flags)
      } else {
          let vis = flags.try_into().map_err(|_| {
              PartialVMError::new(StatusCode::MALFORMED)
                  .with_message("Invalid visibility byte".to_string())
          })?;
  
          let mut extra_flags = cursor.read_u8().map_err(|_| {
              PartialVMError::new(StatusCode::MALFORMED).with_message("Unexpected EOF".to_string())
          })?;
          let is_entry = (extra_flags & FunctionDefinition::ENTRY) != 0;
          if is_entry {
              extra_flags ^= FunctionDefinition::ENTRY;
          }
          (vis, is_entry, extra_flags)
      };
  
      let acquires_global_resources = load_struct_definition_indices(cursor)?;
      let code_unit = if (extra_flags & FunctionDefinition::NATIVE) != 0 {
          extra_flags ^= FunctionDefinition::NATIVE;
          None
      } else {
          Some(load_code_unit(cursor)?)
      };
  
      // check that the bits unused in the flags are not set, otherwise it might cause some trouble
      // if later we decide to assign meaning to these bits.
      if extra_flags != 0 {
          return Err(PartialVMError::new(StatusCode::INVALID_FLAG_BITS));
      }
  
      Ok(FunctionDefinition {
          function,
          visibility,
          is_entry,
          acquires_global_resources,
          code: code_unit,
      })
  }
  *)
  Definition load_function_def (ε : 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~ function :=
                M.copy (|
                  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.path "move_binary_format::file_format::FunctionHandleIndex";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_function_handle_index",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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
                                            "move_binary_format::file_format::FunctionDefinition";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ flags :=
                M.copy (|
                  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.path "u8"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::result::Result")
                                []
                                [ Ty.path "u8"; Ty.path "anyhow::Error" ],
                              "map_err",
                              [
                                Ty.path "move_binary_format::errors::PartialVMError";
                                Ty.function
                                  [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                  (Ty.path "move_binary_format::errors::PartialVMError")
                              ]
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "move_binary_format::deserializer::VersionedCursor",
                                  "read_u8",
                                  []
                                |),
                                [ M.read (| cursor |) ]
                              |);
                              M.closure
                                (fun γ =>
                                  ltac:(M.monadic
                                    match γ with
                                    | [ α0 ] =>
                                      ltac:(M.monadic
                                        (M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError",
                                                    "with_message",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError",
                                                        "new",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructTuple
                                                          "move_core_types::vm_status::StatusCode::MALFORMED"
                                                          []
                                                      ]
                                                    |);
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "alloc::string::ToString",
                                                        Ty.path "str",
                                                        [],
                                                        "to_string",
                                                        []
                                                      |),
                                                      [ M.read (| Value.String "Unexpected EOF" |) ]
                                                    |)
                                                  ]
                                                |)))
                                          ]
                                        |)))
                                    | _ => M.impossible "wrong number of arguments"
                                    end))
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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
                                            "move_binary_format::file_format::FunctionDefinition";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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.match_operator (|
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              BinOp.eq (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.path "move_binary_format::deserializer::VersionedCursor",
                                    "version",
                                    []
                                  |),
                                  [ M.read (| cursor |) ]
                                |),
                                M.read (|
                                  M.get_constant (|
                                    "move_binary_format::file_format_common::VERSION_1"
                                  |)
                                |)
                              |)
                            |)) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        let~ vis :=
                          M.copy (|
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.ne (|
                                            BinOp.bit_and
                                              (M.read (| flags |))
                                              (M.read (|
                                                M.get_constant (|
                                                  "move_binary_format::file_format::DEPRECATED_PUBLIC_BIT"
                                                |)
                                              |)),
                                            Value.Integer IntegerKind.U8 0
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let~ _ :=
                                      let β := flags in
                                      M.write (|
                                        β,
                                        BinOp.bit_xor
                                          (M.read (| β |))
                                          (M.read (|
                                            M.get_constant (|
                                              "move_binary_format::file_format::DEPRECATED_PUBLIC_BIT"
                                            |)
                                          |))
                                      |) in
                                    M.alloc (|
                                      Value.StructTuple
                                        "move_binary_format::file_format::Visibility::Public"
                                        []
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (M.alloc (|
                                      Value.StructTuple
                                        "move_binary_format::file_format::Visibility::Private"
                                        []
                                    |)))
                              ]
                            |)
                          |) in
                        M.alloc (|
                          Value.Tuple [ M.read (| vis |); Value.Bool false; M.read (| flags |) ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.use
                                    (M.alloc (|
                                      BinOp.lt (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path
                                              "move_binary_format::deserializer::VersionedCursor",
                                            "version",
                                            []
                                          |),
                                          [ M.read (| cursor |) ]
                                        |),
                                        M.read (|
                                          M.get_constant (|
                                            "move_binary_format::file_format_common::VERSION_5"
                                          |)
                                        |)
                                      |)
                                    |)) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                M.match_operator (|
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.eq (|
                                                  M.read (| flags |),
                                                  M.read (|
                                                    M.get_constant (|
                                                      "move_binary_format::file_format::DEPRECATED_SCRIPT"
                                                    |)
                                                  |)
                                                |)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_binary_format::file_format::Visibility::Public"
                                                  [];
                                                Value.Bool true
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let~ vis :=
                                            M.copy (|
                                              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.path
                                                            "move_binary_format::file_format::Visibility";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path
                                                                "move_binary_format::file_format::Visibility";
                                                              Ty.tuple []
                                                            ],
                                                          "map_err",
                                                          [
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError";
                                                            Ty.function
                                                              [ Ty.tuple [ Ty.tuple [] ] ]
                                                              (Ty.path
                                                                "move_binary_format::errors::PartialVMError")
                                                          ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::convert::TryInto",
                                                              Ty.path "u8",
                                                              [
                                                                Ty.path
                                                                  "move_binary_format::file_format::Visibility"
                                                              ],
                                                              "try_into",
                                                              []
                                                            |),
                                                            [ M.read (| flags |) ]
                                                          |);
                                                          M.closure
                                                            (fun γ =>
                                                              ltac:(M.monadic
                                                                match γ with
                                                                | [ α0 ] =>
                                                                  ltac:(M.monadic
                                                                    (M.match_operator (|
                                                                      M.alloc (| α0 |),
                                                                      [
                                                                        fun γ =>
                                                                          ltac:(M.monadic
                                                                            (M.call_closure (|
                                                                              M.get_associated_function (|
                                                                                Ty.path
                                                                                  "move_binary_format::errors::PartialVMError",
                                                                                "with_message",
                                                                                []
                                                                              |),
                                                                              [
                                                                                M.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.path
                                                                                      "move_binary_format::errors::PartialVMError",
                                                                                    "new",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    Value.StructTuple
                                                                                      "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                      []
                                                                                  ]
                                                                                |);
                                                                                M.call_closure (|
                                                                                  M.get_trait_method (|
                                                                                    "alloc::string::ToString",
                                                                                    Ty.path "str",
                                                                                    [],
                                                                                    "to_string",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    M.read (|
                                                                                      Value.String
                                                                                        "Invalid visibility byte"
                                                                                    |)
                                                                                  ]
                                                                                |)
                                                                              ]
                                                                            |)))
                                                                      ]
                                                                    |)))
                                                                | _ =>
                                                                  M.impossible
                                                                    "wrong number of arguments"
                                                                end))
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  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
                                                                        "move_binary_format::file_format::FunctionDefinition";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.path
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ]
                                                                  ],
                                                                  "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.Tuple [ M.read (| vis |); Value.Bool false ]
                                          |)))
                                    ]
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                        let vis := M.copy (| γ0_0 |) in
                                        let is_entry := M.copy (| γ0_1 |) in
                                        let~ extra_flags :=
                                          M.copy (|
                                            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.path "u8";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [ Ty.path "u8"; Ty.path "anyhow::Error" ],
                                                        "map_err",
                                                        [
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError";
                                                          Ty.function
                                                            [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                                            (Ty.path
                                                              "move_binary_format::errors::PartialVMError")
                                                        ]
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "move_binary_format::deserializer::VersionedCursor",
                                                            "read_u8",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |);
                                                        M.closure
                                                          (fun γ =>
                                                            ltac:(M.monadic
                                                              match γ with
                                                              | [ α0 ] =>
                                                                ltac:(M.monadic
                                                                  (M.match_operator (|
                                                                    M.alloc (| α0 |),
                                                                    [
                                                                      fun γ =>
                                                                        ltac:(M.monadic
                                                                          (M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError",
                                                                              "with_message",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "new",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  Value.StructTuple
                                                                                    "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                    []
                                                                                ]
                                                                              |);
                                                                              M.call_closure (|
                                                                                M.get_trait_method (|
                                                                                  "alloc::string::ToString",
                                                                                  Ty.path "str",
                                                                                  [],
                                                                                  "to_string",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.read (|
                                                                                    Value.String
                                                                                      "Unexpected EOF"
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                          |)))
                                                                    ]
                                                                  |)))
                                                              | _ =>
                                                                M.impossible
                                                                  "wrong number of arguments"
                                                              end))
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::file_format::FunctionDefinition";
                                                                    Ty.path
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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.Tuple
                                            [
                                              M.read (| vis |);
                                              M.read (| is_entry |);
                                              M.read (| extra_flags |)
                                            ]
                                        |)))
                                  ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let~ vis :=
                                  M.copy (|
                                    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.path
                                                  "move_binary_format::file_format::Visibility";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::Visibility";
                                                    Ty.tuple []
                                                  ],
                                                "map_err",
                                                [
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError";
                                                  Ty.function
                                                    [ Ty.tuple [ Ty.tuple [] ] ]
                                                    (Ty.path
                                                      "move_binary_format::errors::PartialVMError")
                                                ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::convert::TryInto",
                                                    Ty.path "u8",
                                                    [
                                                      Ty.path
                                                        "move_binary_format::file_format::Visibility"
                                                    ],
                                                    "try_into",
                                                    []
                                                  |),
                                                  [ M.read (| flags |) ]
                                                |);
                                                M.closure
                                                  (fun γ =>
                                                    ltac:(M.monadic
                                                      match γ with
                                                      | [ α0 ] =>
                                                        ltac:(M.monadic
                                                          (M.match_operator (|
                                                            M.alloc (| α0 |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError",
                                                                      "with_message",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.call_closure (|
                                                                        M.get_associated_function (|
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError",
                                                                          "new",
                                                                          []
                                                                        |),
                                                                        [
                                                                          Value.StructTuple
                                                                            "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                            []
                                                                        ]
                                                                      |);
                                                                      M.call_closure (|
                                                                        M.get_trait_method (|
                                                                          "alloc::string::ToString",
                                                                          Ty.path "str",
                                                                          [],
                                                                          "to_string",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.read (|
                                                                            Value.String
                                                                              "Invalid visibility byte"
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    ]
                                                                  |)))
                                                            ]
                                                          |)))
                                                      | _ =>
                                                        M.impossible "wrong number of arguments"
                                                      end))
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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
                                                              "move_binary_format::file_format::FunctionDefinition";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ]
                                                        ],
                                                        "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~ extra_flags :=
                                  M.copy (|
                                    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.path "u8";
                                                Ty.path "move_binary_format::errors::PartialVMError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [ Ty.path "u8"; Ty.path "anyhow::Error" ],
                                                "map_err",
                                                [
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError";
                                                  Ty.function
                                                    [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                                    (Ty.path
                                                      "move_binary_format::errors::PartialVMError")
                                                ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path
                                                      "move_binary_format::deserializer::VersionedCursor",
                                                    "read_u8",
                                                    []
                                                  |),
                                                  [ M.read (| cursor |) ]
                                                |);
                                                M.closure
                                                  (fun γ =>
                                                    ltac:(M.monadic
                                                      match γ with
                                                      | [ α0 ] =>
                                                        ltac:(M.monadic
                                                          (M.match_operator (|
                                                            M.alloc (| α0 |),
                                                            [
                                                              fun γ =>
                                                                ltac:(M.monadic
                                                                  (M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError",
                                                                      "with_message",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.call_closure (|
                                                                        M.get_associated_function (|
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError",
                                                                          "new",
                                                                          []
                                                                        |),
                                                                        [
                                                                          Value.StructTuple
                                                                            "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                            []
                                                                        ]
                                                                      |);
                                                                      M.call_closure (|
                                                                        M.get_trait_method (|
                                                                          "alloc::string::ToString",
                                                                          Ty.path "str",
                                                                          [],
                                                                          "to_string",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.read (|
                                                                            Value.String
                                                                              "Unexpected EOF"
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    ]
                                                                  |)))
                                                            ]
                                                          |)))
                                                      | _ =>
                                                        M.impossible "wrong number of arguments"
                                                      end))
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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
                                                              "move_binary_format::file_format::FunctionDefinition";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ]
                                                        ],
                                                        "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~ is_entry :=
                                  M.alloc (|
                                    BinOp.ne (|
                                      BinOp.bit_and
                                        (M.read (| extra_flags |))
                                        (M.read (|
                                          M.get_constant (|
                                            "move_binary_format::file_format::ENTRY"
                                          |)
                                        |)),
                                      Value.Integer IntegerKind.U8 0
                                    |)
                                  |) in
                                let~ _ :=
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ := M.use is_entry in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          let~ _ :=
                                            let β := extra_flags in
                                            M.write (|
                                              β,
                                              BinOp.bit_xor
                                                (M.read (| β |))
                                                (M.read (|
                                                  M.get_constant (|
                                                    "move_binary_format::file_format::ENTRY"
                                                  |)
                                                |))
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                M.alloc (|
                                  Value.Tuple
                                    [
                                      M.read (| vis |);
                                      M.read (| is_entry |);
                                      M.read (| extra_flags |)
                                    ]
                                |)))
                          ]
                        |)))
                  ]
                |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                      let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                      let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                      let visibility := M.copy (| γ0_0 |) in
                      let is_entry := M.copy (| γ0_1 |) in
                      let extra_flags := M.copy (| γ0_2 |) in
                      let~ acquires_global_resources :=
                        M.copy (|
                          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.apply
                                        (Ty.path "alloc::vec::Vec")
                                        []
                                        [
                                          Ty.path
                                            "move_binary_format::file_format::StructDefinitionIndex";
                                          Ty.path "alloc::alloc::Global"
                                        ];
                                      Ty.path "move_binary_format::errors::PartialVMError"
                                    ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_function (|
                                      "move_binary_format::deserializer::load_struct_definition_indices",
                                      []
                                    |),
                                    [ M.read (| cursor |) ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              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
                                                    "move_binary_format::file_format::FunctionDefinition";
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError"
                                                ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ]
                                              ],
                                              "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~ code_unit :=
                        M.copy (|
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        BinOp.ne (|
                                          BinOp.bit_and
                                            (M.read (| extra_flags |))
                                            (M.read (|
                                              M.get_constant (|
                                                "move_binary_format::file_format::NATIVE"
                                              |)
                                            |)),
                                          Value.Integer IntegerKind.U8 0
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let~ _ :=
                                    let β := extra_flags in
                                    M.write (|
                                      β,
                                      BinOp.bit_xor
                                        (M.read (| β |))
                                        (M.read (|
                                          M.get_constant (|
                                            "move_binary_format::file_format::NATIVE"
                                          |)
                                        |))
                                    |) in
                                  M.alloc (| Value.StructTuple "core::option::Option::None" [] |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.alloc (|
                                    Value.StructTuple
                                      "core::option::Option::Some"
                                      [
                                        M.read (|
                                          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.path
                                                        "move_binary_format::file_format::CodeUnit";
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_function (|
                                                      "move_binary_format::deserializer::load_code_unit",
                                                      []
                                                    |),
                                                    [ M.read (| cursor |) ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              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
                                                                    "move_binary_format::file_format::FunctionDefinition";
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ]
                                                              ],
                                                              "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~ _ :=
                        M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.use
                                    (M.alloc (|
                                      BinOp.ne (|
                                        M.read (| extra_flags |),
                                        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 (|
                                      M.return_ (|
                                        Value.StructTuple
                                          "core::result::Result::Err"
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "move_binary_format::errors::PartialVMError",
                                                "new",
                                                []
                                              |),
                                              [
                                                Value.StructTuple
                                                  "move_core_types::vm_status::StatusCode::INVALID_FLAG_BITS"
                                                  []
                                              ]
                                            |)
                                          ]
                                      |)
                                    |)
                                  |)
                                |)));
                            fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                          ]
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Ok"
                          [
                            Value.StructRecord
                              "move_binary_format::file_format::FunctionDefinition"
                              [
                                ("function", M.read (| function |));
                                ("visibility", M.read (| visibility |));
                                ("is_entry", M.read (| is_entry |));
                                ("acquires_global_resources",
                                  M.read (| acquires_global_resources |));
                                ("code", M.read (| code_unit |))
                              ]
                          ]
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_function_def :
    M.IsFunction "move_binary_format::deserializer::load_function_def" load_function_def.
  
  (*
  fn load_struct_definition_indices(
      cursor: &mut VersionedCursor,
  ) -> BinaryLoaderResult<Vec<StructDefinitionIndex>> {
      let len = load_acquires_count(cursor)?;
      let mut indices = vec![];
      for _ in 0..len {
          indices.push(load_struct_def_index(cursor)?);
      }
      Ok(indices)
  }
  *)
  Definition load_struct_definition_indices
      (ε : 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~ len :=
                M.copy (|
                  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.path "u64"; Ty.path "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_acquires_count",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply
                                            (Ty.path "alloc::vec::Vec")
                                            []
                                            [
                                              Ty.path
                                                "move_binary_format::file_format::StructDefinitionIndex";
                                              Ty.path "alloc::alloc::Global"
                                            ];
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ indices :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [
                          Ty.path "move_binary_format::file_format::StructDefinitionIndex";
                          Ty.path "alloc::alloc::Global"
                        ],
                      "new",
                      []
                    |),
                    []
                  |)
                |) in
              let~ _ :=
                M.use
                  (M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::collect::IntoIterator",
                          Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "u64" ],
                          [],
                          "into_iter",
                          []
                        |),
                        [
                          Value.StructRecord
                            "core::ops::range::Range"
                            [ ("start", Value.Integer IntegerKind.U64 0); ("end_", M.read (| len |))
                            ]
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let iter := M.copy (| γ |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::iter::traits::iterator::Iterator",
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          []
                                          [ Ty.path "u64" ],
                                        [],
                                        "next",
                                        []
                                      |),
                                      [ iter ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                                        M.alloc (|
                                          M.never_to_any (| M.read (| M.break (||) |) |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let~ _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  []
                                                  [
                                                    Ty.path
                                                      "move_binary_format::file_format::StructDefinitionIndex";
                                                    Ty.path "alloc::alloc::Global"
                                                  ],
                                                "push",
                                                []
                                              |),
                                              [
                                                indices;
                                                M.read (|
                                                  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.path
                                                                "move_binary_format::file_format::StructDefinitionIndex";
                                                              Ty.path
                                                                "move_binary_format::errors::PartialVMError"
                                                            ],
                                                          [],
                                                          "branch",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_function (|
                                                              "move_binary_format::deserializer::load_struct_def_index",
                                                              []
                                                            |),
                                                            [ M.read (| cursor |) ]
                                                          |)
                                                        ]
                                                      |)
                                                    |),
                                                    [
                                                      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.apply
                                                                            (Ty.path
                                                                              "alloc::vec::Vec")
                                                                            []
                                                                            [
                                                                              Ty.path
                                                                                "move_binary_format::file_format::StructDefinitionIndex";
                                                                              Ty.path
                                                                                "alloc::alloc::Global"
                                                                            ];
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ],
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::result::Result")
                                                                          []
                                                                          [
                                                                            Ty.path
                                                                              "core::convert::Infallible";
                                                                            Ty.path
                                                                              "move_binary_format::errors::PartialVMError"
                                                                          ]
                                                                      ],
                                                                      "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.Tuple [] |)))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |)))
                          |)))
                    ]
                  |)) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| indices |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_struct_definition_indices :
    M.IsFunction
      "move_binary_format::deserializer::load_struct_definition_indices"
      load_struct_definition_indices.
  
  (*
  fn load_code_unit(cursor: &mut VersionedCursor) -> BinaryLoaderResult<CodeUnit> {
      let locals = load_signature_index(cursor)?;
  
      let mut code_unit = CodeUnit {
          locals,
          code: vec![],
      };
  
      load_code(cursor, &mut code_unit.code)?;
      Ok(code_unit)
  }
  *)
  Definition load_code_unit (ε : 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~ locals :=
                M.copy (|
                  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.path "move_binary_format::file_format::SignatureIndex";
                              Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_signature_index",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::file_format::CodeUnit";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ code_unit :=
                M.alloc (|
                  Value.StructRecord
                    "move_binary_format::file_format::CodeUnit"
                    [
                      ("locals", M.read (| locals |));
                      ("code",
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              []
                              [
                                Ty.path "move_binary_format::file_format::Bytecode";
                                Ty.path "alloc::alloc::Global"
                              ],
                            "new",
                            []
                          |),
                          []
                        |))
                    ]
                |) 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 "move_binary_format::errors::PartialVMError" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_function (| "move_binary_format::deserializer::load_code", [] |),
                          [
                            M.read (| cursor |);
                            M.SubPointer.get_struct_record_field (|
                              code_unit,
                              "move_binary_format::file_format::CodeUnit",
                              "code"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "move_binary_format::file_format::CodeUnit";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ]
                                    ],
                                    "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 (| code_unit |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_code_unit :
    M.IsFunction "move_binary_format::deserializer::load_code_unit" load_code_unit.
  
  (*
  fn load_code(cursor: &mut VersionedCursor, code: &mut Vec<Bytecode>) -> BinaryLoaderResult<()> {
      let bytecode_count = load_bytecode_count(cursor)?;
  
      while code.len() < bytecode_count {
          let byte = cursor.read_u8().map_err(|_| {
              PartialVMError::new(StatusCode::MALFORMED).with_message("Unexpected EOF".to_string())
          })?;
          let opcode = Opcodes::from_u8(byte)?;
          // version checking
          match opcode {
              Opcodes::VEC_PACK
              | Opcodes::VEC_LEN
              | Opcodes::VEC_IMM_BORROW
              | Opcodes::VEC_MUT_BORROW
              | Opcodes::VEC_PUSH_BACK
              | Opcodes::VEC_POP_BACK
              | Opcodes::VEC_UNPACK
              | Opcodes::VEC_SWAP => {
                  if cursor.version() < VERSION_4 {
                      return Err(
                          PartialVMError::new(StatusCode::MALFORMED).with_message(format!(
                              "Vector operations not available before bytecode version {}",
                              VERSION_4
                          )),
                      );
                  }
              }
              _ => {}
          };
  
          match opcode {
              Opcodes::LD_U16
              | Opcodes::LD_U32
              | Opcodes::LD_U256
              | Opcodes::CAST_U16
              | Opcodes::CAST_U32
              | Opcodes::CAST_U256
                  if (cursor.version() < VERSION_6) =>
              {
                  return Err(
                      PartialVMError::new(StatusCode::MALFORMED).with_message(format!(
                          "Loading or casting u16, u32, u256 integers not supported in bytecode version {}",
                          cursor.version()
                      )),
                  );
              }
              _ => (),
          };
  
          // conversion
          let bytecode = match opcode {
              Opcodes::POP => Bytecode::Pop,
              Opcodes::RET => Bytecode::Ret,
              Opcodes::BR_TRUE => Bytecode::BrTrue(load_bytecode_index(cursor)?),
              Opcodes::BR_FALSE => Bytecode::BrFalse(load_bytecode_index(cursor)?),
              Opcodes::BRANCH => Bytecode::Branch(load_bytecode_index(cursor)?),
              Opcodes::LD_U8 => {
                  let value = cursor.read_u8().map_err(|_| {
                      PartialVMError::new(StatusCode::MALFORMED)
                          .with_message("Unexpected EOF".to_string())
                  })?;
                  Bytecode::LdU8(value)
              }
              Opcodes::LD_U64 => {
                  let value = read_u64_internal(cursor)?;
                  Bytecode::LdU64(value)
              }
              Opcodes::LD_U128 => {
                  let value = read_u128_internal(cursor)?;
                  Bytecode::LdU128(Box::new(value))
              }
              Opcodes::CAST_U8 => Bytecode::CastU8,
              Opcodes::CAST_U64 => Bytecode::CastU64,
              Opcodes::CAST_U128 => Bytecode::CastU128,
              Opcodes::LD_CONST => Bytecode::LdConst(load_constant_pool_index(cursor)?),
              Opcodes::LD_TRUE => Bytecode::LdTrue,
              Opcodes::LD_FALSE => Bytecode::LdFalse,
              Opcodes::COPY_LOC => Bytecode::CopyLoc(load_local_index(cursor)?),
              Opcodes::MOVE_LOC => Bytecode::MoveLoc(load_local_index(cursor)?),
              Opcodes::ST_LOC => Bytecode::StLoc(load_local_index(cursor)?),
              Opcodes::MUT_BORROW_LOC => Bytecode::MutBorrowLoc(load_local_index(cursor)?),
              Opcodes::IMM_BORROW_LOC => Bytecode::ImmBorrowLoc(load_local_index(cursor)?),
              Opcodes::MUT_BORROW_FIELD => Bytecode::MutBorrowField(load_field_handle_index(cursor)?),
              Opcodes::MUT_BORROW_FIELD_GENERIC => {
                  Bytecode::MutBorrowFieldGeneric(load_field_inst_index(cursor)?)
              }
              Opcodes::IMM_BORROW_FIELD => Bytecode::ImmBorrowField(load_field_handle_index(cursor)?),
              Opcodes::IMM_BORROW_FIELD_GENERIC => {
                  Bytecode::ImmBorrowFieldGeneric(load_field_inst_index(cursor)?)
              }
              Opcodes::CALL => Bytecode::Call(load_function_handle_index(cursor)?),
              Opcodes::CALL_GENERIC => Bytecode::CallGeneric(load_function_inst_index(cursor)?),
              Opcodes::PACK => Bytecode::Pack(load_struct_def_index(cursor)?),
              Opcodes::PACK_GENERIC => Bytecode::PackGeneric(load_struct_def_inst_index(cursor)?),
              Opcodes::UNPACK => Bytecode::Unpack(load_struct_def_index(cursor)?),
              Opcodes::UNPACK_GENERIC => Bytecode::UnpackGeneric(load_struct_def_inst_index(cursor)?),
              Opcodes::READ_REF => Bytecode::ReadRef,
              Opcodes::WRITE_REF => Bytecode::WriteRef,
              Opcodes::ADD => Bytecode::Add,
              Opcodes::SUB => Bytecode::Sub,
              Opcodes::MUL => Bytecode::Mul,
              Opcodes::MOD => Bytecode::Mod,
              Opcodes::DIV => Bytecode::Div,
              Opcodes::BIT_OR => Bytecode::BitOr,
              Opcodes::BIT_AND => Bytecode::BitAnd,
              Opcodes::XOR => Bytecode::Xor,
              Opcodes::SHL => Bytecode::Shl,
              Opcodes::SHR => Bytecode::Shr,
              Opcodes::OR => Bytecode::Or,
              Opcodes::AND => Bytecode::And,
              Opcodes::NOT => Bytecode::Not,
              Opcodes::EQ => Bytecode::Eq,
              Opcodes::NEQ => Bytecode::Neq,
              Opcodes::LT => Bytecode::Lt,
              Opcodes::GT => Bytecode::Gt,
              Opcodes::LE => Bytecode::Le,
              Opcodes::GE => Bytecode::Ge,
              Opcodes::ABORT => Bytecode::Abort,
              Opcodes::NOP => Bytecode::Nop,
              Opcodes::FREEZE_REF => Bytecode::FreezeRef,
              Opcodes::VEC_PACK => {
                  Bytecode::VecPack(load_signature_index(cursor)?, read_u64_internal(cursor)?)
              }
              Opcodes::VEC_LEN => Bytecode::VecLen(load_signature_index(cursor)?),
              Opcodes::VEC_IMM_BORROW => Bytecode::VecImmBorrow(load_signature_index(cursor)?),
              Opcodes::VEC_MUT_BORROW => Bytecode::VecMutBorrow(load_signature_index(cursor)?),
              Opcodes::VEC_PUSH_BACK => Bytecode::VecPushBack(load_signature_index(cursor)?),
              Opcodes::VEC_POP_BACK => Bytecode::VecPopBack(load_signature_index(cursor)?),
              Opcodes::VEC_UNPACK => {
                  Bytecode::VecUnpack(load_signature_index(cursor)?, read_u64_internal(cursor)?)
              }
              Opcodes::VEC_SWAP => Bytecode::VecSwap(load_signature_index(cursor)?),
              Opcodes::LD_U16 => {
                  let value = read_u16_internal(cursor)?;
                  Bytecode::LdU16(value)
              }
              Opcodes::LD_U32 => {
                  let value = read_u32_internal(cursor)?;
                  Bytecode::LdU32(value)
              }
              Opcodes::LD_U256 => {
                  let value = read_u256_internal(cursor)?;
                  Bytecode::LdU256(Box::new(value))
              }
              Opcodes::CAST_U16 => Bytecode::CastU16,
              Opcodes::CAST_U32 => Bytecode::CastU32,
              Opcodes::CAST_U256 => Bytecode::CastU256,
              // ******** DEPRECATED BYTECODES ********
              Opcodes::EXISTS_DEPRECATED => {
                  Bytecode::ExistsDeprecated(load_struct_def_index(cursor)?)
              }
              Opcodes::EXISTS_GENERIC_DEPRECATED => {
                  Bytecode::ExistsGenericDeprecated(load_struct_def_inst_index(cursor)?)
              }
              Opcodes::MUT_BORROW_GLOBAL_DEPRECATED => {
                  Bytecode::MutBorrowGlobalDeprecated(load_struct_def_index(cursor)?)
              }
              Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED => {
                  Bytecode::MutBorrowGlobalGenericDeprecated(load_struct_def_inst_index(cursor)?)
              }
              Opcodes::IMM_BORROW_GLOBAL_DEPRECATED => {
                  Bytecode::ImmBorrowGlobalDeprecated(load_struct_def_index(cursor)?)
              }
              Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED => {
                  Bytecode::ImmBorrowGlobalGenericDeprecated(load_struct_def_inst_index(cursor)?)
              }
              Opcodes::MOVE_FROM_DEPRECATED => {
                  Bytecode::MoveFromDeprecated(load_struct_def_index(cursor)?)
              }
              Opcodes::MOVE_FROM_GENERIC_DEPRECATED => {
                  Bytecode::MoveFromGenericDeprecated(load_struct_def_inst_index(cursor)?)
              }
              Opcodes::MOVE_TO_DEPRECATED => {
                  Bytecode::MoveToDeprecated(load_struct_def_index(cursor)?)
              }
              Opcodes::MOVE_TO_GENERIC_DEPRECATED => {
                  Bytecode::MoveToGenericDeprecated(load_struct_def_inst_index(cursor)?)
              }
          };
          code.push(bytecode);
      }
      Ok(())
  }
  *)
  Definition load_code (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ cursor; code ] =>
      ltac:(M.monadic
        (let cursor := M.alloc (| cursor |) in
        let code := M.alloc (| code |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ bytecode_count :=
                M.copy (|
                  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.path "usize"; Ty.path "move_binary_format::errors::PartialVMError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::load_bytecode_count",
                              []
                            |),
                            [ M.read (| cursor |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.lt (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "alloc::vec::Vec")
                                          []
                                          [
                                            Ty.path "move_binary_format::file_format::Bytecode";
                                            Ty.path "alloc::alloc::Global"
                                          ],
                                        "len",
                                        []
                                      |),
                                      [ M.read (| code |) ]
                                    |),
                                    M.read (| bytecode_count |)
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let~ byte :=
                              M.copy (|
                                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.path "u8";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [ Ty.path "u8"; Ty.path "anyhow::Error" ],
                                            "map_err",
                                            [
                                              Ty.path "move_binary_format::errors::PartialVMError";
                                              Ty.function
                                                [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                                (Ty.path
                                                  "move_binary_format::errors::PartialVMError")
                                            ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "move_binary_format::deserializer::VersionedCursor",
                                                "read_u8",
                                                []
                                              |),
                                              [ M.read (| cursor |) ]
                                            |);
                                            M.closure
                                              (fun γ =>
                                                ltac:(M.monadic
                                                  match γ with
                                                  | [ α0 ] =>
                                                    ltac:(M.monadic
                                                      (M.match_operator (|
                                                        M.alloc (| α0 |),
                                                        [
                                                          fun γ =>
                                                            ltac:(M.monadic
                                                              (M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "with_message",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError",
                                                                      "new",
                                                                      []
                                                                    |),
                                                                    [
                                                                      Value.StructTuple
                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                        []
                                                                    ]
                                                                  |);
                                                                  M.call_closure (|
                                                                    M.get_trait_method (|
                                                                      "alloc::string::ToString",
                                                                      Ty.path "str",
                                                                      [],
                                                                      "to_string",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (|
                                                                        Value.String
                                                                          "Unexpected EOF"
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)))
                                                        ]
                                                      |)))
                                                  | _ => M.impossible "wrong number of arguments"
                                                  end))
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ opcode :=
                              M.copy (|
                                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.path
                                              "move_binary_format::file_format_common::Opcodes";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path
                                              "move_binary_format::file_format_common::Opcodes",
                                            "from_u8",
                                            []
                                          |),
                                          [ M.read (| byte |) ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError"
                                                        ]
                                                    ],
                                                    "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~ _ :=
                              M.match_operator (|
                                opcode,
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (M.find_or_pattern (|
                                        γ,
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_PACK"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_LEN"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_IMM_BORROW"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_MUT_BORROW"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_PUSH_BACK"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_POP_BACK"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_UNPACK"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::VEC_SWAP"
                                                |) in
                                              Value.Tuple []))
                                        ],
                                        M.closure
                                          (fun γ =>
                                            ltac:(M.monadic
                                              match γ with
                                              | [] =>
                                                ltac:(M.monadic
                                                  (M.match_operator (|
                                                    M.alloc (| Value.Tuple [] |),
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let γ :=
                                                            M.use
                                                              (M.alloc (|
                                                                BinOp.lt (|
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "move_binary_format::deserializer::VersionedCursor",
                                                                      "version",
                                                                      []
                                                                    |),
                                                                    [ M.read (| cursor |) ]
                                                                  |),
                                                                  M.read (|
                                                                    M.get_constant (|
                                                                      "move_binary_format::file_format_common::VERSION_4"
                                                                    |)
                                                                  |)
                                                                |)
                                                              |)) 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.call_closure (|
                                                                        M.get_associated_function (|
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError",
                                                                          "with_message",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError",
                                                                              "new",
                                                                              []
                                                                            |),
                                                                            [
                                                                              Value.StructTuple
                                                                                "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                []
                                                                            ]
                                                                          |);
                                                                          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
                                                                                                      "Vector operations not available before bytecode version "
                                                                                                  |)
                                                                                                ]
                                                                                            |);
                                                                                            M.alloc (|
                                                                                              Value.Array
                                                                                                [
                                                                                                  M.call_closure (|
                                                                                                    M.get_associated_function (|
                                                                                                      Ty.path
                                                                                                        "core::fmt::rt::Argument",
                                                                                                      "new_display",
                                                                                                      [
                                                                                                        Ty.path
                                                                                                          "u32"
                                                                                                      ]
                                                                                                    |),
                                                                                                    [
                                                                                                      M.get_constant (|
                                                                                                        "move_binary_format::file_format_common::VERSION_4"
                                                                                                      |)
                                                                                                    ]
                                                                                                  |)
                                                                                                ]
                                                                                            |)
                                                                                          ]
                                                                                        |)
                                                                                      ]
                                                                                    |)
                                                                                  |) in
                                                                                res
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    ]
                                                                |)
                                                              |)
                                                            |)
                                                          |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |)))
                                              | _ => M.impossible "wrong number of arguments"
                                              end))
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let~ _ :=
                              M.match_operator (|
                                opcode,
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (M.find_or_pattern (|
                                        γ,
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::LD_U16"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::LD_U32"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::LD_U256"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::CAST_U16"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::CAST_U32"
                                                |) in
                                              Value.Tuple []));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let _ :=
                                                M.is_struct_tuple (|
                                                  γ,
                                                  "move_binary_format::file_format_common::Opcodes::CAST_U256"
                                                |) in
                                              Value.Tuple []))
                                        ],
                                        M.closure
                                          (fun γ =>
                                            ltac:(M.monadic
                                              match γ with
                                              | [] =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.alloc (|
                                                      BinOp.lt (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "move_binary_format::deserializer::VersionedCursor",
                                                            "version",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |),
                                                        M.read (|
                                                          M.get_constant (|
                                                            "move_binary_format::file_format_common::VERSION_6"
                                                          |)
                                                        |)
                                                      |)
                                                    |) 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.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path
                                                                    "move_binary_format::errors::PartialVMError",
                                                                  "with_message",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError",
                                                                      "new",
                                                                      []
                                                                    |),
                                                                    [
                                                                      Value.StructTuple
                                                                        "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                        []
                                                                    ]
                                                                  |);
                                                                  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
                                                                                              "Loading or casting u16, u32, u256 integers not supported in bytecode version "
                                                                                          |)
                                                                                        ]
                                                                                    |);
                                                                                    M.alloc (|
                                                                                      Value.Array
                                                                                        [
                                                                                          M.call_closure (|
                                                                                            M.get_associated_function (|
                                                                                              Ty.path
                                                                                                "core::fmt::rt::Argument",
                                                                                              "new_display",
                                                                                              [
                                                                                                Ty.path
                                                                                                  "u32"
                                                                                              ]
                                                                                            |),
                                                                                            [
                                                                                              M.alloc (|
                                                                                                M.call_closure (|
                                                                                                  M.get_associated_function (|
                                                                                                    Ty.path
                                                                                                      "move_binary_format::deserializer::VersionedCursor",
                                                                                                    "version",
                                                                                                    []
                                                                                                  |),
                                                                                                  [
                                                                                                    M.read (|
                                                                                                      cursor
                                                                                                    |)
                                                                                                  ]
                                                                                                |)
                                                                                              |)
                                                                                            ]
                                                                                          |)
                                                                                        ]
                                                                                    |)
                                                                                  ]
                                                                                |)
                                                                              ]
                                                                            |)
                                                                          |) in
                                                                        res
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)))
                                              | _ => M.impossible "wrong number of arguments"
                                              end))
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let~ bytecode :=
                              M.copy (|
                                M.match_operator (|
                                  opcode,
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::POP"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Pop"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::RET"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Ret"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::BR_TRUE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::BrTrue"
                                            [
                                              M.read (|
                                                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.path "u16";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_bytecode_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::BR_FALSE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::BrFalse"
                                            [
                                              M.read (|
                                                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.path "u16";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_bytecode_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::BRANCH"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Branch"
                                            [
                                              M.read (|
                                                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.path "u16";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_bytecode_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_U8"
                                          |) in
                                        let~ value :=
                                          M.copy (|
                                            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.path "u8";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          []
                                                          [ Ty.path "u8"; Ty.path "anyhow::Error" ],
                                                        "map_err",
                                                        [
                                                          Ty.path
                                                            "move_binary_format::errors::PartialVMError";
                                                          Ty.function
                                                            [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                                            (Ty.path
                                                              "move_binary_format::errors::PartialVMError")
                                                        ]
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "move_binary_format::deserializer::VersionedCursor",
                                                            "read_u8",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |);
                                                        M.closure
                                                          (fun γ =>
                                                            ltac:(M.monadic
                                                              match γ with
                                                              | [ α0 ] =>
                                                                ltac:(M.monadic
                                                                  (M.match_operator (|
                                                                    M.alloc (| α0 |),
                                                                    [
                                                                      fun γ =>
                                                                        ltac:(M.monadic
                                                                          (M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.path
                                                                                "move_binary_format::errors::PartialVMError",
                                                                              "with_message",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "move_binary_format::errors::PartialVMError",
                                                                                  "new",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  Value.StructTuple
                                                                                    "move_core_types::vm_status::StatusCode::MALFORMED"
                                                                                    []
                                                                                ]
                                                                              |);
                                                                              M.call_closure (|
                                                                                M.get_trait_method (|
                                                                                  "alloc::string::ToString",
                                                                                  Ty.path "str",
                                                                                  [],
                                                                                  "to_string",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.read (|
                                                                                    Value.String
                                                                                      "Unexpected EOF"
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                          |)))
                                                                    ]
                                                                  |)))
                                                              | _ =>
                                                                M.impossible
                                                                  "wrong number of arguments"
                                                              end))
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::Bytecode::LdU8"
                                            [ M.read (| value |) ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_U64"
                                          |) in
                                        let~ value :=
                                          M.copy (|
                                            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.path "u64";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "move_binary_format::deserializer::read_u64_internal",
                                                        []
                                                      |),
                                                      [ M.read (| cursor |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::Bytecode::LdU64"
                                            [ M.read (| value |) ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_U128"
                                          |) in
                                        let~ value :=
                                          M.copy (|
                                            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.path "u128";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "move_binary_format::deserializer::read_u128_internal",
                                                        []
                                                      |),
                                                      [ M.read (| cursor |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::Bytecode::LdU128"
                                            [
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "alloc::boxed::Box")
                                                    []
                                                    [ Ty.path "u128"; Ty.path "alloc::alloc::Global"
                                                    ],
                                                  "new",
                                                  []
                                                |),
                                                [ M.read (| value |) ]
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CAST_U8"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CastU8"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CAST_U64"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CastU64"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CAST_U128"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CastU128"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_CONST"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::LdConst"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::ConstantPoolIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_constant_pool_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_TRUE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::LdTrue"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_FALSE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::LdFalse"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::COPY_LOC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CopyLoc"
                                            [
                                              M.read (|
                                                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.path "u8";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_local_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MOVE_LOC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MoveLoc"
                                            [
                                              M.read (|
                                                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.path "u8";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_local_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::ST_LOC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::StLoc"
                                            [
                                              M.read (|
                                                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.path "u8";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_local_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_LOC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MutBorrowLoc"
                                            [
                                              M.read (|
                                                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.path "u8";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_local_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_LOC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ImmBorrowLoc"
                                            [
                                              M.read (|
                                                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.path "u8";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_local_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MutBorrowField"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::FieldHandleIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_field_handle_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD_GENERIC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MutBorrowFieldGeneric"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::FieldInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_field_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ImmBorrowField"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::FieldHandleIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_field_handle_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD_GENERIC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ImmBorrowFieldGeneric"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::FieldInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_field_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CALL"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Call"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::FunctionHandleIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_function_handle_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CALL_GENERIC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CallGeneric"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::FunctionInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_function_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::PACK"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Pack"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::PACK_GENERIC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::PackGeneric"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::UNPACK"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Unpack"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::UNPACK_GENERIC"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::UnpackGeneric"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::READ_REF"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ReadRef"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::WRITE_REF"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::WriteRef"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::ADD"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Add"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::SUB"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Sub"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MUL"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Mul"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MOD"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Mod"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::DIV"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Div"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::BIT_OR"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::BitOr"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::BIT_AND"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::BitAnd"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::XOR"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Xor"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::SHL"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Shl"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::SHR"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Shr"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::OR"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Or"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::AND"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::And"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::NOT"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Not"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::EQ"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Eq"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::NEQ"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Neq"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LT"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Lt"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::GT"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Gt"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Le"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::GE"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Ge"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::ABORT"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Abort"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::NOP"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::Nop"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::FREEZE_REF"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::FreezeRef"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_PACK"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecPack"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |);
                                              M.read (|
                                                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.path "u64";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::read_u64_internal",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_LEN"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecLen"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_IMM_BORROW"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecImmBorrow"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_MUT_BORROW"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecMutBorrow"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_PUSH_BACK"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecPushBack"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_POP_BACK"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecPopBack"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_UNPACK"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecUnpack"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |);
                                              M.read (|
                                                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.path "u64";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::read_u64_internal",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::VEC_SWAP"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::VecSwap"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::SignatureIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_signature_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_U16"
                                          |) in
                                        let~ value :=
                                          M.copy (|
                                            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.path "u16";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "move_binary_format::deserializer::read_u16_internal",
                                                        []
                                                      |),
                                                      [ M.read (| cursor |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::Bytecode::LdU16"
                                            [ M.read (| value |) ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_U32"
                                          |) in
                                        let~ value :=
                                          M.copy (|
                                            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.path "u32";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "move_binary_format::deserializer::read_u32_internal",
                                                        []
                                                      |),
                                                      [ M.read (| cursor |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::Bytecode::LdU32"
                                            [ M.read (| value |) ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::LD_U256"
                                          |) in
                                        let~ value :=
                                          M.copy (|
                                            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.path "move_core_types::u256::U256";
                                                        Ty.path
                                                          "move_binary_format::errors::PartialVMError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "move_binary_format::deserializer::read_u256_internal",
                                                        []
                                                      |),
                                                      [ M.read (| cursor |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                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
                                                                      "move_binary_format::errors::PartialVMError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "move_binary_format::errors::PartialVMError"
                                                                    ]
                                                                ],
                                                                "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
                                            "move_binary_format::file_format::Bytecode::LdU256"
                                            [
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "alloc::boxed::Box")
                                                    []
                                                    [
                                                      Ty.path "move_core_types::u256::U256";
                                                      Ty.path "alloc::alloc::Global"
                                                    ],
                                                  "new",
                                                  []
                                                |),
                                                [ M.read (| value |) ]
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CAST_U16"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CastU16"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CAST_U32"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CastU32"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::CAST_U256"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::CastU256"
                                            []
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::EXISTS_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ExistsDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::EXISTS_GENERIC_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ExistsGenericDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MutBorrowGlobalDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MutBorrowGlobalGenericDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ImmBorrowGlobalDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::ImmBorrowGlobalGenericDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MOVE_FROM_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MoveFromDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MOVE_FROM_GENERIC_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MoveFromGenericDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MOVE_TO_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MoveToDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefinitionIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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))
                                                  ]
                                                |)
                                              |)
                                            ]
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let _ :=
                                          M.is_struct_tuple (|
                                            γ,
                                            "move_binary_format::file_format_common::Opcodes::MOVE_TO_GENERIC_DEPRECATED"
                                          |) in
                                        M.alloc (|
                                          Value.StructTuple
                                            "move_binary_format::file_format::Bytecode::MoveToGenericDeprecated"
                                            [
                                              M.read (|
                                                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.path
                                                              "move_binary_format::file_format::StructDefInstantiationIndex";
                                                            Ty.path
                                                              "move_binary_format::errors::PartialVMError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "move_binary_format::deserializer::load_struct_def_inst_index",
                                                            []
                                                          |),
                                                          [ M.read (| cursor |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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
                                                                          "move_binary_format::errors::PartialVMError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        []
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "move_binary_format::errors::PartialVMError"
                                                                        ]
                                                                    ],
                                                                    "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~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "move_binary_format::file_format::Bytecode";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [ M.read (| code |); M.read (| bytecode |) ]
                                |)
                              |) in
                            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.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_load_code : M.IsFunction "move_binary_format::deserializer::load_code" load_code.
  
  Module Impl_move_binary_format_file_format_common_TableType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::TableType".
    
    (*
        fn from_u8(value: u8) -> BinaryLoaderResult<TableType> {
            match value {
                0x1 => Ok(TableType::MODULE_HANDLES),
                0x2 => Ok(TableType::STRUCT_HANDLES),
                0x3 => Ok(TableType::FUNCTION_HANDLES),
                0x4 => Ok(TableType::FUNCTION_INST),
                0x5 => Ok(TableType::SIGNATURES),
                0x6 => Ok(TableType::CONSTANT_POOL),
                0x7 => Ok(TableType::IDENTIFIERS),
                0x8 => Ok(TableType::ADDRESS_IDENTIFIERS),
                0xA => Ok(TableType::STRUCT_DEFS),
                0xB => Ok(TableType::STRUCT_DEF_INST),
                0xC => Ok(TableType::FUNCTION_DEFS),
                0xD => Ok(TableType::FIELD_HANDLE),
                0xE => Ok(TableType::FIELD_INST),
                0xF => Ok(TableType::FRIEND_DECLS),
                0x10 => Ok(TableType::METADATA),
                _ => Err(PartialVMError::new(StatusCode::UNKNOWN_TABLE_TYPE)),
            }
        }
    *)
    Definition from_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          M.read (|
            M.match_operator (|
              value,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 1
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::MODULE_HANDLES"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 2
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::STRUCT_HANDLES"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 3
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::FUNCTION_HANDLES"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 4
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::FUNCTION_INST"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 5
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::SIGNATURES"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 6
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::CONSTANT_POOL"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 7
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::IDENTIFIERS"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 8
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::ADDRESS_IDENTIFIERS"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 10
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::STRUCT_DEFS"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 11
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::STRUCT_DEF_INST"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 12
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::FUNCTION_DEFS"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 13
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::FIELD_HANDLE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 14
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::FIELD_INST"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 15
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::FRIEND_DECLS"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 16
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::TableType::METADATA"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::errors::PartialVMError",
                              "new",
                              []
                            |),
                            [
                              Value.StructTuple
                                "move_core_types::vm_status::StatusCode::UNKNOWN_TABLE_TYPE"
                                []
                            ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_from_u8 : M.IsAssociatedFunction Self "from_u8" from_u8.
  End Impl_move_binary_format_file_format_common_TableType.
  
  Module Impl_move_binary_format_file_format_common_SerializedType.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::SerializedType".
    
    (*
        fn from_u8(value: u8) -> BinaryLoaderResult<SerializedType> {
            match value {
                0x1 => Ok(SerializedType::BOOL),
                0x2 => Ok(SerializedType::U8),
                0x3 => Ok(SerializedType::U64),
                0x4 => Ok(SerializedType::U128),
                0x5 => Ok(SerializedType::ADDRESS),
                0x6 => Ok(SerializedType::REFERENCE),
                0x7 => Ok(SerializedType::MUTABLE_REFERENCE),
                0x8 => Ok(SerializedType::STRUCT),
                0x9 => Ok(SerializedType::TYPE_PARAMETER),
                0xA => Ok(SerializedType::VECTOR),
                0xB => Ok(SerializedType::STRUCT_INST),
                0xC => Ok(SerializedType::SIGNER),
                0xD => Ok(SerializedType::U16),
                0xE => Ok(SerializedType::U32),
                0xF => Ok(SerializedType::U256),
                _ => Err(PartialVMError::new(StatusCode::UNKNOWN_SERIALIZED_TYPE)),
            }
        }
    *)
    Definition from_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          M.read (|
            M.match_operator (|
              value,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 1
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::BOOL"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 2
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::U8"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 3
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::U64"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 4
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::U128"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 5
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::ADDRESS"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 6
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::REFERENCE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 7
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::MUTABLE_REFERENCE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 8
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::STRUCT"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 9
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::TYPE_PARAMETER"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 10
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::VECTOR"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 11
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::STRUCT_INST"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 12
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::SIGNER"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 13
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::U16"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 14
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::U32"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 15
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedType::U256"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::errors::PartialVMError",
                              "new",
                              []
                            |),
                            [
                              Value.StructTuple
                                "move_core_types::vm_status::StatusCode::UNKNOWN_SERIALIZED_TYPE"
                                []
                            ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_from_u8 : M.IsAssociatedFunction Self "from_u8" from_u8.
  End Impl_move_binary_format_file_format_common_SerializedType.
  
  (*
  Enum DeprecatedNominalResourceFlag
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "NOMINAL_RESOURCE";
          item := StructTuple [];
          discriminant := Some 1;
        };
        {
          name := "NORMAL_STRUCT";
          item := StructTuple [];
          discriminant := Some 2;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_move_binary_format_deserializer_DeprecatedNominalResourceFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::deserializer::DeprecatedNominalResourceFlag".
    
    (* 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_deserializer_DeprecatedNominalResourceFlag.
  
  Module Impl_core_marker_Copy_for_move_binary_format_deserializer_DeprecatedNominalResourceFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::deserializer::DeprecatedNominalResourceFlag".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_move_binary_format_deserializer_DeprecatedNominalResourceFlag.
  
  Module Impl_core_fmt_Debug_for_move_binary_format_deserializer_DeprecatedNominalResourceFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::deserializer::DeprecatedNominalResourceFlag".
    
    (* 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::deserializer::DeprecatedNominalResourceFlag::NOMINAL_RESOURCE"
                          |) in
                        M.alloc (| M.read (| Value.String "NOMINAL_RESOURCE" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        let _ :=
                          M.is_struct_tuple (|
                            γ,
                            "move_binary_format::deserializer::DeprecatedNominalResourceFlag::NORMAL_STRUCT"
                          |) in
                        M.alloc (| M.read (| Value.String "NORMAL_STRUCT" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _, _ => 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_deserializer_DeprecatedNominalResourceFlag.
  
  Module Impl_move_binary_format_deserializer_DeprecatedNominalResourceFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::deserializer::DeprecatedNominalResourceFlag".
    
    (*
        fn from_u8(value: u8) -> BinaryLoaderResult<DeprecatedNominalResourceFlag> {
            match value {
                0x1 => Ok(DeprecatedNominalResourceFlag::NOMINAL_RESOURCE),
                0x2 => Ok(DeprecatedNominalResourceFlag::NORMAL_STRUCT),
                _ => Err(PartialVMError::new(StatusCode::UNKNOWN_ABILITY)),
            }
        }
    *)
    Definition from_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          M.read (|
            M.match_operator (|
              value,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 1
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::deserializer::DeprecatedNominalResourceFlag::NOMINAL_RESOURCE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 2
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::deserializer::DeprecatedNominalResourceFlag::NORMAL_STRUCT"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::errors::PartialVMError",
                              "new",
                              []
                            |),
                            [
                              Value.StructTuple
                                "move_core_types::vm_status::StatusCode::UNKNOWN_ABILITY"
                                []
                            ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_from_u8 : M.IsAssociatedFunction Self "from_u8" from_u8.
  End Impl_move_binary_format_deserializer_DeprecatedNominalResourceFlag.
  
  (*
  Enum DeprecatedKind
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "ALL";
          item := StructTuple [];
          discriminant := Some 1;
        };
        {
          name := "COPYABLE";
          item := StructTuple [];
          discriminant := Some 2;
        };
        {
          name := "RESOURCE";
          item := StructTuple [];
          discriminant := Some 3;
        }
      ];
  }
  *)
  
  Module Impl_move_binary_format_deserializer_DeprecatedKind.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::DeprecatedKind".
    
    (*
        fn from_u8(value: u8) -> BinaryLoaderResult<DeprecatedKind> {
            match value {
                0x1 => Ok(DeprecatedKind::ALL),
                0x2 => Ok(DeprecatedKind::COPYABLE),
                0x3 => Ok(DeprecatedKind::RESOURCE),
                _ => Err(PartialVMError::new(StatusCode::UNKNOWN_ABILITY)),
            }
        }
    *)
    Definition from_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          M.read (|
            M.match_operator (|
              value,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 1
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::deserializer::DeprecatedKind::ALL"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 2
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::deserializer::DeprecatedKind::COPYABLE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 3
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::deserializer::DeprecatedKind::RESOURCE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::errors::PartialVMError",
                              "new",
                              []
                            |),
                            [
                              Value.StructTuple
                                "move_core_types::vm_status::StatusCode::UNKNOWN_ABILITY"
                                []
                            ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_from_u8 : M.IsAssociatedFunction Self "from_u8" from_u8.
  End Impl_move_binary_format_deserializer_DeprecatedKind.
  
  Module Impl_move_binary_format_file_format_common_SerializedNativeStructFlag.
    Definition Self : Ty.t :=
      Ty.path "move_binary_format::file_format_common::SerializedNativeStructFlag".
    
    (*
        fn from_u8(value: u8) -> BinaryLoaderResult<SerializedNativeStructFlag> {
            match value {
                0x1 => Ok(SerializedNativeStructFlag::NATIVE),
                0x2 => Ok(SerializedNativeStructFlag::DECLARED),
                _ => Err(PartialVMError::new(StatusCode::UNKNOWN_NATIVE_STRUCT_FLAG)),
            }
        }
    *)
    Definition from_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          M.read (|
            M.match_operator (|
              value,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 1
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedNativeStructFlag::NATIVE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 2
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::SerializedNativeStructFlag::DECLARED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::errors::PartialVMError",
                              "new",
                              []
                            |),
                            [
                              Value.StructTuple
                                "move_core_types::vm_status::StatusCode::UNKNOWN_NATIVE_STRUCT_FLAG"
                                []
                            ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_from_u8 : M.IsAssociatedFunction Self "from_u8" from_u8.
  End Impl_move_binary_format_file_format_common_SerializedNativeStructFlag.
  
  Module Impl_move_binary_format_file_format_common_Opcodes.
    Definition Self : Ty.t := Ty.path "move_binary_format::file_format_common::Opcodes".
    
    (*
        fn from_u8(value: u8) -> BinaryLoaderResult<Opcodes> {
            match value {
                0x01 => Ok(Opcodes::POP),
                0x02 => Ok(Opcodes::RET),
                0x03 => Ok(Opcodes::BR_TRUE),
                0x04 => Ok(Opcodes::BR_FALSE),
                0x05 => Ok(Opcodes::BRANCH),
                0x06 => Ok(Opcodes::LD_U64),
                0x07 => Ok(Opcodes::LD_CONST),
                0x08 => Ok(Opcodes::LD_TRUE),
                0x09 => Ok(Opcodes::LD_FALSE),
                0x0A => Ok(Opcodes::COPY_LOC),
                0x0B => Ok(Opcodes::MOVE_LOC),
                0x0C => Ok(Opcodes::ST_LOC),
                0x0D => Ok(Opcodes::MUT_BORROW_LOC),
                0x0E => Ok(Opcodes::IMM_BORROW_LOC),
                0x0F => Ok(Opcodes::MUT_BORROW_FIELD),
                0x10 => Ok(Opcodes::IMM_BORROW_FIELD),
                0x11 => Ok(Opcodes::CALL),
                0x12 => Ok(Opcodes::PACK),
                0x13 => Ok(Opcodes::UNPACK),
                0x14 => Ok(Opcodes::READ_REF),
                0x15 => Ok(Opcodes::WRITE_REF),
                0x16 => Ok(Opcodes::ADD),
                0x17 => Ok(Opcodes::SUB),
                0x18 => Ok(Opcodes::MUL),
                0x19 => Ok(Opcodes::MOD),
                0x1A => Ok(Opcodes::DIV),
                0x1B => Ok(Opcodes::BIT_OR),
                0x1C => Ok(Opcodes::BIT_AND),
                0x1D => Ok(Opcodes::XOR),
                0x1E => Ok(Opcodes::OR),
                0x1F => Ok(Opcodes::AND),
                0x20 => Ok(Opcodes::NOT),
                0x21 => Ok(Opcodes::EQ),
                0x22 => Ok(Opcodes::NEQ),
                0x23 => Ok(Opcodes::LT),
                0x24 => Ok(Opcodes::GT),
                0x25 => Ok(Opcodes::LE),
                0x26 => Ok(Opcodes::GE),
                0x27 => Ok(Opcodes::ABORT),
                0x28 => Ok(Opcodes::NOP),
                0x29 => Ok(Opcodes::EXISTS_DEPRECATED),
                0x2A => Ok(Opcodes::MUT_BORROW_GLOBAL_DEPRECATED),
                0x2B => Ok(Opcodes::IMM_BORROW_GLOBAL_DEPRECATED),
                0x2C => Ok(Opcodes::MOVE_FROM_DEPRECATED),
                0x2D => Ok(Opcodes::MOVE_TO_DEPRECATED),
                0x2E => Ok(Opcodes::FREEZE_REF),
                0x2F => Ok(Opcodes::SHL),
                0x30 => Ok(Opcodes::SHR),
                0x31 => Ok(Opcodes::LD_U8),
                0x32 => Ok(Opcodes::LD_U128),
                0x33 => Ok(Opcodes::CAST_U8),
                0x34 => Ok(Opcodes::CAST_U64),
                0x35 => Ok(Opcodes::CAST_U128),
                0x36 => Ok(Opcodes::MUT_BORROW_FIELD_GENERIC),
                0x37 => Ok(Opcodes::IMM_BORROW_FIELD_GENERIC),
                0x38 => Ok(Opcodes::CALL_GENERIC),
                0x39 => Ok(Opcodes::PACK_GENERIC),
                0x3A => Ok(Opcodes::UNPACK_GENERIC),
                0x3B => Ok(Opcodes::EXISTS_GENERIC_DEPRECATED),
                0x3C => Ok(Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED),
                0x3D => Ok(Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED),
                0x3E => Ok(Opcodes::MOVE_FROM_GENERIC_DEPRECATED),
                0x3F => Ok(Opcodes::MOVE_TO_GENERIC_DEPRECATED),
                0x40 => Ok(Opcodes::VEC_PACK),
                0x41 => Ok(Opcodes::VEC_LEN),
                0x42 => Ok(Opcodes::VEC_IMM_BORROW),
                0x43 => Ok(Opcodes::VEC_MUT_BORROW),
                0x44 => Ok(Opcodes::VEC_PUSH_BACK),
                0x45 => Ok(Opcodes::VEC_POP_BACK),
                0x46 => Ok(Opcodes::VEC_UNPACK),
                0x47 => Ok(Opcodes::VEC_SWAP),
                0x48 => Ok(Opcodes::LD_U16),
                0x49 => Ok(Opcodes::LD_U32),
                0x4A => Ok(Opcodes::LD_U256),
                0x4B => Ok(Opcodes::CAST_U16),
                0x4C => Ok(Opcodes::CAST_U32),
                0x4D => Ok(Opcodes::CAST_U256),
                _ => Err(PartialVMError::new(StatusCode::UNKNOWN_OPCODE)),
            }
        }
    *)
    Definition from_u8 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          M.read (|
            M.match_operator (|
              value,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 1
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::POP"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 2
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::RET"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 3
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::BR_TRUE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 4
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::BR_FALSE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 5
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::BRANCH"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 6
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_U64"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 7
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_CONST"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 8
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_TRUE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 9
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_FALSE"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 10
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::COPY_LOC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 11
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MOVE_LOC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 12
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::ST_LOC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 13
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_LOC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 14
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_LOC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 15
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 16
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 17
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CALL"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 18
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::PACK"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 19
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::UNPACK"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 20
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::READ_REF"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 21
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::WRITE_REF"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 22
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::ADD"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 23
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::SUB"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 24
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MUL"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 25
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MOD"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 26
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::DIV"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 27
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::BIT_OR"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 28
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::BIT_AND"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 29
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::XOR"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 30
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [ Value.StructTuple "move_binary_format::file_format_common::Opcodes::OR" []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 31
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::AND"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 32
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::NOT"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 33
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [ Value.StructTuple "move_binary_format::file_format_common::Opcodes::EQ" []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 34
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::NEQ"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 35
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [ Value.StructTuple "move_binary_format::file_format_common::Opcodes::LT" []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 36
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [ Value.StructTuple "move_binary_format::file_format_common::Opcodes::GT" []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 37
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [ Value.StructTuple "move_binary_format::file_format_common::Opcodes::LE" []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 38
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [ Value.StructTuple "move_binary_format::file_format_common::Opcodes::GE" []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 39
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::ABORT"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 40
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::NOP"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 41
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::EXISTS_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 42
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 43
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 44
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MOVE_FROM_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 45
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MOVE_TO_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 46
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::FREEZE_REF"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 47
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::SHL"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 48
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::SHR"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 49
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_U8"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 50
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_U128"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 51
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CAST_U8"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 52
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CAST_U64"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 53
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CAST_U128"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 54
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_FIELD_GENERIC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 55
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_FIELD_GENERIC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 56
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CALL_GENERIC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 57
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::PACK_GENERIC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 58
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::UNPACK_GENERIC"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 59
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::EXISTS_GENERIC_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 60
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MUT_BORROW_GLOBAL_GENERIC_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 61
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::IMM_BORROW_GLOBAL_GENERIC_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 62
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MOVE_FROM_GENERIC_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 63
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::MOVE_TO_GENERIC_DEPRECATED"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 64
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_PACK"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 65
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_LEN"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 66
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_IMM_BORROW"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 67
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_MUT_BORROW"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 68
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_PUSH_BACK"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 69
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_POP_BACK"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 70
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_UNPACK"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 71
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::VEC_SWAP"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 72
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_U16"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 73
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_U32"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 74
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::LD_U256"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 75
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CAST_U16"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 76
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CAST_U32"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ :=
                      M.is_constant_or_break_match (|
                        M.read (| γ |),
                        Value.Integer IntegerKind.U8 77
                      |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "move_binary_format::file_format_common::Opcodes::CAST_U256"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "move_binary_format::errors::PartialVMError",
                              "new",
                              []
                            |),
                            [
                              Value.StructTuple
                                "move_core_types::vm_status::StatusCode::UNKNOWN_OPCODE"
                                []
                            ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_from_u8 : M.IsAssociatedFunction Self "from_u8" from_u8.
  End Impl_move_binary_format_file_format_common_Opcodes.
  
  (* StructRecord
    {
      name := "VersionedBinary";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("binary_config",
            Ty.apply
              (Ty.path "&")
              []
              [ Ty.path "move_binary_format::binary_config::BinaryConfig" ]);
          ("binary", Ty.apply (Ty.path "&") [] [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]);
          ("version", Ty.path "u32");
          ("tables",
            Ty.apply
              (Ty.path "alloc::vec::Vec")
              []
              [ Ty.path "move_binary_format::deserializer::Table"; Ty.path "alloc::alloc::Global"
              ]);
          ("module_idx", Ty.path "move_binary_format::file_format::ModuleHandleIndex");
          ("data_offset", Ty.path "usize");
          ("binary_end_offset", Ty.path "usize")
        ];
    } *)
  
  Module Impl_core_fmt_Debug_for_move_binary_format_deserializer_VersionedBinary.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::VersionedBinary".
    
    (* 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.read (|
            let~ names :=
              M.alloc (|
                M.alloc (|
                  Value.Array
                    [
                      M.read (| Value.String "binary_config" |);
                      M.read (| Value.String "binary" |);
                      M.read (| Value.String "version" |);
                      M.read (| Value.String "tables" |);
                      M.read (| Value.String "module_idx" |);
                      M.read (| Value.String "data_offset" |);
                      M.read (| Value.String "binary_end_offset" |)
                    ]
                |)
              |) in
            let~ values :=
              M.alloc (|
                M.alloc (|
                  Value.Array
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "binary_config"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "binary"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "version"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "tables"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "module_idx"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "move_binary_format::deserializer::VersionedBinary",
                        "data_offset"
                      |);
                      M.alloc (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "move_binary_format::deserializer::VersionedBinary",
                          "binary_end_offset"
                        |)
                      |)
                    ]
                |)
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::Formatter",
                  "debug_struct_fields_finish",
                  []
                |),
                [
                  M.read (| f |);
                  M.read (| Value.String "VersionedBinary" |);
                  M.read (| names |);
                  M.read (| values |)
                ]
              |)
            |)
          |)))
      | _, _, _ => 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_deserializer_VersionedBinary.
  
  (* StructRecord
    {
      name := "VersionedCursor";
      const_params := [];
      ty_params := [];
      fields :=
        [
          ("version", Ty.path "u32");
          ("cursor",
            Ty.apply
              (Ty.path "std::io::cursor::Cursor")
              []
              [ Ty.apply (Ty.path "&") [] [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ] ])
        ];
    } *)
  
  Module Impl_core_fmt_Debug_for_move_binary_format_deserializer_VersionedCursor.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::VersionedCursor".
    
    (* 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_field2_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "VersionedCursor" |);
              M.read (| Value.String "version" |);
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::VersionedCursor",
                "version"
              |);
              M.read (| Value.String "cursor" |);
              M.alloc (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "move_binary_format::deserializer::VersionedCursor",
                  "cursor"
                |)
              |)
            ]
          |)))
      | _, _, _ => 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_deserializer_VersionedCursor.
  
  Module Impl_move_binary_format_deserializer_VersionedBinary.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::VersionedBinary".
    
    (*
        fn initialize(
            binary: &'a [u8],
            binary_config: &'b BinaryConfig,
            load_module_idx: bool,
        ) -> BinaryLoaderResult<Self> {
            let binary_len = binary.len();
            let mut cursor = Cursor::<&'a [u8]>::new(binary);
            // check magic
            let mut magic = [0u8; BinaryConstants::MOVE_MAGIC_SIZE];
            if let Ok(count) = cursor.read(&mut magic) {
                if count != BinaryConstants::MOVE_MAGIC_SIZE || magic != BinaryConstants::MOVE_MAGIC {
                    return Err(PartialVMError::new(StatusCode::BAD_MAGIC));
                }
            } else {
                return Err(PartialVMError::new(StatusCode::MALFORMED)
                    .with_message("Bad binary header".to_string()));
            }
            // load binary version
            let version = match read_u32(&mut cursor) {
                Ok(v) => v,
                Err(_) => {
                    return Err(PartialVMError::new(StatusCode::MALFORMED)
                        .with_message("Bad binary header".to_string()));
                }
            };
            if version == 0 || version > u32::min(binary_config.max_binary_format_version, VERSION_MAX)
            {
                return Err(PartialVMError::new(StatusCode::UNKNOWN_VERSION));
            }
    
            let mut versioned_cursor = VersionedCursor { version, cursor };
            // load table info
            let table_count = load_table_count(&mut versioned_cursor)?;
            let mut tables: Vec<Table> = Vec::new();
            read_tables(&mut versioned_cursor, table_count, &mut tables)?;
            let table_size = check_tables(&mut tables, binary_len)?;
            if table_size as u64 + versioned_cursor.position() > binary_len as u64 {
                return Err(PartialVMError::new(StatusCode::MALFORMED)
                    .with_message("Table size too big".to_string()));
            }
    
            // save "start offset" for table content (data)
            let data_offset = versioned_cursor.position() as usize;
    
            // load module idx (self id) - at the end of the binary. Why?
            let module_idx = if load_module_idx {
                versioned_cursor.set_position((data_offset + table_size as usize) as u64);
                load_module_handle_index(&mut versioned_cursor)?
            } else {
                ModuleHandleIndex(0)
            };
            // end of binary
            let binary_end_offset = versioned_cursor.position() as usize;
            Ok(Self {
                binary_config,
                binary,
                version,
                tables,
                module_idx,
                data_offset,
                binary_end_offset,
            })
        }
    *)
    Definition initialize (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ binary; binary_config; load_module_idx ] =>
        ltac:(M.monadic
          (let binary := M.alloc (| binary |) in
          let binary_config := M.alloc (| binary_config |) in
          let load_module_idx := M.alloc (| load_module_idx |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ binary_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                        "len",
                        []
                      |),
                      [ M.read (| binary |) ]
                    |)
                  |) in
                let~ cursor :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "std::io::cursor::Cursor")
                          []
                          [
                            Ty.apply
                              (Ty.path "&")
                              []
                              [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]
                          ],
                        "new",
                        []
                      |),
                      [ M.read (| binary |) ]
                    |)
                  |) in
                let~ magic :=
                  M.alloc (|
                    repeat (| Value.Integer IntegerKind.U8 0, Value.Integer IntegerKind.Usize 4 |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.alloc (|
                              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",
                                  []
                                |),
                                [ cursor; magic ]
                              |)
                            |) in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let count := M.copy (| γ0_0 |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        LogicalOp.or (|
                                          BinOp.ne (|
                                            M.read (| count |),
                                            M.read (|
                                              M.get_constant (|
                                                "move_binary_format::file_format_common::MOVE_MAGIC_SIZE"
                                              |)
                                            |)
                                          |),
                                          ltac:(M.monadic
                                            (M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.apply
                                                  (Ty.path "array")
                                                  [ Value.Integer IntegerKind.Usize 4 ]
                                                  [ Ty.path "u8" ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "array")
                                                    [ Value.Integer IntegerKind.Usize 4 ]
                                                    [ Ty.path "u8" ]
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                magic;
                                                M.get_constant (|
                                                  "move_binary_format::file_format_common::MOVE_MAGIC"
                                                |)
                                              ]
                                            |)))
                                        |)
                                      |)) 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.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path
                                                    "move_binary_format::errors::PartialVMError",
                                                  "new",
                                                  []
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "move_core_types::vm_status::StatusCode::BAD_MAGIC"
                                                    []
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ => ltac:(M.monadic (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 "move_binary_format::errors::PartialVMError",
                                          "with_message",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "move_binary_format::errors::PartialVMError",
                                              "new",
                                              []
                                            |),
                                            [
                                              Value.StructTuple
                                                "move_core_types::vm_status::StatusCode::MALFORMED"
                                                []
                                            ]
                                          |);
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "alloc::string::ToString",
                                              Ty.path "str",
                                              [],
                                              "to_string",
                                              []
                                            |),
                                            [ M.read (| Value.String "Bad binary header" |) ]
                                          |)
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)))
                    ]
                  |) in
                let~ version :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_function (|
                            "move_binary_format::file_format_common::read_u32",
                            []
                          |),
                          [ cursor ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::result::Result::Ok",
                                0
                              |) in
                            let v := M.copy (| γ0_0 |) in
                            v));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::result::Result::Err",
                                0
                              |) in
                            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 "move_binary_format::errors::PartialVMError",
                                            "with_message",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "move_binary_format::errors::PartialVMError",
                                                "new",
                                                []
                                              |),
                                              [
                                                Value.StructTuple
                                                  "move_core_types::vm_status::StatusCode::MALFORMED"
                                                  []
                                              ]
                                            |);
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "alloc::string::ToString",
                                                Ty.path "str",
                                                [],
                                                "to_string",
                                                []
                                              |),
                                              [ M.read (| Value.String "Bad binary header" |) ]
                                            |)
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.or (|
                                  BinOp.eq (|
                                    M.read (| version |),
                                    Value.Integer IntegerKind.U32 0
                                  |),
                                  ltac:(M.monadic
                                    (BinOp.gt (|
                                      M.read (| version |),
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::cmp::Ord",
                                          Ty.path "u32",
                                          [],
                                          "min",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| binary_config |),
                                              "move_binary_format::binary_config::BinaryConfig",
                                              "max_binary_format_version"
                                            |)
                                          |);
                                          M.read (|
                                            M.get_constant (|
                                              "move_binary_format::file_format_common::VERSION_MAX"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |)))
                                |)
                              |)) 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.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "move_binary_format::errors::PartialVMError",
                                          "new",
                                          []
                                        |),
                                        [
                                          Value.StructTuple
                                            "move_core_types::vm_status::StatusCode::UNKNOWN_VERSION"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ versioned_cursor :=
                  M.alloc (|
                    Value.StructRecord
                      "move_binary_format::deserializer::VersionedCursor"
                      [ ("version", M.read (| version |)); ("cursor", M.read (| cursor |)) ]
                  |) in
                let~ table_count :=
                  M.copy (|
                    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.path "u8"; Ty.path "move_binary_format::errors::PartialVMError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "move_binary_format::deserializer::load_table_count",
                                []
                              |),
                              [ versioned_cursor ]
                            |)
                          ]
                        |)
                      |),
                      [
                        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
                                              "move_binary_format::deserializer::VersionedBinary";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ]
                                        ],
                                        "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~ tables :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [
                            Ty.path "move_binary_format::deserializer::Table";
                            Ty.path "alloc::alloc::Global"
                          ],
                        "new",
                        []
                      |),
                      []
                    |)
                  |) 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 "move_binary_format::errors::PartialVMError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "move_binary_format::deserializer::read_tables",
                              []
                            |),
                            [ versioned_cursor; M.read (| table_count |); tables ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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
                                            "move_binary_format::deserializer::VersionedBinary";
                                          Ty.path "move_binary_format::errors::PartialVMError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ]
                                      ],
                                      "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~ table_size :=
                  M.copy (|
                    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.path "u32"; Ty.path "move_binary_format::errors::PartialVMError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "move_binary_format::deserializer::check_tables",
                                []
                              |),
                              [ tables; M.read (| binary_len |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        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
                                              "move_binary_format::deserializer::VersionedBinary";
                                            Ty.path "move_binary_format::errors::PartialVMError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "move_binary_format::errors::PartialVMError"
                                            ]
                                        ],
                                        "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~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.gt (|
                                  BinOp.Wrap.add (|
                                    M.rust_cast (M.read (| table_size |)),
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "move_binary_format::deserializer::VersionedCursor",
                                        "position",
                                        []
                                      |),
                                      [ versioned_cursor ]
                                    |)
                                  |),
                                  M.rust_cast (M.read (| binary_len |))
                                |)
                              |)) 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.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "move_binary_format::errors::PartialVMError",
                                          "with_message",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "move_binary_format::errors::PartialVMError",
                                              "new",
                                              []
                                            |),
                                            [
                                              Value.StructTuple
                                                "move_core_types::vm_status::StatusCode::MALFORMED"
                                                []
                                            ]
                                          |);
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "alloc::string::ToString",
                                              Ty.path "str",
                                              [],
                                              "to_string",
                                              []
                                            |),
                                            [ M.read (| Value.String "Table size too big" |) ]
                                          |)
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let~ data_offset :=
                  M.alloc (|
                    M.rust_cast
                      (M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "move_binary_format::deserializer::VersionedCursor",
                          "position",
                          []
                        |),
                        [ versioned_cursor ]
                      |))
                  |) in
                let~ module_idx :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.use load_module_idx 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.path "move_binary_format::deserializer::VersionedCursor",
                                    "set_position",
                                    []
                                  |),
                                  [
                                    versioned_cursor;
                                    M.rust_cast
                                      (BinOp.Wrap.add (|
                                        M.read (| data_offset |),
                                        M.rust_cast (M.read (| table_size |))
                                      |))
                                  ]
                                |)
                              |) in
                            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.path
                                          "move_binary_format::file_format::ModuleHandleIndex";
                                        Ty.path "move_binary_format::errors::PartialVMError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_function (|
                                        "move_binary_format::deserializer::load_module_handle_index",
                                        []
                                      |),
                                      [ versioned_cursor ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                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
                                                      "move_binary_format::deserializer::VersionedBinary";
                                                    Ty.path
                                                      "move_binary_format::errors::PartialVMError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path
                                                        "move_binary_format::errors::PartialVMError"
                                                    ]
                                                ],
                                                "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))
                              ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (|
                              Value.StructTuple
                                "move_binary_format::file_format::ModuleHandleIndex"
                                [ Value.Integer IntegerKind.U16 0 ]
                            |)))
                      ]
                    |)
                  |) in
                let~ binary_end_offset :=
                  M.alloc (|
                    M.rust_cast
                      (M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "move_binary_format::deserializer::VersionedCursor",
                          "position",
                          []
                        |),
                        [ versioned_cursor ]
                      |))
                  |) in
                M.alloc (|
                  Value.StructTuple
                    "core::result::Result::Ok"
                    [
                      Value.StructRecord
                        "move_binary_format::deserializer::VersionedBinary"
                        [
                          ("binary_config", M.read (| binary_config |));
                          ("binary", M.read (| binary |));
                          ("version", M.read (| version |));
                          ("tables", M.read (| tables |));
                          ("module_idx", M.read (| module_idx |));
                          ("data_offset", M.read (| data_offset |));
                          ("binary_end_offset", M.read (| binary_end_offset |))
                        ]
                    ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_initialize : M.IsAssociatedFunction Self "initialize" initialize.
    
    (*
        fn version(&self) -> u32 {
            self.version
        }
    *)
    Definition version (ε : 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 (|
              M.read (| self |),
              "move_binary_format::deserializer::VersionedBinary",
              "version"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_version : M.IsAssociatedFunction Self "version" version.
    
    (*
        fn module_idx(&self) -> ModuleHandleIndex {
            self.module_idx
        }
    *)
    Definition module_idx (ε : 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 (|
              M.read (| self |),
              "move_binary_format::deserializer::VersionedBinary",
              "module_idx"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_module_idx : M.IsAssociatedFunction Self "module_idx" module_idx.
    
    (*
        fn binary_end_offset(&self) -> usize {
            self.binary_end_offset
        }
    *)
    Definition binary_end_offset (ε : 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 (|
              M.read (| self |),
              "move_binary_format::deserializer::VersionedBinary",
              "binary_end_offset"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_binary_end_offset :
      M.IsAssociatedFunction Self "binary_end_offset" binary_end_offset.
    
    (*
        fn new_cursor(&self, start: usize, end: usize) -> VersionedCursor<'a> {
            VersionedCursor {
                cursor: Cursor::new(&self.binary[start + self.data_offset..end + self.data_offset]),
                version: self.version(),
            }
        }
    *)
    Definition new_cursor (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; start; end_ ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let start := M.alloc (| start |) in
          let end_ := M.alloc (| end_ |) in
          Value.StructRecord
            "move_binary_format::deserializer::VersionedCursor"
            [
              ("cursor",
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "std::io::cursor::Cursor")
                      []
                      [ Ty.apply (Ty.path "&") [] [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]
                      ],
                    "new",
                    []
                  |),
                  [
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::ops::index::Index",
                        Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
                        [ Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "usize" ] ],
                        "index",
                        []
                      |),
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "move_binary_format::deserializer::VersionedBinary",
                            "binary"
                          |)
                        |);
                        Value.StructRecord
                          "core::ops::range::Range"
                          [
                            ("start",
                              BinOp.Wrap.add (|
                                M.read (| start |),
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "move_binary_format::deserializer::VersionedBinary",
                                    "data_offset"
                                  |)
                                |)
                              |));
                            ("end_",
                              BinOp.Wrap.add (|
                                M.read (| end_ |),
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "move_binary_format::deserializer::VersionedBinary",
                                    "data_offset"
                                  |)
                                |)
                              |))
                          ]
                      ]
                    |)
                  ]
                |));
              ("version",
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.path "move_binary_format::deserializer::VersionedBinary",
                    "version",
                    []
                  |),
                  [ M.read (| self |) ]
                |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new_cursor : M.IsAssociatedFunction Self "new_cursor" new_cursor.
    
    (*
        fn slice(&self, start: usize, end: usize) -> &'a [u8] {
            &self.binary[start + self.data_offset..end + self.data_offset]
        }
    *)
    Definition slice (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; start; end_ ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let start := M.alloc (| start |) in
          let end_ := M.alloc (| end_ |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::ops::index::Index",
              Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ],
              [ Ty.apply (Ty.path "core::ops::range::Range") [] [ Ty.path "usize" ] ],
              "index",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "move_binary_format::deserializer::VersionedBinary",
                  "binary"
                |)
              |);
              Value.StructRecord
                "core::ops::range::Range"
                [
                  ("start",
                    BinOp.Wrap.add (|
                      M.read (| start |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "move_binary_format::deserializer::VersionedBinary",
                          "data_offset"
                        |)
                      |)
                    |));
                  ("end_",
                    BinOp.Wrap.add (|
                      M.read (| end_ |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "move_binary_format::deserializer::VersionedBinary",
                          "data_offset"
                        |)
                      |)
                    |))
                ]
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_slice : M.IsAssociatedFunction Self "slice" slice.
    
    (*
        fn check_no_extraneous_bytes(&self) -> bool {
            self.binary_config.check_no_extraneous_bytes
        }
    *)
    Definition check_no_extraneous_bytes
        (ε : 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 (|
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "move_binary_format::deserializer::VersionedBinary",
                  "binary_config"
                |)
              |),
              "move_binary_format::binary_config::BinaryConfig",
              "check_no_extraneous_bytes"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_check_no_extraneous_bytes :
      M.IsAssociatedFunction Self "check_no_extraneous_bytes" check_no_extraneous_bytes.
  End Impl_move_binary_format_deserializer_VersionedBinary.
  
  Module Impl_move_binary_format_deserializer_VersionedCursor.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::VersionedCursor".
    
    (*
        fn version(&self) -> u32 {
            self.version
        }
    *)
    Definition version (ε : 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 (|
              M.read (| self |),
              "move_binary_format::deserializer::VersionedCursor",
              "version"
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_version : M.IsAssociatedFunction Self "version" version.
    
    (*
        fn position(&self) -> u64 {
            self.cursor.position()
        }
    *)
    Definition position (ε : 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 "std::io::cursor::Cursor")
                []
                [ Ty.apply (Ty.path "&") [] [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ] ],
              "position",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::VersionedCursor",
                "cursor"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_position : M.IsAssociatedFunction Self "position" position.
    
    (*
        fn read_u8(&mut self) -> anyhow::Result<u8> {
            read_u8(&mut self.cursor)
        }
    *)
    Definition read_u8 (ε : 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_function (| "move_binary_format::file_format_common::read_u8", [] |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::VersionedCursor",
                "cursor"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_read_u8 : M.IsAssociatedFunction Self "read_u8" read_u8.
    
    (*
        fn set_position(&mut self, pos: u64) {
            self.cursor.set_position(pos);
        }
    *)
    Definition set_position (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; pos ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let pos := M.alloc (| pos |) in
          M.read (|
            let~ _ :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "std::io::cursor::Cursor")
                      []
                      [ Ty.apply (Ty.path "&") [] [ Ty.apply (Ty.path "slice") [] [ Ty.path "u8" ] ]
                      ],
                    "set_position",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "move_binary_format::deserializer::VersionedCursor",
                      "cursor"
                    |);
                    M.read (| pos |)
                  ]
                |)
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_set_position : M.IsAssociatedFunction Self "set_position" set_position.
    
    (*
        fn read_u32(&mut self) -> anyhow::Result<u32> {
            read_u32(&mut self.cursor)
        }
    *)
    Definition read_u32 (ε : 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_function (| "move_binary_format::file_format_common::read_u32", [] |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::VersionedCursor",
                "cursor"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_read_u32 : M.IsAssociatedFunction Self "read_u32" read_u32.
    
    (*
        fn read_uleb128_as_u64(&mut self) -> anyhow::Result<u64> {
            read_uleb128_as_u64(&mut self.cursor)
        }
    *)
    Definition read_uleb128_as_u64 (ε : 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_function (| "move_binary_format::file_format_common::read_uleb128_as_u64", [] |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::VersionedCursor",
                "cursor"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_read_uleb128_as_u64 :
      M.IsAssociatedFunction Self "read_uleb128_as_u64" read_uleb128_as_u64.
  End Impl_move_binary_format_deserializer_VersionedCursor.
  
  Module Impl_std_io_Read_for_move_binary_format_deserializer_VersionedCursor.
    Definition Self : Ty.t := Ty.path "move_binary_format::deserializer::VersionedCursor".
    
    (*
        fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
            self.cursor.read(buf)
        }
    *)
    Definition read (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; buf ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let buf := M.alloc (| buf |) in
          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",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_binary_format::deserializer::VersionedCursor",
                "cursor"
              |);
              M.read (| buf |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "std::io::Read"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("read", InstanceField.Method read) ].
  End Impl_std_io_Read_for_move_binary_format_deserializer_VersionedCursor.
End deserializer.
