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

Module extension.
  Module confidential_transfer_fee.
    Module instruction.
      (*
      Enum ConfidentialTransferFeeInstruction
      {
        ty_params := [];
        variants :=
          [
            {
              name := "InitializeConfidentialTransferFeeConfig";
              item := StructTuple [];
              discriminant := None;
            };
            {
              name := "WithdrawWithheldTokensFromMint";
              item := StructTuple [];
              discriminant := None;
            };
            {
              name := "WithdrawWithheldTokensFromAccounts";
              item := StructTuple [];
              discriminant := None;
            };
            {
              name := "HarvestWithheldTokensToMint";
              item := StructTuple [];
              discriminant := None;
            };
            {
              name := "EnableHarvestToMint";
              item := StructTuple [];
              discriminant := None;
            };
            {
              name := "DisableHarvestToMint";
              item := StructTuple [];
              discriminant := None;
            }
          ];
      }
      *)
      
      Module Impl_core_clone_Clone_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction".
        
        (* 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_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
      
      Module Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::Copy"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
      
      Module Impl_core_fmt_Debug_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction".
        
        (* 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 "InitializeConfidentialTransferFeeConfig" |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.read (| γ |) in
                            M.alloc (|
                              M.read (| Value.String "WithdrawWithheldTokensFromMint" |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.read (| γ |) in
                            M.alloc (|
                              M.read (| Value.String "WithdrawWithheldTokensFromAccounts" |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.read (| γ |) in
                            M.alloc (| M.read (| Value.String "HarvestWithheldTokensToMint" |) |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.read (| γ |) in
                            M.alloc (| M.read (| Value.String "EnableHarvestToMint" |) |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.read (| γ |) in
                            M.alloc (| M.read (| Value.String "DisableHarvestToMint" |) |)))
                      ]
                    |)
                  |)
                ]
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
      
      Module Impl_num_enum_TryFromPrimitive_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction".
        
        (* 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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction"
            ].
        
        (* TryFromPrimitive *)
        (* Ty.apply (Ty.path "&") [ Ty.path "str" ] *)
        Definition value_NAME : Value.t :=
          M.run ltac:(M.monadic (Value.String "ConfidentialTransferFeeInstruction")).
        
        (* 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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::InitializeConfidentialTransferFeeConfig"
                                []
                            ]
                        |)));
                    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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::WithdrawWithheldTokensFromMint"
                                []
                            ]
                        |)));
                    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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::WithdrawWithheldTokensFromAccounts"
                                []
                            ]
                        |)));
                    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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::HarvestWithheldTokensToMint"
                                []
                            ]
                        |)));
                    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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::EnableHarvestToMint"
                                []
                            ]
                        |)));
                    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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::DisableHarvestToMint"
                                []
                            ]
                        |)));
                    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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction"
                                    ],
                                  "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_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
      
      Module Impl_core_convert_TryFrom_u8_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction".
        
        (* TryFromPrimitive *)
        Definition _Error : Ty.t :=
          Ty.apply
            (Ty.path "num_enum::TryFromPrimitiveError")
            [
              Ty.path
                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction"
            ].
        
        (* 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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction",
                  [],
                  "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_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
      
      Module Impl_num_enum_CannotDeriveBothFromPrimitiveAndTryFromPrimitive_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction".
        
        Axiom Implements :
          M.IsTraitInstance
            "num_enum::CannotDeriveBothFromPrimitiveAndTryFromPrimitive"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_num_enum_CannotDeriveBothFromPrimitiveAndTryFromPrimitive_for_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction.
      
      Module Impl_core_convert_From_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction_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::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction"
            ]
            (* Instance *) [ ("from", InstanceField.Method from) ].
      End Impl_core_convert_From_spl_token_2022_extension_confidential_transfer_fee_instruction_ConfidentialTransferFeeInstruction_for_u8.
      
      (* StructRecord
        {
          name := "InitializeConfidentialTransferFeeConfigData";
          ty_params := [];
          fields :=
            [
              ("authority", Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey");
              ("withdraw_withheld_authority_elgamal_pubkey",
                Ty.path "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey")
            ];
        } *)
      
      Module Impl_core_clone_Clone_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        (* 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_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      Module Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::Copy"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      Module Impl_core_fmt_Debug_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        (* 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 "InitializeConfidentialTransferFeeConfigData" |);
                  M.read (| Value.String "authority" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData",
                      "authority"
                    |));
                  M.read (| Value.String "withdraw_withheld_authority_elgamal_pubkey" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.alloc (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData",
                        "withdraw_withheld_authority_elgamal_pubkey"
                      |)
                    |))
                ]
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::StructuralPartialEq"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      Module Impl_core_cmp_PartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        (* 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::optional_keys::OptionalNonZeroPubkey",
                    [ Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey" ],
                    "eq",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData",
                      "authority"
                    |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData",
                      "authority"
                    |)
                  ]
                |),
                ltac:(M.monadic
                  (M.call_closure (|
                    M.get_trait_method (|
                      "core::cmp::PartialEq",
                      Ty.path "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey",
                      [ Ty.path "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey"
                      ],
                      "eq",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData",
                        "withdraw_withheld_authority_elgamal_pubkey"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData",
                        "withdraw_withheld_authority_elgamal_pubkey"
                      |)
                    ]
                  |)))
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      Module Impl_bytemuck_pod_Pod_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        Axiom Implements :
          M.IsTraitInstance
            "bytemuck::pod::Pod"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_bytemuck_pod_Pod_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData".
        
        Axiom Implements :
          M.IsTraitInstance
            "bytemuck::zeroable::Zeroable"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_extension_confidential_transfer_fee_instruction_InitializeConfidentialTransferFeeConfigData.
      
      (* StructRecord
        {
          name := "WithdrawWithheldTokensFromMintData";
          ty_params := [];
          fields :=
            [
              ("proof_instruction_offset", Ty.path "i8");
              ("new_decryptable_available_balance",
                Ty.path "solana_zk_token_sdk::zk_token_elgamal::pod::auth_encryption::AeCiphertext")
            ];
        } *)
      
      Module Impl_core_clone_Clone_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        (* 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_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      Module Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::Copy"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      Module Impl_core_fmt_Debug_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        (* 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 "WithdrawWithheldTokensFromMintData" |);
                  M.read (| Value.String "proof_instruction_offset" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData",
                      "proof_instruction_offset"
                    |));
                  M.read (| Value.String "new_decryptable_available_balance" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.alloc (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData",
                        "new_decryptable_available_balance"
                      |)
                    |))
                ]
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::StructuralPartialEq"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      Module Impl_core_cmp_PartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        (* 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::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData",
                      "proof_instruction_offset"
                    |)
                  |))
                  (M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData",
                      "proof_instruction_offset"
                    |)
                  |)),
                ltac:(M.monadic
                  (M.call_closure (|
                    M.get_trait_method (|
                      "core::cmp::PartialEq",
                      Ty.path
                        "solana_zk_token_sdk::zk_token_elgamal::pod::auth_encryption::AeCiphertext",
                      [
                        Ty.path
                          "solana_zk_token_sdk::zk_token_elgamal::pod::auth_encryption::AeCiphertext"
                      ],
                      "eq",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData",
                        "new_decryptable_available_balance"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData",
                        "new_decryptable_available_balance"
                      |)
                    ]
                  |)))
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      Module Impl_bytemuck_pod_Pod_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        Axiom Implements :
          M.IsTraitInstance
            "bytemuck::pod::Pod"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_bytemuck_pod_Pod_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData".
        
        Axiom Implements :
          M.IsTraitInstance
            "bytemuck::zeroable::Zeroable"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromMintData.
      
      (* StructRecord
        {
          name := "WithdrawWithheldTokensFromAccountsData";
          ty_params := [];
          fields :=
            [
              ("num_token_accounts", Ty.path "u8");
              ("proof_instruction_offset", Ty.path "i8");
              ("new_decryptable_available_balance",
                Ty.path "solana_zk_token_sdk::zk_token_elgamal::pod::auth_encryption::AeCiphertext")
            ];
        } *)
      
      Module Impl_core_clone_Clone_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        (* 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.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_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      Module Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::Copy"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_Copy_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      Module Impl_core_fmt_Debug_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        (* 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_field3_finish",
                  []
                |),
                [
                  M.read (| f |);
                  M.read (| Value.String "WithdrawWithheldTokensFromAccountsData" |);
                  M.read (| Value.String "num_token_accounts" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                      "num_token_accounts"
                    |));
                  M.read (| Value.String "proof_instruction_offset" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                      "proof_instruction_offset"
                    |));
                  M.read (| Value.String "new_decryptable_available_balance" |);
                  (* Unsize *)
                  M.pointer_coercion
                    (M.alloc (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                        "new_decryptable_available_balance"
                      |)
                    |))
                ]
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        Axiom Implements :
          M.IsTraitInstance
            "core::marker::StructuralPartialEq"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      Module Impl_core_cmp_PartialEq_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        (* 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 (|
                LogicalOp.and (|
                  BinOp.Pure.eq
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                        "num_token_accounts"
                      |)
                    |))
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                        "num_token_accounts"
                      |)
                    |)),
                  ltac:(M.monadic
                    (BinOp.Pure.eq
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                          "proof_instruction_offset"
                        |)
                      |))
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| other |),
                          "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                          "proof_instruction_offset"
                        |)
                      |))))
                |),
                ltac:(M.monadic
                  (M.call_closure (|
                    M.get_trait_method (|
                      "core::cmp::PartialEq",
                      Ty.path
                        "solana_zk_token_sdk::zk_token_elgamal::pod::auth_encryption::AeCiphertext",
                      [
                        Ty.path
                          "solana_zk_token_sdk::zk_token_elgamal::pod::auth_encryption::AeCiphertext"
                      ],
                      "eq",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                        "new_decryptable_available_balance"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData",
                        "new_decryptable_available_balance"
                      |)
                    ]
                  |)))
              |)))
          | _, _ => 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_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      Module Impl_bytemuck_pod_Pod_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        Axiom Implements :
          M.IsTraitInstance
            "bytemuck::pod::Pod"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_bytemuck_pod_Pod_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
        Definition Self : Ty.t :=
          Ty.path
            "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData".
        
        Axiom Implements :
          M.IsTraitInstance
            "bytemuck::zeroable::Zeroable"
            Self
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_extension_confidential_transfer_fee_instruction_WithdrawWithheldTokensFromAccountsData.
      
      (*
      pub fn initialize_confidential_transfer_fee_config(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          authority: Option<Pubkey>,
          withdraw_withheld_authority_elgamal_pubkey: ElGamalPubkey,
      ) -> Result<Instruction, ProgramError> {
          check_program_account(token_program_id)?;
          let accounts = vec![AccountMeta::new( *mint, false)];
      
          Ok(encode_instruction(
              token_program_id,
              accounts,
              TokenInstruction::ConfidentialTransferFeeExtension,
              ConfidentialTransferFeeInstruction::InitializeConfidentialTransferFeeConfig,
              &InitializeConfidentialTransferFeeConfigData {
                  authority: authority.try_into()?,
                  withdraw_withheld_authority_elgamal_pubkey,
              },
          ))
      }
      *)
      Definition initialize_confidential_transfer_fee_config
          (τ : list Ty.t)
          (α : list Value.t)
          : M :=
        match τ, α with
        | [], [ token_program_id; mint; authority; withdraw_withheld_authority_elgamal_pubkey ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let authority := M.alloc (| authority |) in
            let withdraw_withheld_authority_elgamal_pubkey :=
              M.alloc (| withdraw_withheld_authority_elgamal_pubkey |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [ M.read (| token_program_id |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "solana_program::instruction::Instruction";
                                            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 accounts :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::AccountMeta" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::AccountMeta" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| mint |) |); Value.Bool false ]
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |))
                        ]
                      |)
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.call_closure (|
                          M.get_function (|
                            "spl_token_2022::instruction::encode_instruction",
                            [
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction";
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData"
                            ]
                          |),
                          [
                            M.read (| token_program_id |);
                            M.read (| accounts |);
                            Value.StructTuple
                              "spl_token_2022::instruction::TokenInstruction::ConfidentialTransferFeeExtension"
                              [];
                            Value.StructTuple
                              "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::InitializeConfidentialTransferFeeConfig"
                              [];
                            M.alloc (|
                              Value.StructRecord
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::InitializeConfidentialTransferFeeConfigData"
                                [
                                  ("authority",
                                    M.read (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.path
                                                    "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::convert::TryInto",
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                                  [
                                                    Ty.path
                                                      "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                  ],
                                                  "try_into",
                                                  []
                                                |),
                                                [ M.read (| authority |) ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.path
                                                                "solana_program::instruction::Instruction";
                                                              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))
                                        ]
                                      |)
                                    |));
                                  ("withdraw_withheld_authority_elgamal_pubkey",
                                    M.read (| withdraw_withheld_authority_elgamal_pubkey |))
                                ]
                            |)
                          ]
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn inner_withdraw_withheld_tokens_from_mint(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          destination: &Pubkey,
          new_decryptable_available_balance: &DecryptableBalance,
          authority: &Pubkey,
          multisig_signers: &[&Pubkey],
          proof_data_location: ProofLocation<CiphertextCiphertextEqualityProofData>,
      ) -> Result<Instruction, ProgramError> {
          check_program_account(token_program_id)?;
          let mut accounts = vec![
              AccountMeta::new( *mint, false),
              AccountMeta::new( *destination, false),
          ];
      
          let proof_instruction_offset = match proof_data_location {
              ProofLocation::InstructionOffset(proof_instruction_offset, _) => {
                  accounts.push(AccountMeta::new_readonly(sysvar::instructions::id(), false));
                  proof_instruction_offset.into()
              }
              ProofLocation::ContextStateAccount(context_state_account) => {
                  accounts.push(AccountMeta::new_readonly( *context_state_account, false));
                  0
              }
          };
      
          accounts.push(AccountMeta::new_readonly(
              *authority,
              multisig_signers.is_empty(),
          ));
      
          for multisig_signer in multisig_signers.iter() {
              accounts.push(AccountMeta::new_readonly( **multisig_signer, true));
          }
      
          Ok(encode_instruction(
              token_program_id,
              accounts,
              TokenInstruction::ConfidentialTransferFeeExtension,
              ConfidentialTransferFeeInstruction::WithdrawWithheldTokensFromMint,
              &WithdrawWithheldTokensFromMintData {
                  proof_instruction_offset,
                  new_decryptable_available_balance: *new_decryptable_available_balance,
              },
          ))
      }
      *)
      Definition inner_withdraw_withheld_tokens_from_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              token_program_id;
              mint;
              destination;
              new_decryptable_available_balance;
              authority;
              multisig_signers;
              proof_data_location
            ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let destination := M.alloc (| destination |) in
            let new_decryptable_available_balance :=
              M.alloc (| new_decryptable_available_balance |) in
            let authority := M.alloc (| authority |) in
            let multisig_signers := M.alloc (| multisig_signers |) in
            let proof_data_location := M.alloc (| proof_data_location |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [ M.read (| token_program_id |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "solana_program::instruction::Instruction";
                                            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 accounts :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::AccountMeta" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::AccountMeta" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| mint |) |); Value.Bool false ]
                                        |);
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| destination |) |); Value.Bool false
                                          ]
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |))
                        ]
                      |)
                    |) in
                  let proof_instruction_offset :=
                    M.copy (|
                      M.match_operator (|
                        proof_data_location,
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                  0
                                |) in
                              let γ0_1 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                  1
                                |) in
                              let proof_instruction_offset := M.copy (| γ0_0 |) in
                              let _ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        [
                                          Ty.path "solana_program::instruction::AccountMeta";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "push",
                                      []
                                    |),
                                    [
                                      accounts;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::instruction::AccountMeta",
                                          "new_readonly",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "solana_program::sysvar::instructions::id",
                                              []
                                            |),
                                            []
                                          |);
                                          Value.Bool false
                                        ]
                                      |)
                                    ]
                                  |)
                                |) in
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "core::num::nonzero::NonZeroI8",
                                    [ Ty.path "i8" ],
                                    "into",
                                    []
                                  |),
                                  [ M.read (| proof_instruction_offset |) ]
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "spl_token_2022::proof::ProofLocation::ContextStateAccount",
                                  0
                                |) in
                              let context_state_account := M.copy (| γ0_0 |) in
                              let _ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        [
                                          Ty.path "solana_program::instruction::AccountMeta";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "push",
                                      []
                                    |),
                                    [
                                      accounts;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::instruction::AccountMeta",
                                          "new_readonly",
                                          []
                                        |),
                                        [
                                          M.read (| M.read (| context_state_account |) |);
                                          Value.Bool false
                                        ]
                                      |)
                                    ]
                                  |)
                                |) in
                              M.alloc (| Value.Integer 0 |)))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            [
                              Ty.path "solana_program::instruction::AccountMeta";
                              Ty.path "alloc::alloc::Global"
                            ],
                          "push",
                          []
                        |),
                        [
                          accounts;
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "solana_program::instruction::AccountMeta",
                              "new_readonly",
                              []
                            |),
                            [
                              M.read (| M.read (| authority |) |);
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "is_empty",
                                  []
                                |),
                                [ M.read (| multisig_signers |) ]
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let _ :=
                    M.use
                      (M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "core::slice::iter::Iter")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "iter",
                                  []
                                |),
                                [ M.read (| multisig_signers |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let iter := M.copy (| γ |) in
                              M.loop (|
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              ],
                                            [],
                                            "next",
                                            []
                                          |),
                                          [ iter ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (| M.read (| M.break (||) |) |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let multisig_signer := M.copy (| γ0_0 |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    "push",
                                                    []
                                                  |),
                                                  [
                                                    accounts;
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta",
                                                        "new_readonly",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.read (| M.read (| multisig_signer |) |)
                                                        |);
                                                        Value.Bool true
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (| Value.Tuple [] |)))
                              |)))
                        ]
                      |)) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.call_closure (|
                          M.get_function (|
                            "spl_token_2022::instruction::encode_instruction",
                            [
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction";
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData"
                            ]
                          |),
                          [
                            M.read (| token_program_id |);
                            M.read (| accounts |);
                            Value.StructTuple
                              "spl_token_2022::instruction::TokenInstruction::ConfidentialTransferFeeExtension"
                              [];
                            Value.StructTuple
                              "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::WithdrawWithheldTokensFromMint"
                              [];
                            M.alloc (|
                              Value.StructRecord
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromMintData"
                                [
                                  ("proof_instruction_offset",
                                    M.read (| proof_instruction_offset |));
                                  ("new_decryptable_available_balance",
                                    M.read (| M.read (| new_decryptable_available_balance |) |))
                                ]
                            |)
                          ]
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn withdraw_withheld_tokens_from_mint(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          destination: &Pubkey,
          new_decryptable_available_balance: &DecryptableBalance,
          authority: &Pubkey,
          multisig_signers: &[&Pubkey],
          proof_data_location: ProofLocation<CiphertextCiphertextEqualityProofData>,
      ) -> Result<Vec<Instruction>, ProgramError> {
          let mut instructions = vec![inner_withdraw_withheld_tokens_from_mint(
              token_program_id,
              mint,
              destination,
              new_decryptable_available_balance,
              authority,
              multisig_signers,
              proof_data_location,
          )?];
      
          if let ProofLocation::InstructionOffset(proof_instruction_offset, proof_data) =
              proof_data_location
          {
              // This constructor appends the proof instruction right after the
              // `WithdrawWithheldTokensFromMint` instruction. This means that the proof
              // instruction offset must be always be 1. To use an arbitrary proof
              // instruction offset, use the
              // `inner_withdraw_withheld_tokens_from_mint` constructor.
              let proof_instruction_offset: i8 = proof_instruction_offset.into();
              if proof_instruction_offset != 1 {
                  return Err(TokenError::InvalidProofInstructionOffset.into());
              }
              instructions.push(verify_ciphertext_ciphertext_equality(None, proof_data));
          };
      
          Ok(instructions)
      }
      *)
      Definition withdraw_withheld_tokens_from_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              token_program_id;
              mint;
              destination;
              new_decryptable_available_balance;
              authority;
              multisig_signers;
              proof_data_location
            ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let destination := M.alloc (| destination |) in
            let new_decryptable_available_balance :=
              M.alloc (| new_decryptable_available_balance |) in
            let authority := M.alloc (| authority |) in
            let multisig_signers := M.alloc (| multisig_signers |) in
            let proof_data_location := M.alloc (| proof_data_location |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let instructions :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::Instruction" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::Instruction" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.read (|
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::Try",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path
                                                        "solana_program::instruction::Instruction";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_function (|
                                                      "spl_token_2022::extension::confidential_transfer_fee::instruction::inner_withdraw_withheld_tokens_from_mint",
                                                      []
                                                    |),
                                                    [
                                                      M.read (| token_program_id |);
                                                      M.read (| mint |);
                                                      M.read (| destination |);
                                                      M.read (|
                                                        new_decryptable_available_balance
                                                      |);
                                                      M.read (| authority |);
                                                      M.read (| multisig_signers |);
                                                      M.read (| proof_data_location |)
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "alloc::vec::Vec")
                                                                    [
                                                                      Ty.path
                                                                        "solana_program::instruction::Instruction";
                                                                      Ty.path "alloc::alloc::Global"
                                                                    ];
                                                                  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 _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := proof_data_location in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                0
                              |) in
                            let γ0_1 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                1
                              |) in
                            let proof_instruction_offset := M.copy (| γ0_0 |) in
                            let proof_data := M.copy (| γ0_1 |) in
                            let proof_instruction_offset :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "core::num::nonzero::NonZeroI8",
                                    [ Ty.path "i8" ],
                                    "into",
                                    []
                                  |),
                                  [ M.read (| proof_instruction_offset |) ]
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            BinOp.Pure.ne
                                              (M.read (| proof_instruction_offset |))
                                              (Value.Integer 1)
                                          |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              Value.StructTuple
                                                "core::result::Result::Err"
                                                [
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::convert::Into",
                                                      Ty.path "spl_token_2022::error::TokenError",
                                                      [
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                      "into",
                                                      []
                                                    |),
                                                    [
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::InvalidProofInstructionOffset"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      [
                                        Ty.path "solana_program::instruction::Instruction";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    instructions;
                                    M.call_closure (|
                                      M.get_function (|
                                        "solana_zk_token_sdk::zk_token_proof_instruction::verify_ciphertext_ciphertext_equality",
                                        []
                                      |),
                                      [
                                        Value.StructTuple "core::option::Option::None" [];
                                        M.read (| proof_data |)
                                      ]
                                    |)
                                  ]
                                |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple "core::result::Result::Ok" [ M.read (| instructions |) ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn inner_withdraw_withheld_tokens_from_accounts(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          destination: &Pubkey,
          new_decryptable_available_balance: &DecryptableBalance,
          authority: &Pubkey,
          multisig_signers: &[&Pubkey],
          sources: &[&Pubkey],
          proof_data_location: ProofLocation<CiphertextCiphertextEqualityProofData>,
      ) -> Result<Instruction, ProgramError> {
          check_program_account(token_program_id)?;
          let num_token_accounts =
              u8::try_from(sources.len()).map_err(|_| ProgramError::InvalidInstructionData)?;
          let mut accounts = vec![
              AccountMeta::new( *mint, false),
              AccountMeta::new( *destination, false),
          ];
      
          let proof_instruction_offset = match proof_data_location {
              ProofLocation::InstructionOffset(proof_instruction_offset, _) => {
                  accounts.push(AccountMeta::new_readonly(sysvar::instructions::id(), false));
                  proof_instruction_offset.into()
              }
              ProofLocation::ContextStateAccount(context_state_account) => {
                  accounts.push(AccountMeta::new_readonly( *context_state_account, false));
                  0
              }
          };
      
          accounts.push(AccountMeta::new_readonly(
              *authority,
              multisig_signers.is_empty(),
          ));
      
          for multisig_signer in multisig_signers.iter() {
              accounts.push(AccountMeta::new_readonly( **multisig_signer, true));
          }
      
          for source in sources.iter() {
              accounts.push(AccountMeta::new( **source, false));
          }
      
          Ok(encode_instruction(
              token_program_id,
              accounts,
              TokenInstruction::ConfidentialTransferFeeExtension,
              ConfidentialTransferFeeInstruction::WithdrawWithheldTokensFromAccounts,
              &WithdrawWithheldTokensFromAccountsData {
                  proof_instruction_offset,
                  num_token_accounts,
                  new_decryptable_available_balance: *new_decryptable_available_balance,
              },
          ))
      }
      *)
      Definition inner_withdraw_withheld_tokens_from_accounts
          (τ : list Ty.t)
          (α : list Value.t)
          : M :=
        match τ, α with
        | [],
            [
              token_program_id;
              mint;
              destination;
              new_decryptable_available_balance;
              authority;
              multisig_signers;
              sources;
              proof_data_location
            ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let destination := M.alloc (| destination |) in
            let new_decryptable_available_balance :=
              M.alloc (| new_decryptable_available_balance |) in
            let authority := M.alloc (| authority |) in
            let multisig_signers := M.alloc (| multisig_signers |) in
            let sources := M.alloc (| sources |) in
            let proof_data_location := M.alloc (| proof_data_location |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [ M.read (| token_program_id |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "solana_program::instruction::Instruction";
                                            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 num_token_accounts :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path "u8";
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::result::Result")
                                    [ Ty.path "u8"; Ty.path "core::num::error::TryFromIntError" ],
                                  "map_err",
                                  [
                                    Ty.path "solana_program::program_error::ProgramError";
                                    Ty.function
                                      [ Ty.tuple [ Ty.path "core::num::error::TryFromIntError" ] ]
                                      (Ty.path "solana_program::program_error::ProgramError")
                                  ]
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::convert::TryFrom",
                                      Ty.path "u8",
                                      [ Ty.path "usize" ],
                                      "try_from",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "slice")
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                [ Ty.path "solana_program::pubkey::Pubkey" ]
                                            ],
                                          "len",
                                          []
                                        |),
                                        [ M.read (| sources |) ]
                                      |)
                                    ]
                                  |);
                                  M.closure
                                    (fun γ =>
                                      ltac:(M.monadic
                                        match γ with
                                        | [ α0 ] =>
                                          M.match_operator (|
                                            M.alloc (| α0 |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (Value.StructTuple
                                                    "solana_program::program_error::ProgramError::InvalidInstructionData"
                                                    []))
                                            ]
                                          |)
                                        | _ => M.impossible (||)
                                        end))
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "solana_program::instruction::Instruction";
                                              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 accounts :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::AccountMeta" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::AccountMeta" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| mint |) |); Value.Bool false ]
                                        |);
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| destination |) |); Value.Bool false
                                          ]
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |))
                        ]
                      |)
                    |) in
                  let proof_instruction_offset :=
                    M.copy (|
                      M.match_operator (|
                        proof_data_location,
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                  0
                                |) in
                              let γ0_1 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                  1
                                |) in
                              let proof_instruction_offset := M.copy (| γ0_0 |) in
                              let _ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        [
                                          Ty.path "solana_program::instruction::AccountMeta";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "push",
                                      []
                                    |),
                                    [
                                      accounts;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::instruction::AccountMeta",
                                          "new_readonly",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "solana_program::sysvar::instructions::id",
                                              []
                                            |),
                                            []
                                          |);
                                          Value.Bool false
                                        ]
                                      |)
                                    ]
                                  |)
                                |) in
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "core::num::nonzero::NonZeroI8",
                                    [ Ty.path "i8" ],
                                    "into",
                                    []
                                  |),
                                  [ M.read (| proof_instruction_offset |) ]
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "spl_token_2022::proof::ProofLocation::ContextStateAccount",
                                  0
                                |) in
                              let context_state_account := M.copy (| γ0_0 |) in
                              let _ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "alloc::vec::Vec")
                                        [
                                          Ty.path "solana_program::instruction::AccountMeta";
                                          Ty.path "alloc::alloc::Global"
                                        ],
                                      "push",
                                      []
                                    |),
                                    [
                                      accounts;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::instruction::AccountMeta",
                                          "new_readonly",
                                          []
                                        |),
                                        [
                                          M.read (| M.read (| context_state_account |) |);
                                          Value.Bool false
                                        ]
                                      |)
                                    ]
                                  |)
                                |) in
                              M.alloc (| Value.Integer 0 |)))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "alloc::vec::Vec")
                            [
                              Ty.path "solana_program::instruction::AccountMeta";
                              Ty.path "alloc::alloc::Global"
                            ],
                          "push",
                          []
                        |),
                        [
                          accounts;
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "solana_program::instruction::AccountMeta",
                              "new_readonly",
                              []
                            |),
                            [
                              M.read (| M.read (| authority |) |);
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "is_empty",
                                  []
                                |),
                                [ M.read (| multisig_signers |) ]
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let _ :=
                    M.use
                      (M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "core::slice::iter::Iter")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "iter",
                                  []
                                |),
                                [ M.read (| multisig_signers |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let iter := M.copy (| γ |) in
                              M.loop (|
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              ],
                                            [],
                                            "next",
                                            []
                                          |),
                                          [ iter ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (| M.read (| M.break (||) |) |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let multisig_signer := M.copy (| γ0_0 |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    "push",
                                                    []
                                                  |),
                                                  [
                                                    accounts;
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta",
                                                        "new_readonly",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.read (| M.read (| multisig_signer |) |)
                                                        |);
                                                        Value.Bool true
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (| Value.Tuple [] |)))
                              |)))
                        ]
                      |)) in
                  let _ :=
                    M.use
                      (M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "core::slice::iter::Iter")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "iter",
                                  []
                                |),
                                [ M.read (| sources |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let iter := M.copy (| γ |) in
                              M.loop (|
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              ],
                                            [],
                                            "next",
                                            []
                                          |),
                                          [ iter ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (| M.read (| M.break (||) |) |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let source := M.copy (| γ0_0 |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    "push",
                                                    []
                                                  |),
                                                  [
                                                    accounts;
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta",
                                                        "new",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.read (| M.read (| source |) |)
                                                        |);
                                                        Value.Bool false
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (| Value.Tuple [] |)))
                              |)))
                        ]
                      |)) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.call_closure (|
                          M.get_function (|
                            "spl_token_2022::instruction::encode_instruction",
                            [
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction";
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData"
                            ]
                          |),
                          [
                            M.read (| token_program_id |);
                            M.read (| accounts |);
                            Value.StructTuple
                              "spl_token_2022::instruction::TokenInstruction::ConfidentialTransferFeeExtension"
                              [];
                            Value.StructTuple
                              "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::WithdrawWithheldTokensFromAccounts"
                              [];
                            M.alloc (|
                              Value.StructRecord
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::WithdrawWithheldTokensFromAccountsData"
                                [
                                  ("proof_instruction_offset",
                                    M.read (| proof_instruction_offset |));
                                  ("num_token_accounts", M.read (| num_token_accounts |));
                                  ("new_decryptable_available_balance",
                                    M.read (| M.read (| new_decryptable_available_balance |) |))
                                ]
                            |)
                          ]
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn withdraw_withheld_tokens_from_accounts(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          destination: &Pubkey,
          new_decryptable_available_balance: &DecryptableBalance,
          authority: &Pubkey,
          multisig_signers: &[&Pubkey],
          sources: &[&Pubkey],
          proof_data_location: ProofLocation<CiphertextCiphertextEqualityProofData>,
      ) -> Result<Vec<Instruction>, ProgramError> {
          let mut instructions = vec![inner_withdraw_withheld_tokens_from_accounts(
              token_program_id,
              mint,
              destination,
              new_decryptable_available_balance,
              authority,
              multisig_signers,
              sources,
              proof_data_location,
          )?];
      
          if let ProofLocation::InstructionOffset(proof_instruction_offset, proof_data) =
              proof_data_location
          {
              // This constructor appends the proof instruction right after the
              // `WithdrawWithheldTokensFromAccounts` instruction. This means that the proof
              // instruction offset must always be 1. To use an arbitrary proof
              // instruction offset, use the
              // `inner_withdraw_withheld_tokens_from_accounts` constructor.
              let proof_instruction_offset: i8 = proof_instruction_offset.into();
              if proof_instruction_offset != 1 {
                  return Err(TokenError::InvalidProofInstructionOffset.into());
              }
              instructions.push(verify_ciphertext_ciphertext_equality(None, proof_data));
          };
      
          Ok(instructions)
      }
      *)
      Definition withdraw_withheld_tokens_from_accounts (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              token_program_id;
              mint;
              destination;
              new_decryptable_available_balance;
              authority;
              multisig_signers;
              sources;
              proof_data_location
            ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let destination := M.alloc (| destination |) in
            let new_decryptable_available_balance :=
              M.alloc (| new_decryptable_available_balance |) in
            let authority := M.alloc (| authority |) in
            let multisig_signers := M.alloc (| multisig_signers |) in
            let sources := M.alloc (| sources |) in
            let proof_data_location := M.alloc (| proof_data_location |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let instructions :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::Instruction" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::Instruction" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.read (|
                                          M.match_operator (|
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::Try",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path
                                                        "solana_program::instruction::Instruction";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_function (|
                                                      "spl_token_2022::extension::confidential_transfer_fee::instruction::inner_withdraw_withheld_tokens_from_accounts",
                                                      []
                                                    |),
                                                    [
                                                      M.read (| token_program_id |);
                                                      M.read (| mint |);
                                                      M.read (| destination |);
                                                      M.read (|
                                                        new_decryptable_available_balance
                                                      |);
                                                      M.read (| authority |);
                                                      M.read (| multisig_signers |);
                                                      M.read (| sources |);
                                                      M.read (| proof_data_location |)
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "alloc::vec::Vec")
                                                                    [
                                                                      Ty.path
                                                                        "solana_program::instruction::Instruction";
                                                                      Ty.path "alloc::alloc::Global"
                                                                    ];
                                                                  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 _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := proof_data_location in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                0
                              |) in
                            let γ0_1 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "spl_token_2022::proof::ProofLocation::InstructionOffset",
                                1
                              |) in
                            let proof_instruction_offset := M.copy (| γ0_0 |) in
                            let proof_data := M.copy (| γ0_1 |) in
                            let proof_instruction_offset :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "core::num::nonzero::NonZeroI8",
                                    [ Ty.path "i8" ],
                                    "into",
                                    []
                                  |),
                                  [ M.read (| proof_instruction_offset |) ]
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            BinOp.Pure.ne
                                              (M.read (| proof_instruction_offset |))
                                              (Value.Integer 1)
                                          |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              Value.StructTuple
                                                "core::result::Result::Err"
                                                [
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::convert::Into",
                                                      Ty.path "spl_token_2022::error::TokenError",
                                                      [
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                      "into",
                                                      []
                                                    |),
                                                    [
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::InvalidProofInstructionOffset"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      [
                                        Ty.path "solana_program::instruction::Instruction";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    "push",
                                    []
                                  |),
                                  [
                                    instructions;
                                    M.call_closure (|
                                      M.get_function (|
                                        "solana_zk_token_sdk::zk_token_proof_instruction::verify_ciphertext_ciphertext_equality",
                                        []
                                      |),
                                      [
                                        Value.StructTuple "core::option::Option::None" [];
                                        M.read (| proof_data |)
                                      ]
                                    |)
                                  ]
                                |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple "core::result::Result::Ok" [ M.read (| instructions |) ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn harvest_withheld_tokens_to_mint(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          sources: &[&Pubkey],
      ) -> Result<Instruction, ProgramError> {
          check_program_account(token_program_id)?;
          let mut accounts = vec![AccountMeta::new( *mint, false)];
      
          for source in sources.iter() {
              accounts.push(AccountMeta::new( **source, false));
          }
      
          Ok(encode_instruction(
              token_program_id,
              accounts,
              TokenInstruction::ConfidentialTransferFeeExtension,
              ConfidentialTransferFeeInstruction::HarvestWithheldTokensToMint,
              &(),
          ))
      }
      *)
      Definition harvest_withheld_tokens_to_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ token_program_id; mint; sources ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let sources := M.alloc (| sources |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [ M.read (| token_program_id |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "solana_program::instruction::Instruction";
                                            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 accounts :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::AccountMeta" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::AccountMeta" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| mint |) |); Value.Bool false ]
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.use
                      (M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "core::slice::iter::Iter")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "iter",
                                  []
                                |),
                                [ M.read (| sources |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let iter := M.copy (| γ |) in
                              M.loop (|
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              ],
                                            [],
                                            "next",
                                            []
                                          |),
                                          [ iter ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (| M.read (| M.break (||) |) |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let source := M.copy (| γ0_0 |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    "push",
                                                    []
                                                  |),
                                                  [
                                                    accounts;
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta",
                                                        "new",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.read (| M.read (| source |) |)
                                                        |);
                                                        Value.Bool false
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (| Value.Tuple [] |)))
                              |)))
                        ]
                      |)) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.call_closure (|
                          M.get_function (|
                            "spl_token_2022::instruction::encode_instruction",
                            [
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction";
                              Ty.tuple []
                            ]
                          |),
                          [
                            M.read (| token_program_id |);
                            M.read (| accounts |);
                            Value.StructTuple
                              "spl_token_2022::instruction::TokenInstruction::ConfidentialTransferFeeExtension"
                              [];
                            Value.StructTuple
                              "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::HarvestWithheldTokensToMint"
                              [];
                            M.alloc (| Value.Tuple [] |)
                          ]
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn enable_harvest_to_mint(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          authority: &Pubkey,
          multisig_signers: &[&Pubkey],
      ) -> Result<Instruction, ProgramError> {
          check_program_account(token_program_id)?;
          let mut accounts = vec![
              AccountMeta::new( *mint, false),
              AccountMeta::new_readonly( *authority, multisig_signers.is_empty()),
          ];
      
          for multisig_signer in multisig_signers.iter() {
              accounts.push(AccountMeta::new_readonly( **multisig_signer, true));
          }
      
          Ok(encode_instruction(
              token_program_id,
              accounts,
              TokenInstruction::ConfidentialTransferFeeExtension,
              ConfidentialTransferFeeInstruction::EnableHarvestToMint,
              &(),
          ))
      }
      *)
      Definition enable_harvest_to_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ token_program_id; mint; authority; multisig_signers ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let authority := M.alloc (| authority |) in
            let multisig_signers := M.alloc (| multisig_signers |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [ M.read (| token_program_id |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "solana_program::instruction::Instruction";
                                            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 accounts :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::AccountMeta" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::AccountMeta" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| mint |) |); Value.Bool false ]
                                        |);
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new_readonly",
                                            []
                                          |),
                                          [
                                            M.read (| M.read (| authority |) |);
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "slice")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&")
                                                      [ Ty.path "solana_program::pubkey::Pubkey" ]
                                                  ],
                                                "is_empty",
                                                []
                                              |),
                                              [ M.read (| multisig_signers |) ]
                                            |)
                                          ]
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.use
                      (M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "core::slice::iter::Iter")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "iter",
                                  []
                                |),
                                [ M.read (| multisig_signers |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let iter := M.copy (| γ |) in
                              M.loop (|
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              ],
                                            [],
                                            "next",
                                            []
                                          |),
                                          [ iter ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (| M.read (| M.break (||) |) |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let multisig_signer := M.copy (| γ0_0 |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    "push",
                                                    []
                                                  |),
                                                  [
                                                    accounts;
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta",
                                                        "new_readonly",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.read (| M.read (| multisig_signer |) |)
                                                        |);
                                                        Value.Bool true
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (| Value.Tuple [] |)))
                              |)))
                        ]
                      |)) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.call_closure (|
                          M.get_function (|
                            "spl_token_2022::instruction::encode_instruction",
                            [
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction";
                              Ty.tuple []
                            ]
                          |),
                          [
                            M.read (| token_program_id |);
                            M.read (| accounts |);
                            Value.StructTuple
                              "spl_token_2022::instruction::TokenInstruction::ConfidentialTransferFeeExtension"
                              [];
                            Value.StructTuple
                              "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::EnableHarvestToMint"
                              [];
                            M.alloc (| Value.Tuple [] |)
                          ]
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn disable_harvest_to_mint(
          token_program_id: &Pubkey,
          mint: &Pubkey,
          authority: &Pubkey,
          multisig_signers: &[&Pubkey],
      ) -> Result<Instruction, ProgramError> {
          check_program_account(token_program_id)?;
          let mut accounts = vec![
              AccountMeta::new( *mint, false),
              AccountMeta::new_readonly( *authority, multisig_signers.is_empty()),
          ];
      
          for multisig_signer in multisig_signers.iter() {
              accounts.push(AccountMeta::new_readonly( **multisig_signer, true));
          }
      
          Ok(encode_instruction(
              token_program_id,
              accounts,
              TokenInstruction::ConfidentialTransferFeeExtension,
              ConfidentialTransferFeeInstruction::DisableHarvestToMint,
              &(),
          ))
      }
      *)
      Definition disable_harvest_to_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ token_program_id; mint; authority; multisig_signers ] =>
          ltac:(M.monadic
            (let token_program_id := M.alloc (| token_program_id |) in
            let mint := M.alloc (| mint |) in
            let authority := M.alloc (| authority |) in
            let multisig_signers := M.alloc (| multisig_signers |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [ M.read (| token_program_id |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "solana_program::instruction::Instruction";
                                            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 accounts :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::instruction::AccountMeta" ],
                          "into_vec",
                          [ Ty.path "alloc::alloc::Global" ]
                        |),
                        [
                          (* Unsize *)
                          M.pointer_coercion
                            (M.read (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "alloc::boxed::Box")
                                    [
                                      Ty.apply
                                        (Ty.path "array")
                                        [ Ty.path "solana_program::instruction::AccountMeta" ];
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  "new",
                                  []
                                |),
                                [
                                  M.alloc (|
                                    Value.Array
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new",
                                            []
                                          |),
                                          [ M.read (| M.read (| mint |) |); Value.Bool false ]
                                        |);
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::instruction::AccountMeta",
                                            "new_readonly",
                                            []
                                          |),
                                          [
                                            M.read (| M.read (| authority |) |);
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "slice")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&")
                                                      [ Ty.path "solana_program::pubkey::Pubkey" ]
                                                  ],
                                                "is_empty",
                                                []
                                              |),
                                              [ M.read (| multisig_signers |) ]
                                            |)
                                          ]
                                        |)
                                      ]
                                  |)
                                ]
                              |)
                            |))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.use
                      (M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::collect::IntoIterator",
                              Ty.apply
                                (Ty.path "core::slice::iter::Iter")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                ],
                              [],
                              "into_iter",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "slice")
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                  "iter",
                                  []
                                |),
                                [ M.read (| multisig_signers |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let iter := M.copy (| γ |) in
                              M.loop (|
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::iterator::Iterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [
                                                Ty.apply
                                                  (Ty.path "&")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              ],
                                            [],
                                            "next",
                                            []
                                          |),
                                          [ iter ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (| M.read (| M.break (||) |) |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let multisig_signer := M.copy (| γ0_0 |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    "push",
                                                    []
                                                  |),
                                                  [
                                                    accounts;
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.path
                                                          "solana_program::instruction::AccountMeta",
                                                        "new_readonly",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.read (| M.read (| multisig_signer |) |)
                                                        |);
                                                        Value.Bool true
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (| Value.Tuple [] |)))
                              |)))
                        ]
                      |)) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.call_closure (|
                          M.get_function (|
                            "spl_token_2022::instruction::encode_instruction",
                            [
                              Ty.path
                                "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction";
                              Ty.tuple []
                            ]
                          |),
                          [
                            M.read (| token_program_id |);
                            M.read (| accounts |);
                            Value.StructTuple
                              "spl_token_2022::instruction::TokenInstruction::ConfidentialTransferFeeExtension"
                              [];
                            Value.StructTuple
                              "spl_token_2022::extension::confidential_transfer_fee::instruction::ConfidentialTransferFeeInstruction::DisableHarvestToMint"
                              [];
                            M.alloc (| Value.Tuple [] |)
                          ]
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
    End instruction.
  End confidential_transfer_fee.
End extension.
