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

Module parser.
  (*
  Enum Token
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "U8Type";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "U16Type";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "U32Type";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "U64Type";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "U128Type";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "U256Type";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "BoolType";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "AddressType";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "VectorType";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "SignerType";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Whitespace";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "Name";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "Address";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "U8";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "U16";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "U32";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "U64";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "U128";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "U256";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "Bytes";
          item := StructTuple [ Ty.path "alloc::string::String" ];
          discriminant := None;
        };
        {
          name := "True";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "False";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "ColonColon";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Lt";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Gt";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Comma";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "EOF";
          item := StructTuple [];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_cmp_Eq_for_move_core_types_parser_Token.
    Definition Self : Ty.t := Ty.path "move_core_types::parser::Token".
    
    (* Eq *)
    Definition assert_receiver_is_total_eq
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::Eq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ].
  End Impl_core_cmp_Eq_for_move_core_types_parser_Token.
  
  Module Impl_core_marker_StructuralPartialEq_for_move_core_types_parser_Token.
    Definition Self : Ty.t := Ty.path "move_core_types::parser::Token".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_move_core_types_parser_Token.
  
  Module Impl_core_cmp_PartialEq_for_move_core_types_parser_Token.
    Definition Self : Ty.t := Ty.path "move_core_types::parser::Token".
    
    (* PartialEq *)
    Definition eq (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          M.read (|
            let~ __self_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "move_core_types::parser::Token" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            let~ __arg1_discr :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "move_core_types::parser::Token" ]
                  |),
                  [ M.read (| other |) ]
                |)
              |) in
            M.alloc (|
              LogicalOp.and (|
                BinOp.eq (| M.read (| __self_discr |), M.read (| __arg1_discr |) |),
                ltac:(M.monadic
                  (M.read (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |),
                      [
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::Whitespace",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::Whitespace",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::Name",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::Name",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::Address",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::Address",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::U8",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::U8",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::U16",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::U16",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::U32",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::U32",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::U64",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::U64",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::U128",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::U128",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::U256",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::U256",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        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_0 := M.read (| γ0_0 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_0,
                                "move_core_types::parser::Token::Bytes",
                                0
                              |) in
                            let __self_0 := M.alloc (| γ2_0 |) in
                            let γ0_1 := M.read (| γ0_1 |) in
                            let γ2_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ0_1,
                                "move_core_types::parser::Token::Bytes",
                                0
                              |) in
                            let __arg1_0 := M.alloc (| γ2_0 |) in
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::cmp::PartialEq",
                                  Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ],
                                  [ Ty.apply (Ty.path "&") [] [ Ty.path "alloc::string::String" ] ],
                                  "eq",
                                  []
                                |),
                                [ __self_0; __arg1_0 ]
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |)))
                      ]
                    |)
                  |)))
              |)
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_move_core_types_parser_Token.
  
  Module Impl_core_fmt_Debug_for_move_core_types_parser_Token.
    Definition Self : Ty.t := Ty.path "move_core_types::parser::Token".
    
    (* 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 (|
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::U8Type" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U8Type" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::U16Type" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U16Type" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::U32Type" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U32Type" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::U64Type" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U64Type" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::U128Type" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U128Type" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::U256Type" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U256Type" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::BoolType" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "BoolType" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::AddressType" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "AddressType" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::VectorType" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "VectorType" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::SignerType" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "SignerType" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::Whitespace",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Whitespace" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::Name",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Name" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::Address",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Address" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::U8",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U8" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::U16",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U16" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::U32",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U32" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::U64",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U64" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::U128",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U128" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::U256",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "U256" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "move_core_types::parser::Token::Bytes",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Bytes" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::True" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "True" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::False" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "False" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ :=
                      M.is_struct_tuple (| γ, "move_core_types::parser::Token::ColonColon" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "ColonColon" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::Lt" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Lt" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::Gt" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Gt" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::Comma" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Comma" |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let _ := M.is_struct_tuple (| γ, "move_core_types::parser::Token::EOF" |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "EOF" |) ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => 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_core_types_parser_Token.
  
  Module Impl_move_core_types_parser_Token.
    Definition Self : Ty.t := Ty.path "move_core_types::parser::Token".
    
    (*
        fn is_whitespace(&self) -> bool {
            matches!(self, Self::Whitespace(_))
        }
    *)
    Definition is_whitespace (ε : 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_core_types::parser::Token::Whitespace",
                        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_whitespace :
      M.IsAssociatedFunction Self "is_whitespace" is_whitespace.
  End Impl_move_core_types_parser_Token.
  
  (*
  fn token_as_name(tok: Token) -> Result<String> {
      use Token::*;
      Ok(match tok {
          U8Type => "u8".to_string(),
          U16Type => "u16".to_string(),
          U32Type => "u32".to_string(),
          U64Type => "u64".to_string(),
          U128Type => "u128".to_string(),
          U256Type => "u256".to_string(),
          BoolType => "bool".to_string(),
          AddressType => "address".to_string(),
          VectorType => "vector".to_string(),
          True => "true".to_string(),
          False => "false".to_string(),
          SignerType => "signer".to_string(),
          Name(s) => s,
          Whitespace(_) | Address(_) | U8(_) | U16(_) | U32(_) | U64(_) | U128(_) | U256(_)
          | Bytes(_) | ColonColon | Lt | Gt | Comma | EOF => {
              bail!("Invalid token. Expected a name but got {:?}", tok)
          }
      })
  }
  *)
  Definition token_as_name (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ tok ] =>
      ltac:(M.monadic
        (let tok := M.alloc (| tok |) in
        M.catch_return (|
          ltac:(M.monadic
            (Value.StructTuple
              "core::result::Result::Ok"
              [
                M.read (|
                  M.match_operator (|
                    tok,
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::U8Type" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "u8" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::U16Type" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "u16" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::U32Type" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "u32" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::U64Type" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "u64" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::U128Type" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "u128" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::U256Type" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "u256" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::BoolType" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "bool" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (|
                              γ,
                              "move_core_types::parser::Token::AddressType"
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "address" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (|
                              γ,
                              "move_core_types::parser::Token::VectorType"
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "vector" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::True" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "true" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (| γ, "move_core_types::parser::Token::False" |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "false" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.is_struct_tuple (|
                              γ,
                              "move_core_types::parser::Token::SignerType"
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "alloc::string::ToString",
                                Ty.path "str",
                                [],
                                "to_string",
                                []
                              |),
                              [ M.read (| Value.String "signer" |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "move_core_types::parser::Token::Name",
                              0
                            |) in
                          let s := M.copy (| γ0_0 |) in
                          s));
                      fun γ =>
                        ltac:(M.monadic
                          (M.find_or_pattern (|
                            γ,
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::Whitespace",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::Address",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::U8",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::U16",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::U32",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::U64",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::U128",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::U256",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "move_core_types::parser::Token::Bytes",
                                      0
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.is_struct_tuple (|
                                      γ,
                                      "move_core_types::parser::Token::ColonColon"
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.is_struct_tuple (|
                                      γ,
                                      "move_core_types::parser::Token::Lt"
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.is_struct_tuple (|
                                      γ,
                                      "move_core_types::parser::Token::Gt"
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.is_struct_tuple (|
                                      γ,
                                      "move_core_types::parser::Token::Comma"
                                    |) in
                                  Value.Tuple []));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.is_struct_tuple (|
                                      γ,
                                      "move_core_types::parser::Token::EOF"
                                    |) in
                                  Value.Tuple []))
                            ],
                            M.closure
                              (fun γ =>
                                ltac:(M.monadic
                                  match γ with
                                  | [] =>
                                    ltac:(M.monadic
                                      (M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              Value.StructTuple
                                                "core::result::Result::Err"
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.path "anyhow::Error",
                                                      "msg",
                                                      [ Ty.path "alloc::string::String" ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "core::hint::must_use",
                                                          [ Ty.path "alloc::string::String" ]
                                                        |),
                                                        [
                                                          M.read (|
                                                            let~ res :=
                                                              M.alloc (|
                                                                M.call_closure (|
                                                                  M.get_function (|
                                                                    "alloc::fmt::format",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::Arguments",
                                                                        "new_v1",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.alloc (|
                                                                          Value.Array
                                                                            [
                                                                              M.read (|
                                                                                Value.String
                                                                                  "Invalid token. Expected a name but got "
                                                                              |)
                                                                            ]
                                                                        |);
                                                                        M.alloc (|
                                                                          Value.Array
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "core::fmt::rt::Argument",
                                                                                  "new_debug",
                                                                                  [
                                                                                    Ty.path
                                                                                      "move_core_types::parser::Token"
                                                                                  ]
                                                                                |),
                                                                                [ tok ]
                                                                              |)
                                                                            ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |) in
                                                            res
                                                          |)
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)))
                                  | _ => M.impossible "wrong number of arguments"
                                  end))
                          |)))
                    ]
                  |)
                |)
              ]))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_token_as_name :
    M.IsFunction "move_core_types::parser::token_as_name" token_as_name.
  
  (*
  fn name_token(s: String) -> Token {
      match s.as_str() {
          "u8" => Token::U8Type,
          "u16" => Token::U16Type,
          "u32" => Token::U32Type,
          "u64" => Token::U64Type,
          "u128" => Token::U128Type,
          "u256" => Token::U256Type,
          "bool" => Token::BoolType,
          "address" => Token::AddressType,
          "vector" => Token::VectorType,
          "true" => Token::True,
          "false" => Token::False,
          "signer" => Token::SignerType,
          _ => Token::Name(s),
      }
  }
  *)
  Definition name_token (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.read (|
          M.match_operator (|
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (| Ty.path "alloc::string::String", "as_str", [] |),
                [ s ]
              |)
            |),
            [
              fun γ =>
                ltac:(M.monadic
                  (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.String "u8" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::U8Type" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.String "u16" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::U16Type" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.String "u32" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::U32Type" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.String "u64" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::U64Type" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "u128" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::U128Type" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "u256" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::U256Type" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "bool" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::BoolType" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "address" |) in
                  M.alloc (|
                    Value.StructTuple "move_core_types::parser::Token::AddressType" []
                  |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "vector" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::VectorType" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "true" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::True" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "false" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::False" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (let _ :=
                    M.is_constant_or_break_match (| M.read (| γ |), Value.String "signer" |) in
                  M.alloc (| Value.StructTuple "move_core_types::parser::Token::SignerType" [] |)));
              fun γ =>
                ltac:(M.monadic
                  (M.alloc (|
                    Value.StructTuple "move_core_types::parser::Token::Name" [ M.read (| s |) ]
                  |)))
            ]
          |)
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_name_token : M.IsFunction "move_core_types::parser::name_token" name_token.
  
  (*
  fn next_number(initial: char, mut it: impl Iterator<Item = char>) -> Result<(Token, usize)> {
      let mut num = String::new();
      num.push(initial);
      loop {
          match it.next() {
              Some(c) if c.is_ascii_digit() || c == '_' => num.push(c),
              Some(c) if c.is_alphanumeric() => {
                  let mut suffix = String::new();
                  suffix.push(c);
                  loop {
                      match it.next() {
                          Some(c) if c.is_ascii_alphanumeric() => suffix.push(c),
                          _ => {
                              let len = num.len() + suffix.len();
                              let tok = match suffix.as_str() {
                                  "u8" => Token::U8(num),
                                  "u16" => Token::U16(num),
                                  "u32" => Token::U32(num),
                                  "u64" => Token::U64(num),
                                  "u128" => Token::U128(num),
                                  "u256" => Token::U256(num),
                                  _ => bail!("invalid suffix"),
                              };
                              return Ok((tok, len));
                          }
                      }
                  }
              }
              _ => {
                  let len = num.len();
                  return Ok((Token::U64(num), len));
              }
          }
      }
  }
  *)
  Definition next_number (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [ impl_Iterator_Item___char_ ], [ initial; it ] =>
      ltac:(M.monadic
        (let initial := M.alloc (| initial |) in
        let it := M.alloc (| it |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ num :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |),
                    []
                  |)
                |) in
              let~ _ :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |),
                    [ num; M.read (| initial |) ]
                  |)
                |) in
              M.alloc (|
                M.never_to_any (|
                  M.read (|
                    M.loop (|
                      ltac:(M.monadic
                        (M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::iter::traits::iterator::Iterator",
                                impl_Iterator_Item___char_,
                                [],
                                "next",
                                []
                              |),
                              [ it ]
                            |)
                          |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ0_0 :=
                                  M.SubPointer.get_struct_tuple_field (|
                                    γ,
                                    "core::option::Option::Some",
                                    0
                                  |) in
                                let c := M.copy (| γ0_0 |) in
                                let γ :=
                                  M.alloc (|
                                    LogicalOp.or (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "char",
                                          "is_ascii_digit",
                                          []
                                        |),
                                        [ c ]
                                      |),
                                      ltac:(M.monadic
                                        (BinOp.eq (| M.read (| c |), Value.UnicodeChar 95 |)))
                                    |)
                                  |) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "alloc::string::String",
                                      "push",
                                      []
                                    |),
                                    [ num; M.read (| c |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let γ0_0 :=
                                  M.SubPointer.get_struct_tuple_field (|
                                    γ,
                                    "core::option::Option::Some",
                                    0
                                  |) in
                                let c := M.copy (| γ0_0 |) in
                                let γ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "char",
                                        "is_alphanumeric",
                                        []
                                      |),
                                      [ M.read (| c |) ]
                                    |)
                                  |) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                let~ suffix :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "alloc::string::String",
                                        "new",
                                        []
                                      |),
                                      []
                                    |)
                                  |) in
                                let~ _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path "alloc::string::String",
                                        "push",
                                        []
                                      |),
                                      [ suffix; M.read (| c |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.never_to_any (|
                                    M.read (|
                                      M.loop (|
                                        ltac:(M.monadic
                                          (M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::iter::traits::iterator::Iterator",
                                                  impl_Iterator_Item___char_,
                                                  [],
                                                  "next",
                                                  []
                                                |),
                                                [ it ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::option::Option::Some",
                                                      0
                                                    |) in
                                                  let c := M.copy (| γ0_0 |) in
                                                  let γ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "char",
                                                          "is_ascii_alphanumeric",
                                                          []
                                                        |),
                                                        [ c ]
                                                      |)
                                                    |) in
                                                  let _ :=
                                                    M.is_constant_or_break_match (|
                                                      M.read (| γ |),
                                                      Value.Bool true
                                                    |) in
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path "alloc::string::String",
                                                        "push",
                                                        []
                                                      |),
                                                      [ suffix; M.read (| c |) ]
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        let~ len :=
                                                          M.alloc (|
                                                            BinOp.Wrap.add (|
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path "alloc::string::String",
                                                                  "len",
                                                                  []
                                                                |),
                                                                [ num ]
                                                              |),
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path "alloc::string::String",
                                                                  "len",
                                                                  []
                                                                |),
                                                                [ suffix ]
                                                              |)
                                                            |)
                                                          |) in
                                                        let~ tok :=
                                                          M.copy (|
                                                            M.match_operator (|
                                                              M.alloc (|
                                                                M.call_closure (|
                                                                  M.get_associated_function (|
                                                                    Ty.path "alloc::string::String",
                                                                    "as_str",
                                                                    []
                                                                  |),
                                                                  [ suffix ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let _ :=
                                                                      M.is_constant_or_break_match (|
                                                                        M.read (| γ |),
                                                                        Value.String "u8"
                                                                      |) in
                                                                    M.alloc (|
                                                                      Value.StructTuple
                                                                        "move_core_types::parser::Token::U8"
                                                                        [ M.read (| num |) ]
                                                                    |)));
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let _ :=
                                                                      M.is_constant_or_break_match (|
                                                                        M.read (| γ |),
                                                                        Value.String "u16"
                                                                      |) in
                                                                    M.alloc (|
                                                                      Value.StructTuple
                                                                        "move_core_types::parser::Token::U16"
                                                                        [ M.read (| num |) ]
                                                                    |)));
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let _ :=
                                                                      M.is_constant_or_break_match (|
                                                                        M.read (| γ |),
                                                                        Value.String "u32"
                                                                      |) in
                                                                    M.alloc (|
                                                                      Value.StructTuple
                                                                        "move_core_types::parser::Token::U32"
                                                                        [ M.read (| num |) ]
                                                                    |)));
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let _ :=
                                                                      M.is_constant_or_break_match (|
                                                                        M.read (| γ |),
                                                                        Value.String "u64"
                                                                      |) in
                                                                    M.alloc (|
                                                                      Value.StructTuple
                                                                        "move_core_types::parser::Token::U64"
                                                                        [ M.read (| num |) ]
                                                                    |)));
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let _ :=
                                                                      M.is_constant_or_break_match (|
                                                                        M.read (| γ |),
                                                                        Value.String "u128"
                                                                      |) in
                                                                    M.alloc (|
                                                                      Value.StructTuple
                                                                        "move_core_types::parser::Token::U128"
                                                                        [ M.read (| num |) ]
                                                                    |)));
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let _ :=
                                                                      M.is_constant_or_break_match (|
                                                                        M.read (| γ |),
                                                                        Value.String "u256"
                                                                      |) in
                                                                    M.alloc (|
                                                                      Value.StructTuple
                                                                        "move_core_types::parser::Token::U256"
                                                                        [ M.read (| num |) ]
                                                                    |)));
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (M.alloc (|
                                                                      M.never_to_any (|
                                                                        M.read (|
                                                                          M.return_ (|
                                                                            Value.StructTuple
                                                                              "core::result::Result::Err"
                                                                              [
                                                                                M.read (|
                                                                                  let~ error :=
                                                                                    M.alloc (|
                                                                                      M.call_closure (|
                                                                                        M.get_function (|
                                                                                          "anyhow::__private::format_err",
                                                                                          []
                                                                                        |),
                                                                                        [
                                                                                          M.call_closure (|
                                                                                            M.get_associated_function (|
                                                                                              Ty.path
                                                                                                "core::fmt::Arguments",
                                                                                              "new_const",
                                                                                              []
                                                                                            |),
                                                                                            [
                                                                                              M.alloc (|
                                                                                                Value.Array
                                                                                                  [
                                                                                                    M.read (|
                                                                                                      Value.String
                                                                                                        "invalid suffix"
                                                                                                    |)
                                                                                                  ]
                                                                                              |)
                                                                                            ]
                                                                                          |)
                                                                                        ]
                                                                                      |)
                                                                                    |) in
                                                                                  error
                                                                                |)
                                                                              ]
                                                                          |)
                                                                        |)
                                                                      |)
                                                                    |)))
                                                              ]
                                                            |)
                                                          |) in
                                                        M.return_ (|
                                                          Value.StructTuple
                                                            "core::result::Result::Ok"
                                                            [
                                                              Value.Tuple
                                                                [ M.read (| tok |); M.read (| len |)
                                                                ]
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)))
                                            ]
                                          |)))
                                      |)
                                    |)
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.never_to_any (|
                                    M.read (|
                                      let~ len :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "alloc::string::String",
                                              "len",
                                              []
                                            |),
                                            [ num ]
                                          |)
                                        |) in
                                      M.return_ (|
                                        Value.StructTuple
                                          "core::result::Result::Ok"
                                          [
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::U64"
                                                  [ M.read (| num |) ];
                                                M.read (| len |)
                                              ]
                                          ]
                                      |)
                                    |)
                                  |)
                                |)))
                          ]
                        |)))
                    |)
                  |)
                |)
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_next_number : M.IsFunction "move_core_types::parser::next_number" next_number.
  
  (*
  fn next_token(s: &str) -> Result<Option<(Token, usize)>> {
      let mut it = s.chars().peekable();
      match it.next() {
          None => Ok(None),
          Some(c) => Ok(Some(match c {
              '<' => (Token::Lt, 1),
              '>' => (Token::Gt, 1),
              ',' => (Token::Comma, 1),
              ':' => match it.next() {
                  Some(':') => (Token::ColonColon, 2),
                  _ => bail!("unrecognized token"),
              },
              '0' if it.peek() == Some(&'x') || it.peek() == Some(&'X') => {
                  it.next().unwrap();
                  match it.next() {
                      Some(c) if c.is_ascii_hexdigit() => {
                          let mut r = String::new();
                          r.push('0');
                          r.push('x');
                          r.push(c);
                          for c in it {
                              if c.is_ascii_hexdigit() {
                                  r.push(c);
                              } else {
                                  break;
                              }
                          }
                          let len = r.len();
                          (Token::Address(r), len)
                      }
                      _ => bail!("unrecognized token"),
                  }
              }
              c if c.is_ascii_digit() => next_number(c, it)?,
              'b' if it.peek() == Some(&'"') => {
                  it.next().unwrap();
                  let mut r = String::new();
                  loop {
                      match it.next() {
                          Some('"') => break,
                          Some(c) if c.is_ascii() => r.push(c),
                          _ => bail!("unrecognized token"),
                      }
                  }
                  let len = r.len() + 3;
                  (Token::Bytes(hex::encode(r)), len)
              }
              'x' if it.peek() == Some(&'"') => {
                  it.next().unwrap();
                  let mut r = String::new();
                  loop {
                      match it.next() {
                          Some('"') => break,
                          Some(c) if c.is_ascii_hexdigit() => r.push(c),
                          _ => bail!("unrecognized token"),
                      }
                  }
                  let len = r.len() + 3;
                  (Token::Bytes(r), len)
              }
              c if c.is_ascii_whitespace() => {
                  let mut r = String::new();
                  r.push(c);
                  for c in it {
                      if c.is_ascii_whitespace() {
                          r.push(c);
                      } else {
                          break;
                      }
                  }
                  let len = r.len();
                  (Token::Whitespace(r), len)
              }
              c if c.is_ascii_alphabetic() => {
                  let mut r = String::new();
                  r.push(c);
                  for c in it {
                      if identifier::is_valid_identifier_char(c) {
                          r.push(c);
                      } else {
                          break;
                      }
                  }
                  let len = r.len();
                  (name_token(r), len)
              }
              _ => bail!("unrecognized token"),
          })),
      }
  }
  *)
  Definition next_token (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ it :=
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::iter::traits::iterator::Iterator",
                      Ty.path "core::str::iter::Chars",
                      [],
                      "peekable",
                      []
                    |),
                    [
                      M.call_closure (|
                        M.get_associated_function (| Ty.path "str", "chars", [] |),
                        [ M.read (| s |) ]
                      |)
                    ]
                  |)
                |) in
              M.match_operator (|
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::iter::traits::iterator::Iterator",
                      Ty.apply
                        (Ty.path "core::iter::adapters::peekable::Peekable")
                        []
                        [ Ty.path "core::str::iter::Chars" ],
                      [],
                      "next",
                      []
                    |),
                    [ it ]
                  |)
                |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in
                      M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Ok"
                          [ Value.StructTuple "core::option::Option::None" [] ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (let γ0_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "core::option::Option::Some",
                          0
                        |) in
                      let c := M.copy (| γ0_0 |) in
                      M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Ok"
                          [
                            Value.StructTuple
                              "core::option::Option::Some"
                              [
                                M.read (|
                                  M.match_operator (|
                                    c,
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 60
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::Lt"
                                                  [];
                                                Value.Integer IntegerKind.Usize 1
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 62
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::Gt"
                                                  [];
                                                Value.Integer IntegerKind.Usize 1
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 44
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::Comma"
                                                  [];
                                                Value.Integer IntegerKind.Usize 1
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 58
                                            |) in
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::iter::traits::iterator::Iterator",
                                                  Ty.apply
                                                    (Ty.path
                                                      "core::iter::adapters::peekable::Peekable")
                                                    []
                                                    [ Ty.path "core::str::iter::Chars" ],
                                                  [],
                                                  "next",
                                                  []
                                                |),
                                                [ it ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::option::Option::Some",
                                                      0
                                                    |) in
                                                  let _ :=
                                                    M.is_constant_or_break_match (|
                                                      M.read (| γ0_0 |),
                                                      Value.UnicodeChar 58
                                                    |) in
                                                  M.alloc (|
                                                    Value.Tuple
                                                      [
                                                        Value.StructTuple
                                                          "move_core_types::parser::Token::ColonColon"
                                                          [];
                                                        Value.Integer IntegerKind.Usize 2
                                                      ]
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          Value.StructTuple
                                                            "core::result::Result::Err"
                                                            [
                                                              M.read (|
                                                                let~ error :=
                                                                  M.alloc (|
                                                                    M.call_closure (|
                                                                      M.get_function (|
                                                                        "anyhow::__private::format_err",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.path
                                                                              "core::fmt::Arguments",
                                                                            "new_const",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.alloc (|
                                                                              Value.Array
                                                                                [
                                                                                  M.read (|
                                                                                    Value.String
                                                                                      "unrecognized token"
                                                                                  |)
                                                                                ]
                                                                            |)
                                                                          ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  |) in
                                                                error
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)))
                                            ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 48
                                            |) in
                                          let γ :=
                                            M.alloc (|
                                              LogicalOp.or (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::cmp::PartialEq",
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [ Ty.apply (Ty.path "&") [] [ Ty.path "char" ]
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        []
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&")
                                                            []
                                                            [ Ty.path "char" ]
                                                        ]
                                                    ],
                                                    "eq",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "core::iter::adapters::peekable::Peekable")
                                                            []
                                                            [ Ty.path "core::str::iter::Chars" ],
                                                          "peek",
                                                          []
                                                        |),
                                                        [ it ]
                                                      |)
                                                    |);
                                                    M.alloc (|
                                                      Value.StructTuple
                                                        "core::option::Option::Some"
                                                        [ M.alloc (| Value.UnicodeChar 120 |) ]
                                                    |)
                                                  ]
                                                |),
                                                ltac:(M.monadic
                                                  (M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::cmp::PartialEq",
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        []
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&")
                                                            []
                                                            [ Ty.path "char" ]
                                                        ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::option::Option")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&")
                                                              []
                                                              [ Ty.path "char" ]
                                                          ]
                                                      ],
                                                      "eq",
                                                      []
                                                    |),
                                                    [
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path
                                                                "core::iter::adapters::peekable::Peekable")
                                                              []
                                                              [ Ty.path "core::str::iter::Chars" ],
                                                            "peek",
                                                            []
                                                          |),
                                                          [ it ]
                                                        |)
                                                      |);
                                                      M.alloc (|
                                                        Value.StructTuple
                                                          "core::option::Option::Some"
                                                          [ M.alloc (| Value.UnicodeChar 88 |) ]
                                                      |)
                                                    ]
                                                  |)))
                                              |)
                                            |) 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 "core::option::Option")
                                                    []
                                                    [ Ty.path "char" ],
                                                  "unwrap",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::iter::traits::iterator::Iterator",
                                                      Ty.apply
                                                        (Ty.path
                                                          "core::iter::adapters::peekable::Peekable")
                                                        []
                                                        [ Ty.path "core::str::iter::Chars" ],
                                                      [],
                                                      "next",
                                                      []
                                                    |),
                                                    [ it ]
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::iter::traits::iterator::Iterator",
                                                  Ty.apply
                                                    (Ty.path
                                                      "core::iter::adapters::peekable::Peekable")
                                                    []
                                                    [ Ty.path "core::str::iter::Chars" ],
                                                  [],
                                                  "next",
                                                  []
                                                |),
                                                [ it ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::option::Option::Some",
                                                      0
                                                    |) in
                                                  let c := M.copy (| γ0_0 |) in
                                                  let γ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "char",
                                                          "is_ascii_hexdigit",
                                                          []
                                                        |),
                                                        [ c ]
                                                      |)
                                                    |) in
                                                  let _ :=
                                                    M.is_constant_or_break_match (|
                                                      M.read (| γ |),
                                                      Value.Bool true
                                                    |) in
                                                  let~ r :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "alloc::string::String",
                                                          "new",
                                                          []
                                                        |),
                                                        []
                                                      |)
                                                    |) in
                                                  let~ _ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "alloc::string::String",
                                                          "push",
                                                          []
                                                        |),
                                                        [ r; Value.UnicodeChar 48 ]
                                                      |)
                                                    |) in
                                                  let~ _ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "alloc::string::String",
                                                          "push",
                                                          []
                                                        |),
                                                        [ r; Value.UnicodeChar 120 ]
                                                      |)
                                                    |) in
                                                  let~ _ :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "alloc::string::String",
                                                          "push",
                                                          []
                                                        |),
                                                        [ r; M.read (| c |) ]
                                                      |)
                                                    |) 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::iter::adapters::peekable::Peekable")
                                                                []
                                                                [ Ty.path "core::str::iter::Chars"
                                                                ],
                                                              [],
                                                              "into_iter",
                                                              []
                                                            |),
                                                            [ M.read (| it |) ]
                                                          |)
                                                        |),
                                                        [
                                                          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::iter::adapters::peekable::Peekable")
                                                                              []
                                                                              [
                                                                                Ty.path
                                                                                  "core::str::iter::Chars"
                                                                              ],
                                                                            [],
                                                                            "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 c :=
                                                                              M.copy (| γ0_0 |) 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
                                                                                                "char",
                                                                                              "is_ascii_hexdigit",
                                                                                              []
                                                                                            |),
                                                                                            [ c ]
                                                                                          |)
                                                                                        |)) 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
                                                                                              "alloc::string::String",
                                                                                            "push",
                                                                                            []
                                                                                          |),
                                                                                          [
                                                                                            r;
                                                                                            M.read (|
                                                                                              c
                                                                                            |)
                                                                                          ]
                                                                                        |)
                                                                                      |) in
                                                                                    M.alloc (|
                                                                                      Value.Tuple []
                                                                                    |)));
                                                                                fun γ =>
                                                                                  ltac:(M.monadic
                                                                                    (M.alloc (|
                                                                                      M.never_to_any (|
                                                                                        M.read (|
                                                                                          M.break (||)
                                                                                        |)
                                                                                      |)
                                                                                    |)))
                                                                              ]
                                                                            |)))
                                                                      ]
                                                                    |) in
                                                                  M.alloc (| Value.Tuple [] |)))
                                                              |)))
                                                        ]
                                                      |)) in
                                                  let~ len :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "alloc::string::String",
                                                          "len",
                                                          []
                                                        |),
                                                        [ r ]
                                                      |)
                                                    |) in
                                                  M.alloc (|
                                                    Value.Tuple
                                                      [
                                                        Value.StructTuple
                                                          "move_core_types::parser::Token::Address"
                                                          [ M.read (| r |) ];
                                                        M.read (| len |)
                                                      ]
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          Value.StructTuple
                                                            "core::result::Result::Err"
                                                            [
                                                              M.read (|
                                                                let~ error :=
                                                                  M.alloc (|
                                                                    M.call_closure (|
                                                                      M.get_function (|
                                                                        "anyhow::__private::format_err",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.path
                                                                              "core::fmt::Arguments",
                                                                            "new_const",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.alloc (|
                                                                              Value.Array
                                                                                [
                                                                                  M.read (|
                                                                                    Value.String
                                                                                      "unrecognized token"
                                                                                  |)
                                                                                ]
                                                                            |)
                                                                          ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  |) in
                                                                error
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)))
                                            ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let c := M.copy (| γ |) in
                                          let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "char",
                                                  "is_ascii_digit",
                                                  []
                                                |),
                                                [ c ]
                                              |)
                                            |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) 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.tuple
                                                        [
                                                          Ty.path "move_core_types::parser::Token";
                                                          Ty.path "usize"
                                                        ];
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_function (|
                                                      "move_core_types::parser::next_number",
                                                      [
                                                        Ty.apply
                                                          (Ty.path
                                                            "core::iter::adapters::peekable::Peekable")
                                                          []
                                                          [ Ty.path "core::str::iter::Chars" ]
                                                      ]
                                                    |),
                                                    [ M.read (| c |); M.read (| it |) ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              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 "core::option::Option")
                                                                    []
                                                                    [
                                                                      Ty.tuple
                                                                        [
                                                                          Ty.path
                                                                            "move_core_types::parser::Token";
                                                                          Ty.path "usize"
                                                                        ]
                                                                    ];
                                                                  Ty.path "anyhow::Error"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path "anyhow::Error"
                                                                  ]
                                                              ],
                                                              "from_residual",
                                                              []
                                                            |),
                                                            [ M.read (| residual |) ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                      0
                                                    |) in
                                                  let val := M.copy (| γ0_0 |) in
                                                  val))
                                            ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 98
                                            |) in
                                          let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::cmp::PartialEq",
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    []
                                                    [ Ty.apply (Ty.path "&") [] [ Ty.path "char" ]
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [ Ty.apply (Ty.path "&") [] [ Ty.path "char" ]
                                                      ]
                                                  ],
                                                  "eq",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "core::iter::adapters::peekable::Peekable")
                                                          []
                                                          [ Ty.path "core::str::iter::Chars" ],
                                                        "peek",
                                                        []
                                                      |),
                                                      [ it ]
                                                    |)
                                                  |);
                                                  M.alloc (|
                                                    Value.StructTuple
                                                      "core::option::Option::Some"
                                                      [ M.alloc (| Value.UnicodeChar 34 |) ]
                                                  |)
                                                ]
                                              |)
                                            |) 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 "core::option::Option")
                                                    []
                                                    [ Ty.path "char" ],
                                                  "unwrap",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::iter::traits::iterator::Iterator",
                                                      Ty.apply
                                                        (Ty.path
                                                          "core::iter::adapters::peekable::Peekable")
                                                        []
                                                        [ Ty.path "core::str::iter::Chars" ],
                                                      [],
                                                      "next",
                                                      []
                                                    |),
                                                    [ it ]
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let~ r :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "new",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.loop (|
                                              ltac:(M.monadic
                                                (M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::iter::traits::iterator::Iterator",
                                                        Ty.apply
                                                          (Ty.path
                                                            "core::iter::adapters::peekable::Peekable")
                                                          []
                                                          [ Ty.path "core::str::iter::Chars" ],
                                                        [],
                                                        "next",
                                                        []
                                                      |),
                                                      [ it ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::option::Option::Some",
                                                            0
                                                          |) in
                                                        let _ :=
                                                          M.is_constant_or_break_match (|
                                                            M.read (| γ0_0 |),
                                                            Value.UnicodeChar 34
                                                          |) 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 c := M.copy (| γ0_0 |) in
                                                        let γ :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.path "char",
                                                                "is_ascii",
                                                                []
                                                              |),
                                                              [ c ]
                                                            |)
                                                          |) in
                                                        let _ :=
                                                          M.is_constant_or_break_match (|
                                                            M.read (| γ |),
                                                            Value.Bool true
                                                          |) in
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path "alloc::string::String",
                                                              "push",
                                                              []
                                                            |),
                                                            [ r; M.read (| c |) ]
                                                          |)
                                                        |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                Value.StructTuple
                                                                  "core::result::Result::Err"
                                                                  [
                                                                    M.read (|
                                                                      let~ error :=
                                                                        M.alloc (|
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "anyhow::__private::format_err",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "core::fmt::Arguments",
                                                                                  "new_const",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.alloc (|
                                                                                    Value.Array
                                                                                      [
                                                                                        M.read (|
                                                                                          Value.String
                                                                                            "unrecognized token"
                                                                                        |)
                                                                                      ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        |) in
                                                                      error
                                                                    |)
                                                                  ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)))
                                                  ]
                                                |)))
                                            |) in
                                          let~ len :=
                                            M.alloc (|
                                              BinOp.Wrap.add (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "alloc::string::String",
                                                    "len",
                                                    []
                                                  |),
                                                  [ r ]
                                                |),
                                                Value.Integer IntegerKind.Usize 3
                                              |)
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::Bytes"
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "hex::encode",
                                                        [ Ty.path "alloc::string::String" ]
                                                      |),
                                                      [ M.read (| r |) ]
                                                    |)
                                                  ];
                                                M.read (| len |)
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.UnicodeChar 120
                                            |) in
                                          let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::cmp::PartialEq",
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    []
                                                    [ Ty.apply (Ty.path "&") [] [ Ty.path "char" ]
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [ Ty.apply (Ty.path "&") [] [ Ty.path "char" ]
                                                      ]
                                                  ],
                                                  "eq",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "core::iter::adapters::peekable::Peekable")
                                                          []
                                                          [ Ty.path "core::str::iter::Chars" ],
                                                        "peek",
                                                        []
                                                      |),
                                                      [ it ]
                                                    |)
                                                  |);
                                                  M.alloc (|
                                                    Value.StructTuple
                                                      "core::option::Option::Some"
                                                      [ M.alloc (| Value.UnicodeChar 34 |) ]
                                                  |)
                                                ]
                                              |)
                                            |) 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 "core::option::Option")
                                                    []
                                                    [ Ty.path "char" ],
                                                  "unwrap",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::iter::traits::iterator::Iterator",
                                                      Ty.apply
                                                        (Ty.path
                                                          "core::iter::adapters::peekable::Peekable")
                                                        []
                                                        [ Ty.path "core::str::iter::Chars" ],
                                                      [],
                                                      "next",
                                                      []
                                                    |),
                                                    [ it ]
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let~ r :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "new",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.loop (|
                                              ltac:(M.monadic
                                                (M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::iter::traits::iterator::Iterator",
                                                        Ty.apply
                                                          (Ty.path
                                                            "core::iter::adapters::peekable::Peekable")
                                                          []
                                                          [ Ty.path "core::str::iter::Chars" ],
                                                        [],
                                                        "next",
                                                        []
                                                      |),
                                                      [ it ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::option::Option::Some",
                                                            0
                                                          |) in
                                                        let _ :=
                                                          M.is_constant_or_break_match (|
                                                            M.read (| γ0_0 |),
                                                            Value.UnicodeChar 34
                                                          |) 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 c := M.copy (| γ0_0 |) in
                                                        let γ :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.path "char",
                                                                "is_ascii_hexdigit",
                                                                []
                                                              |),
                                                              [ c ]
                                                            |)
                                                          |) in
                                                        let _ :=
                                                          M.is_constant_or_break_match (|
                                                            M.read (| γ |),
                                                            Value.Bool true
                                                          |) in
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path "alloc::string::String",
                                                              "push",
                                                              []
                                                            |),
                                                            [ r; M.read (| c |) ]
                                                          |)
                                                        |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                Value.StructTuple
                                                                  "core::result::Result::Err"
                                                                  [
                                                                    M.read (|
                                                                      let~ error :=
                                                                        M.alloc (|
                                                                          M.call_closure (|
                                                                            M.get_function (|
                                                                              "anyhow::__private::format_err",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.call_closure (|
                                                                                M.get_associated_function (|
                                                                                  Ty.path
                                                                                    "core::fmt::Arguments",
                                                                                  "new_const",
                                                                                  []
                                                                                |),
                                                                                [
                                                                                  M.alloc (|
                                                                                    Value.Array
                                                                                      [
                                                                                        M.read (|
                                                                                          Value.String
                                                                                            "unrecognized token"
                                                                                        |)
                                                                                      ]
                                                                                  |)
                                                                                ]
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        |) in
                                                                      error
                                                                    |)
                                                                  ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)))
                                                  ]
                                                |)))
                                            |) in
                                          let~ len :=
                                            M.alloc (|
                                              BinOp.Wrap.add (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "alloc::string::String",
                                                    "len",
                                                    []
                                                  |),
                                                  [ r ]
                                                |),
                                                Value.Integer IntegerKind.Usize 3
                                              |)
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::Bytes"
                                                  [ M.read (| r |) ];
                                                M.read (| len |)
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let c := M.copy (| γ |) in
                                          let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "char",
                                                  "is_ascii_whitespace",
                                                  []
                                                |),
                                                [ c ]
                                              |)
                                            |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          let~ r :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "new",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "push",
                                                  []
                                                |),
                                                [ r; M.read (| c |) ]
                                              |)
                                            |) 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::iter::adapters::peekable::Peekable")
                                                        []
                                                        [ Ty.path "core::str::iter::Chars" ],
                                                      [],
                                                      "into_iter",
                                                      []
                                                    |),
                                                    [ M.read (| it |) ]
                                                  |)
                                                |),
                                                [
                                                  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::iter::adapters::peekable::Peekable")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::str::iter::Chars"
                                                                      ],
                                                                    [],
                                                                    "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 c := M.copy (| γ0_0 |) 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
                                                                                        "char",
                                                                                      "is_ascii_whitespace",
                                                                                      []
                                                                                    |),
                                                                                    [ c ]
                                                                                  |)
                                                                                |)) 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
                                                                                      "alloc::string::String",
                                                                                    "push",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    r;
                                                                                    M.read (| c |)
                                                                                  ]
                                                                                |)
                                                                              |) in
                                                                            M.alloc (|
                                                                              Value.Tuple []
                                                                            |)));
                                                                        fun γ =>
                                                                          ltac:(M.monadic
                                                                            (M.alloc (|
                                                                              M.never_to_any (|
                                                                                M.read (|
                                                                                  M.break (||)
                                                                                |)
                                                                              |)
                                                                            |)))
                                                                      ]
                                                                    |)))
                                                              ]
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)))
                                                      |)))
                                                ]
                                              |)) in
                                          let~ len :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "len",
                                                  []
                                                |),
                                                [ r ]
                                              |)
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                Value.StructTuple
                                                  "move_core_types::parser::Token::Whitespace"
                                                  [ M.read (| r |) ];
                                                M.read (| len |)
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let c := M.copy (| γ |) in
                                          let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "char",
                                                  "is_ascii_alphabetic",
                                                  []
                                                |),
                                                [ c ]
                                              |)
                                            |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          let~ r :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "new",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          let~ _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "push",
                                                  []
                                                |),
                                                [ r; M.read (| c |) ]
                                              |)
                                            |) 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::iter::adapters::peekable::Peekable")
                                                        []
                                                        [ Ty.path "core::str::iter::Chars" ],
                                                      [],
                                                      "into_iter",
                                                      []
                                                    |),
                                                    [ M.read (| it |) ]
                                                  |)
                                                |),
                                                [
                                                  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::iter::adapters::peekable::Peekable")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::str::iter::Chars"
                                                                      ],
                                                                    [],
                                                                    "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 c := M.copy (| γ0_0 |) in
                                                                    M.match_operator (|
                                                                      M.alloc (| Value.Tuple [] |),
                                                                      [
                                                                        fun γ =>
                                                                          ltac:(M.monadic
                                                                            (let γ :=
                                                                              M.use
                                                                                (M.alloc (|
                                                                                  M.call_closure (|
                                                                                    M.get_function (|
                                                                                      "move_core_types::identifier::is_valid_identifier_char",
                                                                                      []
                                                                                    |),
                                                                                    [ M.read (| c |)
                                                                                    ]
                                                                                  |)
                                                                                |)) 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
                                                                                      "alloc::string::String",
                                                                                    "push",
                                                                                    []
                                                                                  |),
                                                                                  [
                                                                                    r;
                                                                                    M.read (| c |)
                                                                                  ]
                                                                                |)
                                                                              |) in
                                                                            M.alloc (|
                                                                              Value.Tuple []
                                                                            |)));
                                                                        fun γ =>
                                                                          ltac:(M.monadic
                                                                            (M.alloc (|
                                                                              M.never_to_any (|
                                                                                M.read (|
                                                                                  M.break (||)
                                                                                |)
                                                                              |)
                                                                            |)))
                                                                      ]
                                                                    |)))
                                                              ]
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)))
                                                      |)))
                                                ]
                                              |)) in
                                          let~ len :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "alloc::string::String",
                                                  "len",
                                                  []
                                                |),
                                                [ r ]
                                              |)
                                            |) in
                                          M.alloc (|
                                            Value.Tuple
                                              [
                                                M.call_closure (|
                                                  M.get_function (|
                                                    "move_core_types::parser::name_token",
                                                    []
                                                  |),
                                                  [ M.read (| r |) ]
                                                |);
                                                M.read (| len |)
                                              ]
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  Value.StructTuple
                                                    "core::result::Result::Err"
                                                    [
                                                      M.read (|
                                                        let~ error :=
                                                          M.alloc (|
                                                            M.call_closure (|
                                                              M.get_function (|
                                                                "anyhow::__private::format_err",
                                                                []
                                                              |),
                                                              [
                                                                M.call_closure (|
                                                                  M.get_associated_function (|
                                                                    Ty.path "core::fmt::Arguments",
                                                                    "new_const",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.alloc (|
                                                                      Value.Array
                                                                        [
                                                                          M.read (|
                                                                            Value.String
                                                                              "unrecognized token"
                                                                          |)
                                                                        ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              ]
                                                            |)
                                                          |) in
                                                        error
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)
                                |)
                              ]
                          ]
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_next_token : M.IsFunction "move_core_types::parser::next_token" next_token.
  
  (*
  fn tokenize(mut s: &str) -> Result<Vec<Token>> {
      let mut v = vec![];
      while let Some((tok, n)) = next_token(s)? {
          v.push(tok);
          s = &s[n..];
      }
      Ok(v)
  }
  *)
  Definition tokenize (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ v :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [ Ty.path "move_core_types::parser::Token"; Ty.path "alloc::alloc::Global"
                        ],
                      "new",
                      []
                    |),
                    []
                  |)
                |) in
              let~ _ :=
                M.loop (|
                  ltac:(M.monadic
                    (M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (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.apply
                                            (Ty.path "core::option::Option")
                                            []
                                            [
                                              Ty.tuple
                                                [
                                                  Ty.path "move_core_types::parser::Token";
                                                  Ty.path "usize"
                                                ]
                                            ];
                                          Ty.path "anyhow::Error"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "move_core_types::parser::next_token",
                                          []
                                        |),
                                        [ M.read (| s |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  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_core_types::parser::Token";
                                                          Ty.path "alloc::alloc::Global"
                                                        ];
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path "anyhow::Error"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                            let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                            let tok := M.copy (| γ1_0 |) in
                            let n := M.copy (| γ1_1 |) in
                            let~ _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      []
                                      [
                                        Ty.path "move_core_types::parser::Token";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [ v; M.read (| tok |) ]
                                |)
                              |) in
                            let~ _ :=
                              M.write (|
                                s,
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::index::Index",
                                    Ty.path "str",
                                    [
                                      Ty.apply
                                        (Ty.path "core::ops::range::RangeFrom")
                                        []
                                        [ Ty.path "usize" ]
                                    ],
                                    "index",
                                    []
                                  |),
                                  [
                                    M.read (| s |);
                                    Value.StructRecord
                                      "core::ops::range::RangeFrom"
                                      [ ("start", M.read (| n |)) ]
                                  ]
                                |)
                              |) 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" [ M.read (| v |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_tokenize : M.IsFunction "move_core_types::parser::tokenize" tokenize.
  
  (* StructRecord
    {
      name := "Parser";
      const_params := [];
      ty_params := [ "I" ];
      fields := [ ("it", Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [] [ I ]) ];
    } *)
  
  Module Impl_move_core_types_parser_Parser_I.
    Definition Self (I : Ty.t) : Ty.t :=
      Ty.apply (Ty.path "move_core_types::parser::Parser") [] [ I ].
    
    (*
        fn new<T: IntoIterator<Item = Token, IntoIter = I>>(v: T) -> Self {
            Self {
                it: v.into_iter().peekable(),
            }
        }
    *)
    Definition new (I : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [ T ], [ v ] =>
        ltac:(M.monadic
          (let v := M.alloc (| v |) in
          Value.StructRecord
            "move_core_types::parser::Parser"
            [
              ("it",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::iterator::Iterator",
                    I,
                    [],
                    "peekable",
                    []
                  |),
                  [
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::collect::IntoIterator",
                        T,
                        [],
                        "into_iter",
                        []
                      |),
                      [ M.read (| v |) ]
                    |)
                  ]
                |))
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : forall (I : Ty.t), M.IsAssociatedFunction (Self I) "new" (new I).
    
    (*
        fn next(&mut self) -> Result<Token> {
            match self.it.next() {
                Some(tok) => Ok(tok),
                None => bail!("out of tokens, this should not happen"),
            }
        }
    *)
    Definition next (I : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::iterator::Iterator",
                        Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [] [ I ],
                        [],
                        "next",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "move_core_types::parser::Parser",
                          "it"
                        |)
                      ]
                    |)
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::option::Option::Some",
                            0
                          |) in
                        let tok := M.copy (| γ0_0 |) in
                        M.alloc (|
                          Value.StructTuple "core::result::Result::Ok" [ 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::Err"
                                  [
                                    M.read (|
                                      let~ error :=
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_function (|
                                              "anyhow::__private::format_err",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "core::fmt::Arguments",
                                                  "new_const",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    Value.Array
                                                      [
                                                        M.read (|
                                                          Value.String
                                                            "out of tokens, this should not happen"
                                                        |)
                                                      ]
                                                  |)
                                                ]
                                              |)
                                            ]
                                          |)
                                        |) in
                                      error
                                    |)
                                  ]
                              |)
                            |)
                          |)
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_next :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "next" (next I).
    
    (*
        fn peek(&mut self) -> Option<&Token> {
            self.it.peek()
        }
    *)
    Definition peek (I : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply (Ty.path "core::iter::adapters::peekable::Peekable") [] [ I ],
              "peek",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "move_core_types::parser::Parser",
                "it"
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_peek :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "peek" (peek I).
    
    (*
        fn consume(&mut self, tok: Token) -> Result<()> {
            let t = self.next()?;
            if t != tok {
                bail!("expected token {:?}, got {:?}", tok, t)
            }
            Ok(())
        }
    *)
    Definition consume (I : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [], [ self; tok ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let tok := M.alloc (| tok |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ t :=
                  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::parser::Token"; Ty.path "anyhow::Error" ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply (Ty.path "move_core_types::parser::Parser") [] [ I ],
                                "next",
                                []
                              |),
                              [ M.read (| self |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            []
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "anyhow::Error"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::cmp::PartialEq",
                                    Ty.path "move_core_types::parser::Token",
                                    [ Ty.path "move_core_types::parser::Token" ],
                                    "ne",
                                    []
                                  |),
                                  [ t; tok ]
                                |)
                              |)) 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 "anyhow::Error",
                                          "msg",
                                          [ Ty.path "alloc::string::String" ]
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "core::hint::must_use",
                                              [ Ty.path "alloc::string::String" ]
                                            |),
                                            [
                                              M.read (|
                                                let~ res :=
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (| "alloc::fmt::format", [] |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path "core::fmt::Arguments",
                                                            "new_v1",
                                                            []
                                                          |),
                                                          [
                                                            M.alloc (|
                                                              Value.Array
                                                                [
                                                                  M.read (|
                                                                    Value.String "expected token "
                                                                  |);
                                                                  M.read (| Value.String ", got " |)
                                                                ]
                                                            |);
                                                            M.alloc (|
                                                              Value.Array
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_debug",
                                                                      [
                                                                        Ty.path
                                                                          "move_core_types::parser::Token"
                                                                      ]
                                                                    |),
                                                                    [ tok ]
                                                                  |);
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::rt::Argument",
                                                                      "new_debug",
                                                                      [
                                                                        Ty.path
                                                                          "move_core_types::parser::Token"
                                                                      ]
                                                                    |),
                                                                    [ t ]
                                                                  |)
                                                                ]
                                                            |)
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  |) in
                                                res
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_consume :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "consume" (consume I).
    
    (*
        fn parse_comma_list<F, R>(
            &mut self,
            parse_list_item: F,
            end_token: Token,
            allow_trailing_comma: bool,
        ) -> Result<Vec<R>>
        where
            F: Fn(&mut Self) -> Result<R>,
            R: std::fmt::Debug,
        {
            let mut v = vec![];
            if !(self.peek() == Some(&end_token)) {
                loop {
                    v.push(parse_list_item(self)?);
                    if self.peek() == Some(&end_token) {
                        break;
                    }
                    self.consume(Token::Comma)?;
                    if self.peek() == Some(&end_token) && allow_trailing_comma {
                        break;
                    }
                }
            }
            Ok(v)
        }
    *)
    Definition parse_comma_list
        (I : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [ F; R ], [ self; parse_list_item; end_token; allow_trailing_comma ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let parse_list_item := M.alloc (| parse_list_item |) in
          let end_token := M.alloc (| end_token |) in
          let allow_trailing_comma := M.alloc (| allow_trailing_comma |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ v :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ R; Ty.path "alloc::alloc::Global" ],
                        "new",
                        []
                      |),
                      []
                    |)
                  |) 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_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        []
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            []
                                            [ Ty.path "move_core_types::parser::Token" ]
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::option::Option")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "&")
                                              []
                                              [ Ty.path "move_core_types::parser::Token" ]
                                          ]
                                      ],
                                      "eq",
                                      []
                                    |),
                                    [
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "move_core_types::parser::Parser")
                                              []
                                              [ I ],
                                            "peek",
                                            []
                                          |),
                                          [ M.read (| self |) ]
                                        |)
                                      |);
                                      M.alloc (|
                                        Value.StructTuple "core::option::Option::Some" [ end_token ]
                                      |)
                                    ]
                                  |)
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.loop (|
                            ltac:(M.monadic
                              (let~ _ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        []
                                        [ R; Ty.path "alloc::alloc::Global" ],
                                      "push",
                                      []
                                    |),
                                    [
                                      v;
                                      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")
                                                  []
                                                  [ R; Ty.path "anyhow::Error" ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::function::Fn",
                                                    F,
                                                    [
                                                      Ty.tuple
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&mut")
                                                            []
                                                            [
                                                              Ty.apply
                                                                (Ty.path
                                                                  "move_core_types::parser::Parser")
                                                                []
                                                                [ I ]
                                                            ]
                                                        ]
                                                    ],
                                                    "call",
                                                    []
                                                  |),
                                                  [
                                                    parse_list_item;
                                                    Value.Tuple [ M.read (| self |) ]
                                                  ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            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")
                                                                  []
                                                                  [
                                                                    R;
                                                                    Ty.path "alloc::alloc::Global"
                                                                  ];
                                                                Ty.path "anyhow::Error"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                []
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path "anyhow::Error"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Continue",
                                                    0
                                                  |) in
                                                let val := M.copy (| γ0_0 |) in
                                                val))
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |) in
                              let~ _ :=
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          M.use
                                            (M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::cmp::PartialEq",
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    []
                                                    [
                                                      Ty.apply
                                                        (Ty.path "&")
                                                        []
                                                        [ Ty.path "move_core_types::parser::Token" ]
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          []
                                                          [ Ty.path "move_core_types::parser::Token"
                                                          ]
                                                      ]
                                                  ],
                                                  "eq",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [ I ],
                                                        "peek",
                                                        []
                                                      |),
                                                      [ M.read (| self |) ]
                                                    |)
                                                  |);
                                                  M.alloc (|
                                                    Value.StructTuple
                                                      "core::option::Option::Some"
                                                      [ end_token ]
                                                  |)
                                                ]
                                              |)
                                            |)) 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~ _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::Try",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "move_core_types::parser::Parser")
                                              []
                                              [ I ],
                                            "consume",
                                            []
                                          |),
                                          [
                                            M.read (| self |);
                                            Value.StructTuple
                                              "move_core_types::parser::Token::Comma"
                                              []
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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")
                                                          []
                                                          [ R; Ty.path "alloc::alloc::Global" ];
                                                        Ty.path "anyhow::Error"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path "anyhow::Error"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |) in
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            LogicalOp.and (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::cmp::PartialEq",
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    []
                                                    [
                                                      Ty.apply
                                                        (Ty.path "&")
                                                        []
                                                        [ Ty.path "move_core_types::parser::Token" ]
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          []
                                                          [ Ty.path "move_core_types::parser::Token"
                                                          ]
                                                      ]
                                                  ],
                                                  "eq",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [ I ],
                                                        "peek",
                                                        []
                                                      |),
                                                      [ M.read (| self |) ]
                                                    |)
                                                  |);
                                                  M.alloc (|
                                                    Value.StructTuple
                                                      "core::option::Option::Some"
                                                      [ end_token ]
                                                  |)
                                                ]
                                              |),
                                              ltac:(M.monadic (M.read (| allow_trailing_comma |)))
                                            |)
                                          |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |)))
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| v |) ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_parse_comma_list :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "parse_comma_list" (parse_comma_list I).
    
    (*
        fn parse_string(&mut self) -> Result<String> {
            Ok(match self.next()? {
                Token::Name(s) => s,
                tok => bail!("unexpected token {:?}, expected string", tok),
            })
        }
    *)
    Definition parse_string (I : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.catch_return (|
            ltac:(M.monadic
              (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_core_types::parser::Token"; Ty.path "anyhow::Error"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply (Ty.path "move_core_types::parser::Parser") [] [ I ],
                                  "next",
                                  []
                                |),
                                [ M.read (| self |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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 "alloc::string::String";
                                              Ty.path "anyhow::Error"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "anyhow::Error"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "move_core_types::parser::Token::Name",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            s));
                        fun γ =>
                          ltac:(M.monadic
                            (let tok := M.copy (| γ |) 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 "anyhow::Error",
                                            "msg",
                                            [ Ty.path "alloc::string::String" ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "core::hint::must_use",
                                                [ Ty.path "alloc::string::String" ]
                                              |),
                                              [
                                                M.read (|
                                                  let~ res :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "alloc::fmt::format",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path "core::fmt::Arguments",
                                                              "new_v1",
                                                              []
                                                            |),
                                                            [
                                                              M.alloc (|
                                                                Value.Array
                                                                  [
                                                                    M.read (|
                                                                      Value.String
                                                                        "unexpected token "
                                                                    |);
                                                                    M.read (|
                                                                      Value.String
                                                                        ", expected string"
                                                                    |)
                                                                  ]
                                                              |);
                                                              M.alloc (|
                                                                Value.Array
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::rt::Argument",
                                                                        "new_debug",
                                                                        [
                                                                          Ty.path
                                                                            "move_core_types::parser::Token"
                                                                        ]
                                                                      |),
                                                                      [ tok ]
                                                                    |)
                                                                  ]
                                                              |)
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    |) in
                                                  res
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |)
                ]))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_parse_string :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "parse_string" (parse_string I).
    
    (*
        fn parse_type_tag(&mut self) -> Result<TypeTag> {
            Ok(match self.next()? {
                Token::U8Type => TypeTag::U8,
                Token::U16Type => TypeTag::U16,
                Token::U32Type => TypeTag::U32,
                Token::U64Type => TypeTag::U64,
                Token::U128Type => TypeTag::U128,
                Token::U256Type => TypeTag::U256,
                Token::BoolType => TypeTag::Bool,
                Token::AddressType => TypeTag::Address,
                Token::SignerType => TypeTag::Signer,
                Token::VectorType => {
                    self.consume(Token::Lt)?;
                    let ty = self.parse_type_tag()?;
                    self.consume(Token::Gt)?;
                    TypeTag::Vector(Box::new(ty))
                }
                Token::Address(addr) => {
                    self.consume(Token::ColonColon)?;
                    let module = self.next().and_then(token_as_name)?;
                    self.consume(Token::ColonColon)?;
                    let name = self.next().and_then(token_as_name)?;
                    let ty_args = if self.peek() == Some(&Token::Lt) {
                        self.next()?;
                        let ty_args =
                            self.parse_comma_list(|parser| parser.parse_type_tag(), Token::Gt, true)?;
                        self.consume(Token::Gt)?;
                        ty_args
                    } else {
                        vec![]
                    };
                    TypeTag::Struct(Box::new(StructTag {
                        address: AccountAddress::from_hex_literal(&addr)?,
                        module: Identifier::new(module)?,
                        name: Identifier::new(name)?,
                        type_params: ty_args,
                    }))
                }
                tok => bail!("unexpected token {:?}, expected type tag", tok),
            })
        }
    *)
    Definition parse_type_tag
        (I : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.catch_return (|
            ltac:(M.monadic
              (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_core_types::parser::Token"; Ty.path "anyhow::Error"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply (Ty.path "move_core_types::parser::Parser") [] [ I ],
                                  "next",
                                  []
                                |),
                                [ M.read (| self |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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::language_storage::TypeTag";
                                              Ty.path "anyhow::Error"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "anyhow::Error"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (| γ, "move_core_types::parser::Token::U8Type" |) in
                            M.alloc (|
                              Value.StructTuple "move_core_types::language_storage::TypeTag::U8" []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::U16Type"
                              |) in
                            M.alloc (|
                              Value.StructTuple "move_core_types::language_storage::TypeTag::U16" []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::U32Type"
                              |) in
                            M.alloc (|
                              Value.StructTuple "move_core_types::language_storage::TypeTag::U32" []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::U64Type"
                              |) in
                            M.alloc (|
                              Value.StructTuple "move_core_types::language_storage::TypeTag::U64" []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::U128Type"
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::U128"
                                []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::U256Type"
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::U256"
                                []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::BoolType"
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::Bool"
                                []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::AddressType"
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::Address"
                                []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::SignerType"
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::Signer"
                                []
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (|
                                γ,
                                "move_core_types::parser::Token::VectorType"
                              |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "move_core_types::parser::Parser")
                                            []
                                            [ I ],
                                          "consume",
                                          []
                                        |),
                                        [
                                          M.read (| self |);
                                          Value.StructTuple "move_core_types::parser::Token::Lt" []
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  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::language_storage::TypeTag";
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path "anyhow::Error"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            let~ ty :=
                              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::language_storage::TypeTag";
                                            Ty.path "anyhow::Error"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "move_core_types::parser::Parser")
                                              []
                                              [ I ],
                                            "parse_type_tag",
                                            []
                                          |),
                                          [ M.read (| self |) ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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::language_storage::TypeTag";
                                                        Ty.path "anyhow::Error"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path "anyhow::Error"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |)
                              |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "move_core_types::parser::Parser")
                                            []
                                            [ I ],
                                          "consume",
                                          []
                                        |),
                                        [
                                          M.read (| self |);
                                          Value.StructTuple "move_core_types::parser::Token::Gt" []
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  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::language_storage::TypeTag";
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path "anyhow::Error"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::Vector"
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::boxed::Box")
                                        []
                                        [
                                          Ty.path "move_core_types::language_storage::TypeTag";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "new",
                                      []
                                    |),
                                    [ M.read (| ty |) ]
                                  |)
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "move_core_types::parser::Token::Address",
                                0
                              |) in
                            let addr := M.copy (| γ0_0 |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "move_core_types::parser::Parser")
                                            []
                                            [ I ],
                                          "consume",
                                          []
                                        |),
                                        [
                                          M.read (| self |);
                                          Value.StructTuple
                                            "move_core_types::parser::Token::ColonColon"
                                            []
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  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::language_storage::TypeTag";
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path "anyhow::Error"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            let~ 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 "alloc::string::String"; Ty.path "anyhow::Error"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "move_core_types::parser::Token";
                                                Ty.path "anyhow::Error"
                                              ],
                                            "and_then",
                                            [
                                              Ty.path "alloc::string::String";
                                              Ty.function
                                                [ Ty.path "move_core_types::parser::Token" ]
                                                (Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "alloc::string::String";
                                                    Ty.path "anyhow::Error"
                                                  ])
                                            ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "move_core_types::parser::Parser")
                                                  []
                                                  [ I ],
                                                "next",
                                                []
                                              |),
                                              [ M.read (| self |) ]
                                            |);
                                            M.get_function (|
                                              "move_core_types::parser::token_as_name",
                                              []
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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::language_storage::TypeTag";
                                                        Ty.path "anyhow::Error"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path "anyhow::Error"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |)
                              |) in
                            let~ _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "move_core_types::parser::Parser")
                                            []
                                            [ I ],
                                          "consume",
                                          []
                                        |),
                                        [
                                          M.read (| self |);
                                          Value.StructTuple
                                            "move_core_types::parser::Token::ColonColon"
                                            []
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  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::language_storage::TypeTag";
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path "anyhow::Error"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            let~ 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 "alloc::string::String"; Ty.path "anyhow::Error"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "move_core_types::parser::Token";
                                                Ty.path "anyhow::Error"
                                              ],
                                            "and_then",
                                            [
                                              Ty.path "alloc::string::String";
                                              Ty.function
                                                [ Ty.path "move_core_types::parser::Token" ]
                                                (Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  []
                                                  [
                                                    Ty.path "alloc::string::String";
                                                    Ty.path "anyhow::Error"
                                                  ])
                                            ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "move_core_types::parser::Parser")
                                                  []
                                                  [ I ],
                                                "next",
                                                []
                                              |),
                                              [ M.read (| self |) ]
                                            |);
                                            M.get_function (|
                                              "move_core_types::parser::token_as_name",
                                              []
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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::language_storage::TypeTag";
                                                        Ty.path "anyhow::Error"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path "anyhow::Error"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |)
                              |) in
                            let~ ty_args :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          M.use
                                            (M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::cmp::PartialEq",
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    []
                                                    [
                                                      Ty.apply
                                                        (Ty.path "&")
                                                        []
                                                        [ Ty.path "move_core_types::parser::Token" ]
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      []
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          []
                                                          [ Ty.path "move_core_types::parser::Token"
                                                          ]
                                                      ]
                                                  ],
                                                  "eq",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [ I ],
                                                        "peek",
                                                        []
                                                      |),
                                                      [ M.read (| self |) ]
                                                    |)
                                                  |);
                                                  M.alloc (|
                                                    Value.StructTuple
                                                      "core::option::Option::Some"
                                                      [
                                                        M.alloc (|
                                                          Value.StructTuple
                                                            "move_core_types::parser::Token::Lt"
                                                            []
                                                        |)
                                                      ]
                                                  |)
                                                ]
                                              |)
                                            |)) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        let~ _ :=
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::Try",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [
                                                      Ty.path "move_core_types::parser::Token";
                                                      Ty.path "anyhow::Error"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "move_core_types::parser::Parser")
                                                        []
                                                        [ I ],
                                                      "next",
                                                      []
                                                    |),
                                                    [ M.read (| self |) ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              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::language_storage::TypeTag";
                                                                  Ty.path "anyhow::Error"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path "anyhow::Error"
                                                                  ]
                                                              ],
                                                              "from_residual",
                                                              []
                                                            |),
                                                            [ M.read (| residual |) ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                      0
                                                    |) in
                                                  let val := M.copy (| γ0_0 |) in
                                                  val))
                                            ]
                                          |) in
                                        let~ ty_args :=
                                          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_core_types::language_storage::TypeTag";
                                                            Ty.path "alloc::alloc::Global"
                                                          ];
                                                        Ty.path "anyhow::Error"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [ I ],
                                                        "parse_comma_list",
                                                        [
                                                          Ty.function
                                                            [
                                                              Ty.tuple
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "&mut")
                                                                    []
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "move_core_types::parser::Parser")
                                                                        []
                                                                        [ I ]
                                                                    ]
                                                                ]
                                                            ]
                                                            (Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "move_core_types::language_storage::TypeTag";
                                                                Ty.path "anyhow::Error"
                                                              ]);
                                                          Ty.path
                                                            "move_core_types::language_storage::TypeTag"
                                                        ]
                                                      |),
                                                      [
                                                        M.read (| self |);
                                                        M.closure
                                                          (fun γ =>
                                                            ltac:(M.monadic
                                                              match γ with
                                                              | [ α0 ] =>
                                                                ltac:(M.monadic
                                                                  (M.match_operator (|
                                                                    M.alloc (| α0 |),
                                                                    [
                                                                      fun γ =>
                                                                        ltac:(M.monadic
                                                                          (let parser :=
                                                                            M.copy (| γ |) in
                                                                          M.call_closure (|
                                                                            M.get_associated_function (|
                                                                              Ty.apply
                                                                                (Ty.path
                                                                                  "move_core_types::parser::Parser")
                                                                                []
                                                                                [ I ],
                                                                              "parse_type_tag",
                                                                              []
                                                                            |),
                                                                            [ M.read (| parser |) ]
                                                                          |)))
                                                                    ]
                                                                  |)))
                                                              | _ =>
                                                                M.impossible
                                                                  "wrong number of arguments"
                                                              end));
                                                        Value.StructTuple
                                                          "move_core_types::parser::Token::Gt"
                                                          [];
                                                        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_core_types::language_storage::TypeTag";
                                                                    Ty.path "anyhow::Error"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path "anyhow::Error"
                                                                    ]
                                                                ],
                                                                "from_residual",
                                                                []
                                                              |),
                                                              [ M.read (| residual |) ]
                                                            |)
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Continue",
                                                        0
                                                      |) in
                                                    let val := M.copy (| γ0_0 |) in
                                                    val))
                                              ]
                                            |)
                                          |) in
                                        let~ _ :=
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::Try",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    []
                                                    [ Ty.tuple []; Ty.path "anyhow::Error" ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "move_core_types::parser::Parser")
                                                        []
                                                        [ I ],
                                                      "consume",
                                                      []
                                                    |),
                                                    [
                                                      M.read (| self |);
                                                      Value.StructTuple
                                                        "move_core_types::parser::Token::Gt"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              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::language_storage::TypeTag";
                                                                  Ty.path "anyhow::Error"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path "anyhow::Error"
                                                                  ]
                                                              ],
                                                              "from_residual",
                                                              []
                                                            |),
                                                            [ M.read (| residual |) ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                      0
                                                    |) in
                                                  let val := M.copy (| γ0_0 |) in
                                                  val))
                                            ]
                                          |) in
                                        ty_args));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "alloc::vec::Vec")
                                                []
                                                [
                                                  Ty.path
                                                    "move_core_types::language_storage::TypeTag";
                                                  Ty.path "alloc::alloc::Global"
                                                ],
                                              "new",
                                              []
                                            |),
                                            []
                                          |)
                                        |)))
                                  ]
                                |)
                              |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::language_storage::TypeTag::Struct"
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::boxed::Box")
                                        []
                                        [
                                          Ty.path "move_core_types::language_storage::StructTag";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "new",
                                      []
                                    |),
                                    [
                                      Value.StructRecord
                                        "move_core_types::language_storage::StructTag"
                                        [
                                          ("address",
                                            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::account_address::AccountAddress";
                                                          Ty.path
                                                            "move_core_types::account_address::AccountAddressParseError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path
                                                            "move_core_types::account_address::AccountAddress",
                                                          "from_hex_literal",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ addr ]
                                                          |)
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  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::language_storage::TypeTag";
                                                                      Ty.path "anyhow::Error"
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.path
                                                                          "move_core_types::account_address::AccountAddressParseError"
                                                                      ]
                                                                  ],
                                                                  "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))
                                                ]
                                              |)
                                            |));
                                          ("module",
                                            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::identifier::Identifier";
                                                          Ty.path "anyhow::Error"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path
                                                            "move_core_types::identifier::Identifier",
                                                          "new",
                                                          [ Ty.path "alloc::string::String" ]
                                                        |),
                                                        [ 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.path
                                                                        "move_core_types::language_storage::TypeTag";
                                                                      Ty.path "anyhow::Error"
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.path "anyhow::Error"
                                                                      ]
                                                                  ],
                                                                  "from_residual",
                                                                  []
                                                                |),
                                                                [ M.read (| residual |) ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Continue",
                                                          0
                                                        |) in
                                                      let val := M.copy (| γ0_0 |) in
                                                      val))
                                                ]
                                              |)
                                            |));
                                          ("name",
                                            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::identifier::Identifier";
                                                          Ty.path "anyhow::Error"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path
                                                            "move_core_types::identifier::Identifier",
                                                          "new",
                                                          [ Ty.path "alloc::string::String" ]
                                                        |),
                                                        [ M.read (| name |) ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  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::language_storage::TypeTag";
                                                                      Ty.path "anyhow::Error"
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      []
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.path "anyhow::Error"
                                                                      ]
                                                                  ],
                                                                  "from_residual",
                                                                  []
                                                                |),
                                                                [ M.read (| residual |) ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Continue",
                                                          0
                                                        |) in
                                                      let val := M.copy (| γ0_0 |) in
                                                      val))
                                                ]
                                              |)
                                            |));
                                          ("type_params", M.read (| ty_args |))
                                        ]
                                    ]
                                  |)
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let tok := M.copy (| γ |) 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 "anyhow::Error",
                                            "msg",
                                            [ Ty.path "alloc::string::String" ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "core::hint::must_use",
                                                [ Ty.path "alloc::string::String" ]
                                              |),
                                              [
                                                M.read (|
                                                  let~ res :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "alloc::fmt::format",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path "core::fmt::Arguments",
                                                              "new_v1",
                                                              []
                                                            |),
                                                            [
                                                              M.alloc (|
                                                                Value.Array
                                                                  [
                                                                    M.read (|
                                                                      Value.String
                                                                        "unexpected token "
                                                                    |);
                                                                    M.read (|
                                                                      Value.String
                                                                        ", expected type tag"
                                                                    |)
                                                                  ]
                                                              |);
                                                              M.alloc (|
                                                                Value.Array
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::rt::Argument",
                                                                        "new_debug",
                                                                        [
                                                                          Ty.path
                                                                            "move_core_types::parser::Token"
                                                                        ]
                                                                      |),
                                                                      [ tok ]
                                                                    |)
                                                                  ]
                                                              |)
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    |) in
                                                  res
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |)
                ]))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_parse_type_tag :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "parse_type_tag" (parse_type_tag I).
    
    (*
        fn parse_transaction_argument(&mut self) -> Result<TransactionArgument> {
            Ok(match self.next()? {
                Token::U8(s) => TransactionArgument::U8(s.replace('_', "").parse()?),
                Token::U16(s) => TransactionArgument::U16(s.replace('_', "").parse()?),
                Token::U32(s) => TransactionArgument::U32(s.replace('_', "").parse()?),
                Token::U64(s) => TransactionArgument::U64(s.replace('_', "").parse()?),
                Token::U128(s) => TransactionArgument::U128(s.replace('_', "").parse()?),
                Token::U256(s) => TransactionArgument::U256(s.replace('_', "").parse()?),
                Token::True => TransactionArgument::Bool(true),
                Token::False => TransactionArgument::Bool(false),
                Token::Address(addr) => {
                    TransactionArgument::Address(AccountAddress::from_hex_literal(&addr)?)
                }
                Token::Bytes(s) => TransactionArgument::U8Vector(hex::decode(s)?),
                tok => bail!("unexpected token {:?}, expected transaction argument", tok),
            })
        }
    *)
    Definition parse_transaction_argument
        (I : Ty.t)
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      let Self : Ty.t := Self I in
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.catch_return (|
            ltac:(M.monadic
              (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_core_types::parser::Token"; Ty.path "anyhow::Error"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply (Ty.path "move_core_types::parser::Parser") [] [ I ],
                                  "next",
                                  []
                                |),
                                [ M.read (| self |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          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::transaction_argument::TransactionArgument";
                                              Ty.path "anyhow::Error"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              []
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "anyhow::Error"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "move_core_types::parser::Token::U8",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U8"
                                [
                                  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 "core::num::error::ParseIntError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "parse",
                                                [ Ty.path "u8" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "str",
                                                          "replace",
                                                          [ Ty.path "char" ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ s ]
                                                          |);
                                                          Value.UnicodeChar 95;
                                                          M.read (| Value.String "" |)
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "core::num::error::ParseIntError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::U16",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U16"
                                [
                                  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 "core::num::error::ParseIntError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "parse",
                                                [ Ty.path "u16" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "str",
                                                          "replace",
                                                          [ Ty.path "char" ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ s ]
                                                          |);
                                                          Value.UnicodeChar 95;
                                                          M.read (| Value.String "" |)
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "core::num::error::ParseIntError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::U32",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U32"
                                [
                                  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 "u32";
                                                Ty.path "core::num::error::ParseIntError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "parse",
                                                [ Ty.path "u32" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "str",
                                                          "replace",
                                                          [ Ty.path "char" ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ s ]
                                                          |);
                                                          Value.UnicodeChar 95;
                                                          M.read (| Value.String "" |)
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "core::num::error::ParseIntError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::U64",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U64"
                                [
                                  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 "core::num::error::ParseIntError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "parse",
                                                [ Ty.path "u64" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "str",
                                                          "replace",
                                                          [ Ty.path "char" ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ s ]
                                                          |);
                                                          Value.UnicodeChar 95;
                                                          M.read (| Value.String "" |)
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "core::num::error::ParseIntError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::U128",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U128"
                                [
                                  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 "u128";
                                                Ty.path "core::num::error::ParseIntError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "parse",
                                                [ Ty.path "u128" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "str",
                                                          "replace",
                                                          [ Ty.path "char" ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ s ]
                                                          |);
                                                          Value.UnicodeChar 95;
                                                          M.read (| Value.String "" |)
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "core::num::error::ParseIntError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::U256",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U256"
                                [
                                  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::u256::U256";
                                                Ty.path "move_core_types::u256::U256FromStrError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "str",
                                                "parse",
                                                [ Ty.path "move_core_types::u256::U256" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.path "str",
                                                          "replace",
                                                          [ Ty.path "char" ]
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::deref::Deref",
                                                              Ty.path "alloc::string::String",
                                                              [],
                                                              "deref",
                                                              []
                                                            |),
                                                            [ s ]
                                                          |);
                                                          Value.UnicodeChar 95;
                                                          M.read (| Value.String "" |)
                                                        ]
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "move_core_types::u256::U256FromStrError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::True" |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::Bool"
                                [ Value.Bool true ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let _ :=
                              M.is_struct_tuple (| γ, "move_core_types::parser::Token::False" |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::Bool"
                                [ Value.Bool false ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "move_core_types::parser::Token::Address",
                                0
                              |) in
                            let addr := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::Address"
                                [
                                  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::account_address::AccountAddress";
                                                Ty.path
                                                  "move_core_types::account_address::AccountAddressParseError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "move_core_types::account_address::AccountAddress",
                                                "from_hex_literal",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.path "alloc::string::String",
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [ addr ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "move_core_types::account_address::AccountAddressParseError"
                                                            ]
                                                        ],
                                                        "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_core_types::parser::Token::Bytes",
                                0
                              |) in
                            let s := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "move_core_types::transaction_argument::TransactionArgument::U8Vector"
                                [
                                  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 "u8"; Ty.path "alloc::alloc::Global" ];
                                                Ty.path "hex::error::FromHexError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "hex::decode",
                                                [ Ty.path "alloc::string::String" ]
                                              |),
                                              [ M.read (| s |) ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        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::transaction_argument::TransactionArgument";
                                                            Ty.path "anyhow::Error"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            []
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path "hex::error::FromHexError"
                                                            ]
                                                        ],
                                                        "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 tok := M.copy (| γ |) 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 "anyhow::Error",
                                            "msg",
                                            [ Ty.path "alloc::string::String" ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "core::hint::must_use",
                                                [ Ty.path "alloc::string::String" ]
                                              |),
                                              [
                                                M.read (|
                                                  let~ res :=
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "alloc::fmt::format",
                                                          []
                                                        |),
                                                        [
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path "core::fmt::Arguments",
                                                              "new_v1",
                                                              []
                                                            |),
                                                            [
                                                              M.alloc (|
                                                                Value.Array
                                                                  [
                                                                    M.read (|
                                                                      Value.String
                                                                        "unexpected token "
                                                                    |);
                                                                    M.read (|
                                                                      Value.String
                                                                        ", expected transaction argument"
                                                                    |)
                                                                  ]
                                                              |);
                                                              M.alloc (|
                                                                Value.Array
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::rt::Argument",
                                                                        "new_debug",
                                                                        [
                                                                          Ty.path
                                                                            "move_core_types::parser::Token"
                                                                        ]
                                                                      |),
                                                                      [ tok ]
                                                                    |)
                                                                  ]
                                                              |)
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    |) in
                                                  res
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |)
                ]))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_parse_transaction_argument :
      forall (I : Ty.t),
      M.IsAssociatedFunction (Self I) "parse_transaction_argument" (parse_transaction_argument I).
  End Impl_move_core_types_parser_Parser_I.
  
  (*
  fn parse<F, T>(s: &str, f: F) -> Result<T>
  where
      F: Fn(&mut Parser<std::vec::IntoIter<Token>>) -> Result<T>,
  {
      let mut tokens: Vec<_> = tokenize(s)?
          .into_iter()
          .filter(|tok| !tok.is_whitespace())
          .collect();
      tokens.push(Token::EOF);
      let mut parser = Parser::new(tokens);
      let res = f(&mut parser)?;
      parser.consume(Token::EOF)?;
      Ok(res)
  }
  *)
  Definition parse (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [ F; T ], [ s; f ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        let f := M.alloc (| f |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ tokens :=
                M.alloc (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::iter::traits::iterator::Iterator",
                      Ty.apply
                        (Ty.path "core::iter::adapters::filter::Filter")
                        []
                        [
                          Ty.apply
                            (Ty.path "alloc::vec::into_iter::IntoIter")
                            []
                            [
                              Ty.path "move_core_types::parser::Token";
                              Ty.path "alloc::alloc::Global"
                            ];
                          Ty.function
                            [
                              Ty.tuple
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    []
                                    [ Ty.path "move_core_types::parser::Token" ]
                                ]
                            ]
                            (Ty.path "bool")
                        ],
                      [],
                      "collect",
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "move_core_types::parser::Token"; Ty.path "alloc::alloc::Global"
                          ]
                      ]
                    |),
                    [
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::iterator::Iterator",
                          Ty.apply
                            (Ty.path "alloc::vec::into_iter::IntoIter")
                            []
                            [
                              Ty.path "move_core_types::parser::Token";
                              Ty.path "alloc::alloc::Global"
                            ],
                          [],
                          "filter",
                          [
                            Ty.function
                              [
                                Ty.tuple
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      []
                                      [ Ty.path "move_core_types::parser::Token" ]
                                  ]
                              ]
                              (Ty.path "bool")
                          ]
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                []
                                [
                                  Ty.path "move_core_types::parser::Token";
                                  Ty.path "alloc::alloc::Global"
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              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_core_types::parser::Token";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "anyhow::Error"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "move_core_types::parser::tokenize",
                                            []
                                          |),
                                          [ M.read (| s |) ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    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 "anyhow::Error" ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        []
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path "anyhow::Error"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |)
                              |)
                            ]
                          |);
                          M.closure
                            (fun γ =>
                              ltac:(M.monadic
                                match γ with
                                | [ α0 ] =>
                                  ltac:(M.monadic
                                    (M.match_operator (|
                                      M.alloc (| α0 |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let tok := M.copy (| γ |) in
                                            UnOp.not (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.path "move_core_types::parser::Token",
                                                  "is_whitespace",
                                                  []
                                                |),
                                                [ M.read (| tok |) ]
                                              |)
                                            |)))
                                      ]
                                    |)))
                                | _ => M.impossible "wrong number of arguments"
                                end))
                        ]
                      |)
                    ]
                  |)
                |) in
              let~ _ :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "alloc::vec::Vec")
                        []
                        [ Ty.path "move_core_types::parser::Token"; Ty.path "alloc::alloc::Global"
                        ],
                      "push",
                      []
                    |),
                    [ tokens; Value.StructTuple "move_core_types::parser::Token::EOF" [] ]
                  |)
                |) in
              let~ parser :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "move_core_types::parser::Parser")
                        []
                        [
                          Ty.apply
                            (Ty.path "alloc::vec::into_iter::IntoIter")
                            []
                            [
                              Ty.path "move_core_types::parser::Token";
                              Ty.path "alloc::alloc::Global"
                            ]
                        ],
                      "new",
                      [
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          []
                          [ Ty.path "move_core_types::parser::Token"; Ty.path "alloc::alloc::Global"
                          ]
                      ]
                    |),
                    [ M.read (| tokens |) ]
                  |)
                |) in
              let~ res :=
                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")
                            []
                            [ T; Ty.path "anyhow::Error" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::function::Fn",
                              F,
                              [
                                Ty.tuple
                                  [
                                    Ty.apply
                                      (Ty.path "&mut")
                                      []
                                      [
                                        Ty.apply
                                          (Ty.path "move_core_types::parser::Parser")
                                          []
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::into_iter::IntoIter")
                                              []
                                              [
                                                Ty.path "move_core_types::parser::Token";
                                                Ty.path "alloc::alloc::Global"
                                              ]
                                          ]
                                      ]
                                  ]
                              ],
                              "call",
                              []
                            |),
                            [ f; Value.Tuple [ parser ] ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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 "anyhow::Error" ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "anyhow::Error"
                                          ]
                                      ],
                                      "from_residual",
                                      []
                                    |),
                                    [ M.read (| residual |) ]
                                  |)
                                |)
                              |)
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Continue",
                              0
                            |) in
                          let val := M.copy (| γ0_0 |) in
                          val))
                    ]
                  |)
                |) in
              let~ _ :=
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::ops::try_trait::Try",
                        Ty.apply
                          (Ty.path "core::result::Result")
                          []
                          [ Ty.tuple []; Ty.path "anyhow::Error" ],
                        [],
                        "branch",
                        []
                      |),
                      [
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "move_core_types::parser::Parser")
                              []
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::into_iter::IntoIter")
                                  []
                                  [
                                    Ty.path "move_core_types::parser::Token";
                                    Ty.path "alloc::alloc::Global"
                                  ]
                              ],
                            "consume",
                            []
                          |),
                          [ parser; Value.StructTuple "move_core_types::parser::Token::EOF" [] ]
                        |)
                      ]
                    |)
                  |),
                  [
                    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 "anyhow::Error" ],
                                    [
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "core::convert::Infallible";
                                          Ty.path "anyhow::Error"
                                        ]
                                    ],
                                    "from_residual",
                                    []
                                  |),
                                  [ M.read (| residual |) ]
                                |)
                              |)
                            |)
                          |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::ops::control_flow::ControlFlow::Continue",
                            0
                          |) in
                        let val := M.copy (| γ0_0 |) in
                        val))
                  ]
                |) in
              M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| res |) ] |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse : M.IsFunction "move_core_types::parser::parse" parse.
  
  (*
  pub fn parse_string_list(s: &str) -> Result<Vec<String>> {
      parse(s, |parser| {
          parser.parse_comma_list(|parser| parser.parse_string(), Token::EOF, true)
      })
  }
  *)
  Definition parse_string_list (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.call_closure (|
          M.get_function (|
            "move_core_types::parser::parse",
            [
              Ty.function
                [
                  Ty.tuple
                    [
                      Ty.apply
                        (Ty.path "&mut")
                        []
                        [
                          Ty.apply
                            (Ty.path "move_core_types::parser::Parser")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::into_iter::IntoIter")
                                []
                                [
                                  Ty.path "move_core_types::parser::Token";
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ]
                        ]
                    ]
                ]
                (Ty.apply
                  (Ty.path "core::result::Result")
                  []
                  [
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [ Ty.path "alloc::string::String"; Ty.path "alloc::alloc::Global" ];
                    Ty.path "anyhow::Error"
                  ]);
              Ty.apply
                (Ty.path "alloc::vec::Vec")
                []
                [ Ty.path "alloc::string::String"; Ty.path "alloc::alloc::Global" ]
            ]
          |),
          [
            M.read (| s |);
            M.closure
              (fun γ =>
                ltac:(M.monadic
                  match γ with
                  | [ α0 ] =>
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| α0 |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let parser := M.copy (| γ |) in
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "move_core_types::parser::Parser")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "alloc::vec::into_iter::IntoIter")
                                        []
                                        [
                                          Ty.path "move_core_types::parser::Token";
                                          Ty.path "alloc::alloc::Global"
                                        ]
                                    ],
                                  "parse_comma_list",
                                  [
                                    Ty.function
                                      [
                                        Ty.tuple
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "move_core_types::parser::Parser")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::into_iter::IntoIter")
                                                      []
                                                      [
                                                        Ty.path "move_core_types::parser::Token";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ]
                                              ]
                                          ]
                                      ]
                                      (Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [ Ty.path "alloc::string::String"; Ty.path "anyhow::Error"
                                        ]);
                                    Ty.path "alloc::string::String"
                                  ]
                                |),
                                [
                                  M.read (| parser |);
                                  M.closure
                                    (fun γ =>
                                      ltac:(M.monadic
                                        match γ with
                                        | [ α0 ] =>
                                          ltac:(M.monadic
                                            (M.match_operator (|
                                              M.alloc (| α0 |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let parser := M.copy (| γ |) in
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path
                                                                "alloc::vec::into_iter::IntoIter")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "move_core_types::parser::Token";
                                                                Ty.path "alloc::alloc::Global"
                                                              ]
                                                          ],
                                                        "parse_string",
                                                        []
                                                      |),
                                                      [ M.read (| parser |) ]
                                                    |)))
                                              ]
                                            |)))
                                        | _ => M.impossible "wrong number of arguments"
                                        end));
                                  Value.StructTuple "move_core_types::parser::Token::EOF" [];
                                  Value.Bool true
                                ]
                              |)))
                        ]
                      |)))
                  | _ => M.impossible "wrong number of arguments"
                  end))
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse_string_list :
    M.IsFunction "move_core_types::parser::parse_string_list" parse_string_list.
  
  (*
  pub fn parse_type_tags(s: &str) -> Result<Vec<TypeTag>> {
      parse(s, |parser| {
          parser.parse_comma_list(|parser| parser.parse_type_tag(), Token::EOF, true)
      })
  }
  *)
  Definition parse_type_tags (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.call_closure (|
          M.get_function (|
            "move_core_types::parser::parse",
            [
              Ty.function
                [
                  Ty.tuple
                    [
                      Ty.apply
                        (Ty.path "&mut")
                        []
                        [
                          Ty.apply
                            (Ty.path "move_core_types::parser::Parser")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::into_iter::IntoIter")
                                []
                                [
                                  Ty.path "move_core_types::parser::Token";
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ]
                        ]
                    ]
                ]
                (Ty.apply
                  (Ty.path "core::result::Result")
                  []
                  [
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.path "move_core_types::language_storage::TypeTag";
                        Ty.path "alloc::alloc::Global"
                      ];
                    Ty.path "anyhow::Error"
                  ]);
              Ty.apply
                (Ty.path "alloc::vec::Vec")
                []
                [
                  Ty.path "move_core_types::language_storage::TypeTag";
                  Ty.path "alloc::alloc::Global"
                ]
            ]
          |),
          [
            M.read (| s |);
            M.closure
              (fun γ =>
                ltac:(M.monadic
                  match γ with
                  | [ α0 ] =>
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| α0 |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let parser := M.copy (| γ |) in
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "move_core_types::parser::Parser")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "alloc::vec::into_iter::IntoIter")
                                        []
                                        [
                                          Ty.path "move_core_types::parser::Token";
                                          Ty.path "alloc::alloc::Global"
                                        ]
                                    ],
                                  "parse_comma_list",
                                  [
                                    Ty.function
                                      [
                                        Ty.tuple
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "move_core_types::parser::Parser")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::into_iter::IntoIter")
                                                      []
                                                      [
                                                        Ty.path "move_core_types::parser::Token";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ]
                                              ]
                                          ]
                                      ]
                                      (Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "move_core_types::language_storage::TypeTag";
                                          Ty.path "anyhow::Error"
                                        ]);
                                    Ty.path "move_core_types::language_storage::TypeTag"
                                  ]
                                |),
                                [
                                  M.read (| parser |);
                                  M.closure
                                    (fun γ =>
                                      ltac:(M.monadic
                                        match γ with
                                        | [ α0 ] =>
                                          ltac:(M.monadic
                                            (M.match_operator (|
                                              M.alloc (| α0 |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let parser := M.copy (| γ |) in
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path
                                                                "alloc::vec::into_iter::IntoIter")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "move_core_types::parser::Token";
                                                                Ty.path "alloc::alloc::Global"
                                                              ]
                                                          ],
                                                        "parse_type_tag",
                                                        []
                                                      |),
                                                      [ M.read (| parser |) ]
                                                    |)))
                                              ]
                                            |)))
                                        | _ => M.impossible "wrong number of arguments"
                                        end));
                                  Value.StructTuple "move_core_types::parser::Token::EOF" [];
                                  Value.Bool true
                                ]
                              |)))
                        ]
                      |)))
                  | _ => M.impossible "wrong number of arguments"
                  end))
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse_type_tags :
    M.IsFunction "move_core_types::parser::parse_type_tags" parse_type_tags.
  
  (*
  pub fn parse_type_tag(s: &str) -> Result<TypeTag> {
      parse(s, |parser| parser.parse_type_tag())
  }
  *)
  Definition parse_type_tag (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.call_closure (|
          M.get_function (|
            "move_core_types::parser::parse",
            [
              Ty.function
                [
                  Ty.tuple
                    [
                      Ty.apply
                        (Ty.path "&mut")
                        []
                        [
                          Ty.apply
                            (Ty.path "move_core_types::parser::Parser")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::into_iter::IntoIter")
                                []
                                [
                                  Ty.path "move_core_types::parser::Token";
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ]
                        ]
                    ]
                ]
                (Ty.apply
                  (Ty.path "core::result::Result")
                  []
                  [ Ty.path "move_core_types::language_storage::TypeTag"; Ty.path "anyhow::Error"
                  ]);
              Ty.path "move_core_types::language_storage::TypeTag"
            ]
          |),
          [
            M.read (| s |);
            M.closure
              (fun γ =>
                ltac:(M.monadic
                  match γ with
                  | [ α0 ] =>
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| α0 |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let parser := M.copy (| γ |) in
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "move_core_types::parser::Parser")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "alloc::vec::into_iter::IntoIter")
                                        []
                                        [
                                          Ty.path "move_core_types::parser::Token";
                                          Ty.path "alloc::alloc::Global"
                                        ]
                                    ],
                                  "parse_type_tag",
                                  []
                                |),
                                [ M.read (| parser |) ]
                              |)))
                        ]
                      |)))
                  | _ => M.impossible "wrong number of arguments"
                  end))
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse_type_tag :
    M.IsFunction "move_core_types::parser::parse_type_tag" parse_type_tag.
  
  (*
  pub fn parse_transaction_arguments(s: &str) -> Result<Vec<TransactionArgument>> {
      parse(s, |parser| {
          parser.parse_comma_list(
              |parser| parser.parse_transaction_argument(),
              Token::EOF,
              true,
          )
      })
  }
  *)
  Definition parse_transaction_arguments
      (ε : list Value.t)
      (τ : list Ty.t)
      (α : list Value.t)
      : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.call_closure (|
          M.get_function (|
            "move_core_types::parser::parse",
            [
              Ty.function
                [
                  Ty.tuple
                    [
                      Ty.apply
                        (Ty.path "&mut")
                        []
                        [
                          Ty.apply
                            (Ty.path "move_core_types::parser::Parser")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::into_iter::IntoIter")
                                []
                                [
                                  Ty.path "move_core_types::parser::Token";
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ]
                        ]
                    ]
                ]
                (Ty.apply
                  (Ty.path "core::result::Result")
                  []
                  [
                    Ty.apply
                      (Ty.path "alloc::vec::Vec")
                      []
                      [
                        Ty.path "move_core_types::transaction_argument::TransactionArgument";
                        Ty.path "alloc::alloc::Global"
                      ];
                    Ty.path "anyhow::Error"
                  ]);
              Ty.apply
                (Ty.path "alloc::vec::Vec")
                []
                [
                  Ty.path "move_core_types::transaction_argument::TransactionArgument";
                  Ty.path "alloc::alloc::Global"
                ]
            ]
          |),
          [
            M.read (| s |);
            M.closure
              (fun γ =>
                ltac:(M.monadic
                  match γ with
                  | [ α0 ] =>
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| α0 |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let parser := M.copy (| γ |) in
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "move_core_types::parser::Parser")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "alloc::vec::into_iter::IntoIter")
                                        []
                                        [
                                          Ty.path "move_core_types::parser::Token";
                                          Ty.path "alloc::alloc::Global"
                                        ]
                                    ],
                                  "parse_comma_list",
                                  [
                                    Ty.function
                                      [
                                        Ty.tuple
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "move_core_types::parser::Parser")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::into_iter::IntoIter")
                                                      []
                                                      [
                                                        Ty.path "move_core_types::parser::Token";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ]
                                              ]
                                          ]
                                      ]
                                      (Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path
                                            "move_core_types::transaction_argument::TransactionArgument";
                                          Ty.path "anyhow::Error"
                                        ]);
                                    Ty.path
                                      "move_core_types::transaction_argument::TransactionArgument"
                                  ]
                                |),
                                [
                                  M.read (| parser |);
                                  M.closure
                                    (fun γ =>
                                      ltac:(M.monadic
                                        match γ with
                                        | [ α0 ] =>
                                          ltac:(M.monadic
                                            (M.match_operator (|
                                              M.alloc (| α0 |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let parser := M.copy (| γ |) in
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path
                                                                "alloc::vec::into_iter::IntoIter")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "move_core_types::parser::Token";
                                                                Ty.path "alloc::alloc::Global"
                                                              ]
                                                          ],
                                                        "parse_transaction_argument",
                                                        []
                                                      |),
                                                      [ M.read (| parser |) ]
                                                    |)))
                                              ]
                                            |)))
                                        | _ => M.impossible "wrong number of arguments"
                                        end));
                                  Value.StructTuple "move_core_types::parser::Token::EOF" [];
                                  Value.Bool true
                                ]
                              |)))
                        ]
                      |)))
                  | _ => M.impossible "wrong number of arguments"
                  end))
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse_transaction_arguments :
    M.IsFunction "move_core_types::parser::parse_transaction_arguments" parse_transaction_arguments.
  
  (*
  pub fn parse_transaction_argument(s: &str) -> Result<TransactionArgument> {
      parse(s, |parser| parser.parse_transaction_argument())
  }
  *)
  Definition parse_transaction_argument (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.call_closure (|
          M.get_function (|
            "move_core_types::parser::parse",
            [
              Ty.function
                [
                  Ty.tuple
                    [
                      Ty.apply
                        (Ty.path "&mut")
                        []
                        [
                          Ty.apply
                            (Ty.path "move_core_types::parser::Parser")
                            []
                            [
                              Ty.apply
                                (Ty.path "alloc::vec::into_iter::IntoIter")
                                []
                                [
                                  Ty.path "move_core_types::parser::Token";
                                  Ty.path "alloc::alloc::Global"
                                ]
                            ]
                        ]
                    ]
                ]
                (Ty.apply
                  (Ty.path "core::result::Result")
                  []
                  [
                    Ty.path "move_core_types::transaction_argument::TransactionArgument";
                    Ty.path "anyhow::Error"
                  ]);
              Ty.path "move_core_types::transaction_argument::TransactionArgument"
            ]
          |),
          [
            M.read (| s |);
            M.closure
              (fun γ =>
                ltac:(M.monadic
                  match γ with
                  | [ α0 ] =>
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| α0 |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let parser := M.copy (| γ |) in
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "move_core_types::parser::Parser")
                                    []
                                    [
                                      Ty.apply
                                        (Ty.path "alloc::vec::into_iter::IntoIter")
                                        []
                                        [
                                          Ty.path "move_core_types::parser::Token";
                                          Ty.path "alloc::alloc::Global"
                                        ]
                                    ],
                                  "parse_transaction_argument",
                                  []
                                |),
                                [ M.read (| parser |) ]
                              |)))
                        ]
                      |)))
                  | _ => M.impossible "wrong number of arguments"
                  end))
          ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse_transaction_argument :
    M.IsFunction "move_core_types::parser::parse_transaction_argument" parse_transaction_argument.
  
  (*
  pub fn parse_struct_tag(s: &str) -> Result<StructTag> {
      let type_tag = parse(s, |parser| parser.parse_type_tag())
          .map_err(|e| format_err!("invalid struct tag: {}, {}", s, e))?;
      if let TypeTag::Struct(struct_tag) = type_tag {
          Ok( *struct_tag)
      } else {
          bail!("invalid struct tag: {}", s)
      }
  }
  *)
  Definition parse_struct_tag (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ s ] =>
      ltac:(M.monadic
        (let s := M.alloc (| s |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let~ type_tag :=
                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::language_storage::TypeTag";
                              Ty.path "anyhow::Error"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::result::Result")
                                []
                                [
                                  Ty.path "move_core_types::language_storage::TypeTag";
                                  Ty.path "anyhow::Error"
                                ],
                              "map_err",
                              [
                                Ty.path "anyhow::Error";
                                Ty.function
                                  [ Ty.tuple [ Ty.path "anyhow::Error" ] ]
                                  (Ty.path "anyhow::Error")
                              ]
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "move_core_types::parser::parse",
                                  [
                                    Ty.function
                                      [
                                        Ty.tuple
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              []
                                              [
                                                Ty.apply
                                                  (Ty.path "move_core_types::parser::Parser")
                                                  []
                                                  [
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::into_iter::IntoIter")
                                                      []
                                                      [
                                                        Ty.path "move_core_types::parser::Token";
                                                        Ty.path "alloc::alloc::Global"
                                                      ]
                                                  ]
                                              ]
                                          ]
                                      ]
                                      (Ty.apply
                                        (Ty.path "core::result::Result")
                                        []
                                        [
                                          Ty.path "move_core_types::language_storage::TypeTag";
                                          Ty.path "anyhow::Error"
                                        ]);
                                    Ty.path "move_core_types::language_storage::TypeTag"
                                  ]
                                |),
                                [
                                  M.read (| s |);
                                  M.closure
                                    (fun γ =>
                                      ltac:(M.monadic
                                        match γ with
                                        | [ α0 ] =>
                                          ltac:(M.monadic
                                            (M.match_operator (|
                                              M.alloc (| α0 |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let parser := M.copy (| γ |) in
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply
                                                          (Ty.path
                                                            "move_core_types::parser::Parser")
                                                          []
                                                          [
                                                            Ty.apply
                                                              (Ty.path
                                                                "alloc::vec::into_iter::IntoIter")
                                                              []
                                                              [
                                                                Ty.path
                                                                  "move_core_types::parser::Token";
                                                                Ty.path "alloc::alloc::Global"
                                                              ]
                                                          ],
                                                        "parse_type_tag",
                                                        []
                                                      |),
                                                      [ M.read (| parser |) ]
                                                    |)))
                                              ]
                                            |)))
                                        | _ => M.impossible "wrong number of arguments"
                                        end))
                                ]
                              |);
                              M.closure
                                (fun γ =>
                                  ltac:(M.monadic
                                    match γ with
                                    | [ α0 ] =>
                                      ltac:(M.monadic
                                        (M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let e := M.copy (| γ |) in
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "anyhow::Error",
                                                    "msg",
                                                    [ Ty.path "alloc::string::String" ]
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "core::hint::must_use",
                                                        [ Ty.path "alloc::string::String" ]
                                                      |),
                                                      [
                                                        M.read (|
                                                          let~ res :=
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_function (|
                                                                  "alloc::fmt::format",
                                                                  []
                                                                |),
                                                                [
                                                                  M.call_closure (|
                                                                    M.get_associated_function (|
                                                                      Ty.path
                                                                        "core::fmt::Arguments",
                                                                      "new_v1",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.alloc (|
                                                                        Value.Array
                                                                          [
                                                                            M.read (|
                                                                              Value.String
                                                                                "invalid struct tag: "
                                                                            |);
                                                                            M.read (|
                                                                              Value.String ", "
                                                                            |)
                                                                          ]
                                                                      |);
                                                                      M.alloc (|
                                                                        Value.Array
                                                                          [
                                                                            M.call_closure (|
                                                                              M.get_associated_function (|
                                                                                Ty.path
                                                                                  "core::fmt::rt::Argument",
                                                                                "new_display",
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path "&")
                                                                                    []
                                                                                    [ Ty.path "str"
                                                                                    ]
                                                                                ]
                                                                              |),
                                                                              [ s ]
                                                                            |);
                                                                            M.call_closure (|
                                                                              M.get_associated_function (|
                                                                                Ty.path
                                                                                  "core::fmt::rt::Argument",
                                                                                "new_display",
                                                                                [
                                                                                  Ty.path
                                                                                    "anyhow::Error"
                                                                                ]
                                                                              |),
                                                                              [ e ]
                                                                            |)
                                                                          ]
                                                                      |)
                                                                    ]
                                                                  |)
                                                                ]
                                                              |)
                                                            |) in
                                                          res
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)))
                                          ]
                                        |)))
                                    | _ => 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::language_storage::StructTag";
                                          Ty.path "anyhow::Error"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          []
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "anyhow::Error"
                                          ]
                                      ],
                                      "from_residual",
                                      []
                                    |),
                                    [ M.read (| residual |) ]
                                  |)
                                |)
                              |)
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Continue",
                              0
                            |) in
                          let val := M.copy (| γ0_0 |) in
                          val))
                    ]
                  |)
                |) in
              M.match_operator (|
                M.alloc (| Value.Tuple [] |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ := type_tag in
                      let γ0_0 :=
                        M.SubPointer.get_struct_tuple_field (|
                          γ,
                          "move_core_types::language_storage::TypeTag::Struct",
                          0
                        |) in
                      let struct_tag := M.copy (| γ0_0 |) in
                      M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Ok"
                          [ M.read (| M.read (| struct_tag |) |) ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (M.alloc (|
                        M.never_to_any (|
                          M.read (|
                            M.return_ (|
                              Value.StructTuple
                                "core::result::Result::Err"
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "anyhow::Error",
                                      "msg",
                                      [ Ty.path "alloc::string::String" ]
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "core::hint::must_use",
                                          [ Ty.path "alloc::string::String" ]
                                        |),
                                        [
                                          M.read (|
                                            let~ res :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_function (| "alloc::fmt::format", [] |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path "core::fmt::Arguments",
                                                        "new_v1",
                                                        []
                                                      |),
                                                      [
                                                        M.alloc (|
                                                          Value.Array
                                                            [
                                                              M.read (|
                                                                Value.String "invalid struct tag: "
                                                              |)
                                                            ]
                                                        |);
                                                        M.alloc (|
                                                          Value.Array
                                                            [
                                                              M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.path "core::fmt::rt::Argument",
                                                                  "new_display",
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path "&")
                                                                      []
                                                                      [ Ty.path "str" ]
                                                                  ]
                                                                |),
                                                                [ s ]
                                                              |)
                                                            ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            res
                                          |)
                                        ]
                                      |)
                                    ]
                                  |)
                                ]
                            |)
                          |)
                        |)
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_parse_struct_tag :
    M.IsFunction "move_core_types::parser::parse_struct_tag" parse_struct_tag.
End parser.
