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

Module pod_instruction.
  (* StructRecord
    {
      name := "InitializeMintData";
      ty_params := [];
      fields :=
        [ ("decimals", Ty.path "u8"); ("mint_authority", Ty.path "solana_program::pubkey::Pubkey")
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    (* Clone *)
    Definition clone (τ : 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.match_operator (|
                      Value.DeclaredButUndefined,
                      [ fun γ => ltac:(M.monadic (M.read (| self |))) ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field2_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "InitializeMintData" |);
              M.read (| Value.String "decimals" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod_instruction::InitializeMintData",
                  "decimals"
                |));
              M.read (| Value.String "mint_authority" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::InitializeMintData",
                    "mint_authority"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod_instruction::InitializeMintData"
            [
              ("decimals",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("mint_authority",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "solana_program::pubkey::Pubkey",
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    (* PartialEq *)
    Definition eq (τ : 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
          LogicalOp.and (|
            BinOp.Pure.eq
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod_instruction::InitializeMintData",
                  "decimals"
                |)
              |))
              (M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| other |),
                  "spl_token_2022::pod_instruction::InitializeMintData",
                  "decimals"
                |)
              |)),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_trait_method (|
                  "core::cmp::PartialEq",
                  Ty.path "solana_program::pubkey::Pubkey",
                  [ Ty.path "solana_program::pubkey::Pubkey" ],
                  "eq",
                  []
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::InitializeMintData",
                    "mint_authority"
                  |);
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "spl_token_2022::pod_instruction::InitializeMintData",
                    "mint_authority"
                  |)
                ]
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_InitializeMintData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMintData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_InitializeMintData.
  
  (* StructRecord
    {
      name := "InitializeMultisigData";
      ty_params := [];
      fields := [ ("m", Ty.path "u8") ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    (* Clone *)
    Definition clone (τ : 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.read (| self |))) ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "InitializeMultisigData" |);
              M.read (| Value.String "m" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::InitializeMultisigData",
                    "m"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod_instruction::InitializeMultisigData"
            [
              ("m",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    (* PartialEq *)
    Definition eq (τ : 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
          BinOp.Pure.eq
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod_instruction::InitializeMultisigData",
                "m"
              |)
            |))
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| other |),
                "spl_token_2022::pod_instruction::InitializeMultisigData",
                "m"
              |)
            |))))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_InitializeMultisigData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::InitializeMultisigData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_InitializeMultisigData.
  
  (* StructRecord
    {
      name := "AmountData";
      ty_params := [];
      fields := [ ("amount", Ty.path "spl_pod::primitives::PodU64") ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    (* Clone *)
    Definition clone (τ : 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.read (| self |))) ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "AmountData" |);
              M.read (| Value.String "amount" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::AmountData",
                    "amount"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod_instruction::AmountData"
            [
              ("amount",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodU64",
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    (* PartialEq *)
    Definition eq (τ : 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.call_closure (|
            M.get_trait_method (|
              "core::cmp::PartialEq",
              Ty.path "spl_pod::primitives::PodU64",
              [ Ty.path "spl_pod::primitives::PodU64" ],
              "eq",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod_instruction::AmountData",
                "amount"
              |);
              M.SubPointer.get_struct_record_field (|
                M.read (| other |),
                "spl_token_2022::pod_instruction::AmountData",
                "amount"
              |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_AmountData.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_AmountData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_AmountData.
  
  (* StructRecord
    {
      name := "AmountCheckedData";
      ty_params := [];
      fields := [ ("amount", Ty.path "spl_pod::primitives::PodU64"); ("decimals", Ty.path "u8") ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    (* Clone *)
    Definition clone (τ : 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.match_operator (|
                      Value.DeclaredButUndefined,
                      [ fun γ => ltac:(M.monadic (M.read (| self |))) ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field2_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "AmountCheckedData" |);
              M.read (| Value.String "amount" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod_instruction::AmountCheckedData",
                  "amount"
                |));
              M.read (| Value.String "decimals" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::AmountCheckedData",
                    "decimals"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod_instruction::AmountCheckedData"
            [
              ("amount",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodU64",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("decimals",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    (* PartialEq *)
    Definition eq (τ : 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
          LogicalOp.and (|
            M.call_closure (|
              M.get_trait_method (|
                "core::cmp::PartialEq",
                Ty.path "spl_pod::primitives::PodU64",
                [ Ty.path "spl_pod::primitives::PodU64" ],
                "eq",
                []
              |),
              [
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod_instruction::AmountCheckedData",
                  "amount"
                |);
                M.SubPointer.get_struct_record_field (|
                  M.read (| other |),
                  "spl_token_2022::pod_instruction::AmountCheckedData",
                  "amount"
                |)
              ]
            |),
            ltac:(M.monadic
              (BinOp.Pure.eq
                (M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::AmountCheckedData",
                    "decimals"
                  |)
                |))
                (M.read (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "spl_token_2022::pod_instruction::AmountCheckedData",
                    "decimals"
                  |)
                |))))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_AmountCheckedData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::AmountCheckedData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_AmountCheckedData.
  
  (* StructRecord
    {
      name := "SetAuthorityData";
      ty_params := [];
      fields := [ ("authority_type", Ty.path "u8") ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    (* Clone *)
    Definition clone (τ : 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.read (| self |))) ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "SetAuthorityData" |);
              M.read (| Value.String "authority_type" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod_instruction::SetAuthorityData",
                    "authority_type"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod_instruction::SetAuthorityData"
            [
              ("authority_type",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    (* PartialEq *)
    Definition eq (τ : 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
          BinOp.Pure.eq
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod_instruction::SetAuthorityData",
                "authority_type"
              |)
            |))
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| other |),
                "spl_token_2022::pod_instruction::SetAuthorityData",
                "authority_type"
              |)
            |))))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_SetAuthorityData.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::SetAuthorityData".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_instruction_SetAuthorityData.
  
  (*
  Enum PodTokenInstruction
  {
    ty_params := [];
    variants :=
      [
        {
          name := "InitializeMint";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeAccount";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeMultisig";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Transfer";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Approve";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Revoke";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "SetAuthority";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "MintTo";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Burn";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "CloseAccount";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "FreezeAccount";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "ThawAccount";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "TransferChecked";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "ApproveChecked";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "MintToChecked";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "BurnChecked";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeAccount2";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "SyncNative";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeAccount3";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeMultisig2";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeMint2";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "GetAccountDataSize";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeImmutableOwner";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "AmountToUiAmount";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "UiAmountToAmount";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeMintCloseAuthority";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "TransferFeeExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "ConfidentialTransferExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "DefaultAccountStateExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "Reallocate";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "MemoTransferExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "CreateNativeMint";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializeNonTransferableMint";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InterestBearingMintExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "CpiGuardExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "InitializePermanentDelegate";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "TransferHookExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "ConfidentialTransferFeeExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "WithdrawExcessLamports";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "MetadataPointerExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "GroupPointerExtension";
          item := StructTuple [];
          discriminant := None;
        };
        {
          name := "GroupMemberPointerExtension";
          item := StructTuple [];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    (* Clone *)
    Definition clone (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (| M.read (| self |) |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.read (|
                M.match_operator (|
                  self,
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeMint" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeAccount" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeMultisig" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "Transfer" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "Approve" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "Revoke" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "SetAuthority" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "MintTo" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "Burn" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "CloseAccount" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "FreezeAccount" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "ThawAccount" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "TransferChecked" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "ApproveChecked" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "MintToChecked" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "BurnChecked" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeAccount2" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "SyncNative" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeAccount3" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeMultisig2" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeMint2" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "GetAccountDataSize" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeImmutableOwner" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "AmountToUiAmount" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "UiAmountToAmount" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeMintCloseAuthority" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "TransferFeeExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "ConfidentialTransferExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "DefaultAccountStateExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "Reallocate" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "MemoTransferExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "CreateNativeMint" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializeNonTransferableMint" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InterestBearingMintExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "CpiGuardExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "InitializePermanentDelegate" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "TransferHookExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (|
                          M.read (| Value.String "ConfidentialTransferFeeExtension" |)
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "WithdrawExcessLamports" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "MetadataPointerExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "GroupPointerExtension" |) |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ := M.read (| γ |) in
                        M.alloc (| M.read (| Value.String "GroupMemberPointerExtension" |) |)))
                  ]
                |)
              |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    (* PartialEq *)
    Definition eq (τ : 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_tag :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ]
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            let __arg1_tag :=
              M.alloc (|
                M.call_closure (|
                  M.get_function (|
                    "core::intrinsics::discriminant_value",
                    [ Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ]
                  |),
                  [ M.read (| other |) ]
                |)
              |) in
            M.alloc (| BinOp.Pure.eq (M.read (| __self_tag |)) (M.read (| __arg1_tag |)) |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_num_enum_TryFromPrimitive_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    (* TryFromPrimitive *)
    Definition _Primitive : Ty.t := Ty.path "u8".
    
    (* TryFromPrimitive *)
    Definition _Error : Ty.t :=
      Ty.apply
        (Ty.path "num_enum::TryFromPrimitiveError")
        [ Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ].
    
    (* TryFromPrimitive *)
    (* Ty.apply (Ty.path "&") [ Ty.path "str" ] *)
    Definition value_NAME : Value.t := M.run ltac:(M.monadic (Value.String "PodTokenInstruction")).
    
    (* TryFromPrimitive *)
    Definition try_from_primitive (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ number ] =>
        ltac:(M.monadic
          (let number := M.alloc (| number |) in
          M.read (|
            M.match_operator (|
              number,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeMint"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeAccount"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 2 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeMultisig"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 3 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::Transfer"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 4 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::Approve"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 5 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::Revoke"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 6 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::SetAuthority"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 7 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::MintTo"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 8 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::Burn"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 9 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::CloseAccount"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 10 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::FreezeAccount"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 11 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::ThawAccount"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 12 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::TransferChecked"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 13 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::ApproveChecked"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 14 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::MintToChecked"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 15 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::BurnChecked"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 16 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeAccount2"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 17 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::SyncNative"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 18 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeAccount3"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 19 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeMultisig2"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 20 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeMint2"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 21 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::GetAccountDataSize"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 22 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeImmutableOwner"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 23 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::AmountToUiAmount"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 24 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::UiAmountToAmount"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 25 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeMintCloseAuthority"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 26 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::TransferFeeExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 27 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::ConfidentialTransferExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 28 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::DefaultAccountStateExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 29 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::Reallocate"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 30 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::MemoTransferExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 31 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::CreateNativeMint"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 32 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializeNonTransferableMint"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 33 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InterestBearingMintExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 34 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::CpiGuardExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 35 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::InitializePermanentDelegate"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 36 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::TransferHookExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 37 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::ConfidentialTransferFeeExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 38 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::WithdrawExcessLamports"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 39 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::MetadataPointerExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 40 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::GroupPointerExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 41 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_token_2022::pod_instruction::PodTokenInstruction::GroupMemberPointerExtension"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "num_enum::TryFromPrimitiveError")
                                [ Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ],
                              "new",
                              []
                            |),
                            [ M.read (| number |) ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "num_enum::TryFromPrimitive"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Primitive", InstanceField.Ty _Primitive);
          ("Error", InstanceField.Ty _Error);
          ("value_NAME", InstanceField.Constant value_NAME);
          ("try_from_primitive", InstanceField.Method try_from_primitive)
        ].
  End Impl_num_enum_TryFromPrimitive_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_core_convert_TryFrom_u8_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    (* TryFromPrimitive *)
    Definition _Error : Ty.t :=
      Ty.apply
        (Ty.path "num_enum::TryFromPrimitiveError")
        [ Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ].
    
    (* TryFromPrimitive *)
    Definition try_from (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ number ] =>
        ltac:(M.monadic
          (let number := M.alloc (| number |) in
          M.call_closure (|
            M.get_trait_method (|
              "num_enum::TryFromPrimitive",
              Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction",
              [],
              "try_from_primitive",
              []
            |),
            [ M.read (| number |) ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::convert::TryFrom"
        Self
        (* Trait polymorphic types *) [ (* T *) Ty.path "u8" ]
        (* Instance *)
        [ ("Error", InstanceField.Ty _Error); ("try_from", InstanceField.Method try_from) ].
  End Impl_core_convert_TryFrom_u8_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_num_enum_CannotDeriveBothFromPrimitiveAndTryFromPrimitive_for_spl_token_2022_pod_instruction_PodTokenInstruction.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction".
    
    Axiom Implements :
      M.IsTraitInstance
        "num_enum::CannotDeriveBothFromPrimitiveAndTryFromPrimitive"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_num_enum_CannotDeriveBothFromPrimitiveAndTryFromPrimitive_for_spl_token_2022_pod_instruction_PodTokenInstruction.
  
  Module Impl_core_convert_From_spl_token_2022_pod_instruction_PodTokenInstruction_for_u8.
    Definition Self : Ty.t := Ty.path "u8".
    
    (* IntoPrimitive *)
    Definition from (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ enum_value ] =>
        ltac:(M.monadic
          (let enum_value := M.alloc (| enum_value |) in
          M.rust_cast (M.read (| enum_value |))))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::convert::From"
        Self
        (* Trait polymorphic types *)
        [ (* T *) Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ]
        (* Instance *) [ ("from", InstanceField.Method from) ].
  End Impl_core_convert_From_spl_token_2022_pod_instruction_PodTokenInstruction_for_u8.
  
  (*
  fn unpack_pubkey_option(input: &[u8]) -> Result<PodCOption<Pubkey>, ProgramError> {
      match input.split_first() {
          Option::Some((&0, _)) => Ok(PodCOption::none()),
          Option::Some((&1, rest)) => {
              let pk = rest
                  .get(..PUBKEY_BYTES)
                  .and_then(|x| Pubkey::try_from(x).ok())
                  .ok_or(ProgramError::InvalidInstructionData)?;
              Ok(PodCOption::some(pk))
          }
          _ => Err(ProgramError::InvalidInstructionData),
      }
  }
  *)
  Definition unpack_pubkey_option (τ : list Ty.t) (α : list Value.t) : M :=
    match τ, α with
    | [], [ input ] =>
      ltac:(M.monadic
        (let input := M.alloc (| input |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              M.match_operator (|
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                      "split_first",
                      []
                    |),
                    [ M.read (| input |) ]
                  |)
                |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (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 γ1_0 := M.read (| γ1_0 |) in
                      let _ :=
                        M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 0 |) in
                      M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Ok"
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "spl_token_2022::pod::PodCOption")
                                  [ Ty.path "solana_program::pubkey::Pubkey" ],
                                "none",
                                []
                              |),
                              []
                            |)
                          ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (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 γ1_0 := M.read (| γ1_0 |) in
                      let _ :=
                        M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 1 |) in
                      let rest := M.copy (| γ1_1 |) in
                      let pk :=
                        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 "solana_program::pubkey::Pubkey";
                                      Ty.path "solana_program::program_error::ProgramError"
                                    ],
                                  [],
                                  "branch",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::option::Option")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ok_or",
                                      [ Ty.path "solana_program::program_error::ProgramError" ]
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "core::option::Option")
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                            ],
                                          "and_then",
                                          [
                                            Ty.path "solana_program::pubkey::Pubkey";
                                            Ty.function
                                              [
                                                Ty.tuple
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&")
                                                      [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ]
                                                      ]
                                                  ]
                                              ]
                                              (Ty.apply
                                                (Ty.path "core::option::Option")
                                                [ Ty.path "solana_program::pubkey::Pubkey" ])
                                          ]
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                              "get",
                                              [
                                                Ty.apply
                                                  (Ty.path "core::ops::range::RangeTo")
                                                  [ Ty.path "usize" ]
                                              ]
                                            |),
                                            [
                                              M.read (| rest |);
                                              Value.StructRecord
                                                "core::ops::range::RangeTo"
                                                [
                                                  ("end_",
                                                    M.read (|
                                                      M.get_constant (|
                                                        "solana_program::pubkey::PUBKEY_BYTES"
                                                      |)
                                                    |))
                                                ]
                                            ]
                                          |);
                                          M.closure
                                            (fun γ =>
                                              ltac:(M.monadic
                                                match γ with
                                                | [ α0 ] =>
                                                  M.match_operator (|
                                                    M.alloc (| α0 |),
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let x := M.copy (| γ |) in
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "solana_program::pubkey::Pubkey";
                                                                  Ty.path
                                                                    "core::array::TryFromSliceError"
                                                                ],
                                                              "ok",
                                                              []
                                                            |),
                                                            [
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::convert::TryFrom",
                                                                  Ty.path
                                                                    "solana_program::pubkey::Pubkey",
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path "&")
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path "slice")
                                                                          [ Ty.path "u8" ]
                                                                      ]
                                                                  ],
                                                                  "try_from",
                                                                  []
                                                                |),
                                                                [ M.read (| x |) ]
                                                              |)
                                                            ]
                                                          |)))
                                                    ]
                                                  |)
                                                | _ => M.impossible (||)
                                                end))
                                        ]
                                      |);
                                      Value.StructTuple
                                        "solana_program::program_error::ProgramError::InvalidInstructionData"
                                        []
                                    ]
                                  |)
                                ]
                              |)
                            |),
                            [
                              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 "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.path "core::convert::Infallible";
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ]
                                              ],
                                              "from_residual",
                                              []
                                            |),
                                            [ M.read (| residual |) ]
                                          |)
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::ops::control_flow::ControlFlow::Continue",
                                      0
                                    |) in
                                  let val := M.copy (| γ0_0 |) in
                                  val))
                            ]
                          |)
                        |) in
                      M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Ok"
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "spl_token_2022::pod::PodCOption")
                                  [ Ty.path "solana_program::pubkey::Pubkey" ],
                                "some",
                                []
                              |),
                              [ M.read (| pk |) ]
                            |)
                          ]
                      |)));
                  fun γ =>
                    ltac:(M.monadic
                      (M.alloc (|
                        Value.StructTuple
                          "core::result::Result::Err"
                          [
                            Value.StructTuple
                              "solana_program::program_error::ProgramError::InvalidInstructionData"
                              []
                          ]
                      |)))
                ]
              |)
            |)))
        |)))
    | _, _ => M.impossible
    end.
  
  (*
  pub(crate) fn decode_instruction_data_with_coption_pubkey<T: Pod>(
      input_with_type: &[u8],
  ) -> Result<(&T, PodCOption<Pubkey>), ProgramError> {
      let end_of_t = pod_get_packed_len::<T>().saturating_add(1);
      let value = input_with_type
          .get(1..end_of_t)
          .ok_or(ProgramError::InvalidInstructionData)
          .and_then(pod_from_bytes)?;
      let pubkey = unpack_pubkey_option(&input_with_type[end_of_t..])?;
      Ok((value, pubkey))
  }
  *)
  Definition decode_instruction_data_with_coption_pubkey (τ : list Ty.t) (α : list Value.t) : M :=
    match τ, α with
    | [ T ], [ input_with_type ] =>
      ltac:(M.monadic
        (let input_with_type := M.alloc (| input_with_type |) in
        M.catch_return (|
          ltac:(M.monadic
            (M.read (|
              let end_of_t :=
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (| Ty.path "usize", "saturating_add", [] |),
                    [
                      M.call_closure (|
                        M.get_function (| "spl_pod::bytemuck::pod_get_packed_len", [ T ] |),
                        []
                      |);
                      Value.Integer 1
                    ]
                  |)
                |) in
              let value :=
                M.copy (|
                  M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::ops::try_trait::Try",
                          Ty.apply
                            (Ty.path "core::result::Result")
                            [
                              Ty.apply (Ty.path "&") [ T ];
                              Ty.path "solana_program::program_error::ProgramError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              "and_then",
                              [
                                Ty.apply (Ty.path "&") [ T ];
                                Ty.function
                                  [
                                    Ty.apply
                                      (Ty.path "&")
                                      [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                  ]
                                  (Ty.apply
                                    (Ty.path "core::result::Result")
                                    [
                                      Ty.apply (Ty.path "&") [ T ];
                                      Ty.path "solana_program::program_error::ProgramError"
                                    ])
                              ]
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                    ],
                                  "ok_or",
                                  [ Ty.path "solana_program::program_error::ProgramError" ]
                                |),
                                [
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                      "get",
                                      [
                                        Ty.apply
                                          (Ty.path "core::ops::range::Range")
                                          [ Ty.path "usize" ]
                                      ]
                                    |),
                                    [
                                      M.read (| input_with_type |);
                                      Value.StructRecord
                                        "core::ops::range::Range"
                                        [
                                          ("start", Value.Integer 1);
                                          ("end_", M.read (| end_of_t |))
                                        ]
                                    ]
                                  |);
                                  Value.StructTuple
                                    "solana_program::program_error::ProgramError::InvalidInstructionData"
                                    []
                                ]
                              |);
                              M.get_function (| "spl_pod::bytemuck::pod_from_bytes", [ T ] |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply (Ty.path "&") [ T ];
                                              Ty.apply
                                                (Ty.path "spl_token_2022::pod::PodCOption")
                                                [ Ty.path "solana_program::pubkey::Pubkey" ]
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ]
                                      ],
                                      "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 pubkey :=
                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 "spl_token_2022::pod::PodCOption")
                                [ Ty.path "solana_program::pubkey::Pubkey" ];
                              Ty.path "solana_program::program_error::ProgramError"
                            ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (|
                              "spl_token_2022::pod_instruction::unpack_pubkey_option",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::ops::index::Index",
                                  Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                  [
                                    Ty.apply
                                      (Ty.path "core::ops::range::RangeFrom")
                                      [ Ty.path "usize" ]
                                  ],
                                  "index",
                                  []
                                |),
                                [
                                  M.read (| input_with_type |);
                                  Value.StructRecord
                                    "core::ops::range::RangeFrom"
                                    [ ("start", M.read (| end_of_t |)) ]
                                ]
                              |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      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.apply (Ty.path "&") [ T ];
                                              Ty.apply
                                                (Ty.path "spl_token_2022::pod::PodCOption")
                                                [ Ty.path "solana_program::pubkey::Pubkey" ]
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ]
                                      ],
                                      "from_residual",
                                      []
                                    |),
                                    [ M.read (| residual |) ]
                                  |)
                                |)
                              |)
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Continue",
                              0
                            |) in
                          let val := M.copy (| γ0_0 |) in
                          val))
                    ]
                  |)
                |) in
              M.alloc (|
                Value.StructTuple
                  "core::result::Result::Ok"
                  [ Value.Tuple [ M.read (| value |); M.read (| pubkey |) ] ]
              |)
            |)))
        |)))
    | _, _ => M.impossible
    end.
End pod_instruction.
