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

Module extension.
  Module confidential_transfer.
    Module processor.
      (*
      fn process_initialize_mint(
          accounts: &[AccountInfo],
          authority: &OptionalNonZeroPubkey,
          auto_approve_new_account: PodBool,
          auditor_encryption_pubkey: &OptionalNonZeroElGamalPubkey,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let mint_info = next_account_info(account_info_iter)?;
      
          check_program_account(mint_info.owner)?;
          let mint_data = &mut mint_info.data.borrow_mut();
          let mut mint = PodStateWithExtensionsMut::<PodMint>::unpack_uninitialized(mint_data)?;
          let confidential_transfer_mint = mint.init_extension::<ConfidentialTransferMint>(true)?;
      
          confidential_transfer_mint.authority = *authority;
          confidential_transfer_mint.auto_approve_new_accounts = auto_approve_new_account;
          confidential_transfer_mint.auditor_elgamal_pubkey = *auditor_encryption_pubkey;
      
          Ok(())
      }
      *)
      Definition process_initialize_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ accounts; authority; auto_approve_new_account; auditor_encryption_pubkey ] =>
          ltac:(M.monadic
            (let accounts := M.alloc (| accounts |) in
            let authority := M.alloc (| authority |) in
            let auto_approve_new_account := M.alloc (| auto_approve_new_account |) in
            let auditor_encryption_pubkey := M.alloc (| auditor_encryption_pubkey |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| mint_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack_uninitialized",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| mint_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 confidential_transfer_mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "init_extension",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                  ]
                                |),
                                [ mint; Value.Bool true ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              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.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_mint |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                        "authority"
                      |),
                      M.read (| M.read (| authority |) |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_mint |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                        "auto_approve_new_accounts"
                      |),
                      M.read (| auto_approve_new_account |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_mint |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                        "auditor_elgamal_pubkey"
                      |),
                      M.read (| M.read (| auditor_encryption_pubkey |) |)
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_update_mint(
          accounts: &[AccountInfo],
          auto_approve_new_account: PodBool,
          auditor_encryption_pubkey: &OptionalNonZeroElGamalPubkey,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let mint_info = next_account_info(account_info_iter)?;
          let authority_info = next_account_info(account_info_iter)?;
      
          check_program_account(mint_info.owner)?;
          let mint_data = &mut mint_info.data.borrow_mut();
          let mut mint = PodStateWithExtensionsMut::<PodMint>::unpack(mint_data)?;
          let confidential_transfer_mint = mint.get_extension_mut::<ConfidentialTransferMint>()?;
          let maybe_confidential_transfer_mint_authority: Option<Pubkey> =
              confidential_transfer_mint.authority.into();
          let confidential_transfer_mint_authority =
              maybe_confidential_transfer_mint_authority.ok_or(TokenError::NoAuthorityExists)?;
      
          if !authority_info.is_signer {
              return Err(ProgramError::MissingRequiredSignature);
          }
      
          if confidential_transfer_mint_authority != *authority_info.key {
              return Err(TokenError::OwnerMismatch.into());
          }
      
          confidential_transfer_mint.auto_approve_new_accounts = auto_approve_new_account;
          confidential_transfer_mint.auditor_elgamal_pubkey = *auditor_encryption_pubkey;
          Ok(())
      }
      *)
      Definition process_update_mint (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ accounts; auto_approve_new_account; auditor_encryption_pubkey ] =>
          ltac:(M.monadic
            (let accounts := M.alloc (| accounts |) in
            let auto_approve_new_account := M.alloc (| auto_approve_new_account |) in
            let auditor_encryption_pubkey := M.alloc (| auditor_encryption_pubkey |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| mint_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| mint_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 confidential_transfer_mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                  ]
                                |),
                                [ mint ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 maybe_confidential_transfer_mint_authority :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey",
                          [
                            Ty.apply
                              (Ty.path "core::option::Option")
                              [ Ty.path "solana_program::pubkey::Pubkey" ]
                          ],
                          "into",
                          []
                        |),
                        [
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| confidential_transfer_mint |),
                              "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                              "authority"
                            |)
                          |)
                        ]
                      |)
                    |) in
                  let confidential_transfer_mint_authority :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path "solana_program::pubkey::Pubkey";
                                  Ty.path "spl_token_2022::error::TokenError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                  "ok_or",
                                  [ Ty.path "spl_token_2022::error::TokenError" ]
                                |),
                                [
                                  M.read (| maybe_confidential_transfer_mint_authority |);
                                  Value.StructTuple
                                    "spl_token_2022::error::TokenError::NoAuthorityExists"
                                    []
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "spl_token_2022::error::TokenError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  UnOp.Pure.not
                                    (M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| authority_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "is_signer"
                                      |)
                                    |))
                                |)) 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"
                                      [
                                        Value.StructTuple
                                          "solana_program::program_error::ProgramError::MissingRequiredSignature"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      confidential_transfer_mint_authority;
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| authority_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::OwnerMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_mint |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                        "auto_approve_new_accounts"
                      |),
                      M.read (| auto_approve_new_account |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_mint |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                        "auditor_elgamal_pubkey"
                      |),
                      M.read (| M.read (| auditor_encryption_pubkey |) |)
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_configure_account(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          decryptable_zero_balance: &DecryptableBalance,
          maximum_pending_balance_credit_counter: &PodU64,
          proof_instruction_offset: i64,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let mint_info = next_account_info(account_info_iter)?;
      
          // zero-knowledge proof certifies that the supplied ElGamal public key is valid
          let proof_context =
              verify_configure_account_proof(account_info_iter, proof_instruction_offset)?;
      
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          if token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          check_program_account(mint_info.owner)?;
          let mint_data = &mut mint_info.data.borrow();
          let mint = PodStateWithExtensions::<PodMint>::unpack(mint_data)?;
          let confidential_transfer_mint = mint.get_extension::<ConfidentialTransferMint>()?;
      
          // Note: The caller is expected to use the `Reallocate` instruction to ensure
          // there is sufficient room in their token account for the new
          // `ConfidentialTransferAccount` extension
          let confidential_transfer_account =
              token_account.init_extension::<ConfidentialTransferAccount>(false)?;
          confidential_transfer_account.approved = confidential_transfer_mint.auto_approve_new_accounts;
          confidential_transfer_account.elgamal_pubkey = proof_context.pubkey;
          confidential_transfer_account.maximum_pending_balance_credit_counter =
              *maximum_pending_balance_credit_counter;
      
          // The all-zero ciphertext [0; 64] is a valid encryption of zero
          confidential_transfer_account.pending_balance_lo = EncryptedBalance::zeroed();
          confidential_transfer_account.pending_balance_hi = EncryptedBalance::zeroed();
          confidential_transfer_account.available_balance = EncryptedBalance::zeroed();
      
          confidential_transfer_account.decryptable_available_balance = *decryptable_zero_balance;
          confidential_transfer_account.allow_confidential_credits = true.into();
          confidential_transfer_account.pending_balance_credit_counter = 0.into();
          confidential_transfer_account.expected_pending_balance_credit_counter = 0.into();
          confidential_transfer_account.actual_pending_balance_credit_counter = 0.into();
          confidential_transfer_account.allow_non_confidential_credits = true.into();
      
          // if the mint is extended for fees, then initialize account for confidential
          // transfer fees
          if mint.get_extension::<TransferFeeConfig>().is_ok() {
              let confidential_transfer_fee_amount =
                  token_account.init_extension::<ConfidentialTransferFeeAmount>(false)?;
              confidential_transfer_fee_amount.withheld_amount = EncryptedWithheldAmount::zeroed();
          }
      
          Ok(())
      }
      *)
      Definition process_configure_account (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              program_id;
              accounts;
              decryptable_zero_balance;
              maximum_pending_balance_credit_counter;
              proof_instruction_offset
            ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let decryptable_zero_balance := M.alloc (| decryptable_zero_balance |) in
            let maximum_pending_balance_credit_counter :=
              M.alloc (| maximum_pending_balance_credit_counter |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 proof_context :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path
                                    "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_token_2022::extension::confidential_transfer::verify_proof::verify_configure_account_proof",
                                  []
                                |),
                                [
                                  M.read (| account_info_iter |);
                                  M.read (| proof_instruction_offset |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "as_slice",
                                    []
                                  |),
                                  [ M.read (| account_info_iter |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 (|
                        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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| mint_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::Deref",
                                        Ty.apply
                                          (Ty.path "core::cell::Ref")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref",
                                        []
                                      |),
                                      [ M.read (| mint_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 confidential_transfer_mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "get_extension",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                  ]
                                |),
                                [ mint ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "init_extension",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account; Value.Bool false ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "approved"
                      |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| confidential_transfer_mint |),
                          "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                          "auto_approve_new_accounts"
                        |)
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "elgamal_pubkey"
                      |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          proof_context,
                          "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext",
                          "pubkey"
                        |)
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "maximum_pending_balance_credit_counter"
                      |),
                      M.read (| M.read (| maximum_pending_balance_credit_counter |) |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "pending_balance_lo"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "bytemuck::zeroable::Zeroable",
                          Ty.path
                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                          [],
                          "zeroed",
                          []
                        |),
                        []
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "pending_balance_hi"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "bytemuck::zeroable::Zeroable",
                          Ty.path
                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                          [],
                          "zeroed",
                          []
                        |),
                        []
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "available_balance"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "bytemuck::zeroable::Zeroable",
                          Ty.path
                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                          [],
                          "zeroed",
                          []
                        |),
                        []
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "decryptable_available_balance"
                      |),
                      M.read (| M.read (| decryptable_zero_balance |) |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "allow_confidential_credits"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "bool",
                          [ Ty.path "spl_pod::primitives::PodBool" ],
                          "into",
                          []
                        |),
                        [ Value.Bool true ]
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "pending_balance_credit_counter"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "u64",
                          [ Ty.path "spl_pod::primitives::PodU64" ],
                          "into",
                          []
                        |),
                        [ Value.Integer 0 ]
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "expected_pending_balance_credit_counter"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "u64",
                          [ Ty.path "spl_pod::primitives::PodU64" ],
                          "into",
                          []
                        |),
                        [ Value.Integer 0 ]
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "actual_pending_balance_credit_counter"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "u64",
                          [ Ty.path "spl_pod::primitives::PodU64" ],
                          "into",
                          []
                        |),
                        [ Value.Integer 0 ]
                      |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "allow_non_confidential_credits"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "bool",
                          [ Ty.path "spl_pod::primitives::PodBool" ],
                          "into",
                          []
                        |),
                        [ Value.Bool true ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::transfer_fee::TransferFeeConfig"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      "is_ok",
                                      []
                                    |),
                                    [
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "spl_token_2022::extension::BaseStateWithExtensions",
                                            Ty.apply
                                              (Ty.path
                                                "spl_token_2022::extension::PodStateWithExtensions")
                                              [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            "get_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::transfer_fee::TransferFeeConfig"
                                            ]
                                          |),
                                          [ mint ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let confidential_transfer_fee_amount :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::Try",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount"
                                              ];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                            Ty.apply
                                              (Ty.path
                                                "spl_token_2022::extension::PodStateWithExtensionsMut")
                                              [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                            "init_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount"
                                            ]
                                          |),
                                          [ token_account; Value.Bool false ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "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.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_fee_amount |),
                                  "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount",
                                  "withheld_amount"
                                |),
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "bytemuck::zeroable::Zeroable",
                                    Ty.path
                                      "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                    [],
                                    "zeroed",
                                    []
                                  |),
                                  []
                                |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_approve_account(accounts: &[AccountInfo]) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let mint_info = next_account_info(account_info_iter)?;
          let authority_info = next_account_info(account_info_iter)?;
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          if *mint_info.key != token_account.base.mint {
              return Err(TokenError::MintMismatch.into());
          }
      
          check_program_account(mint_info.owner)?;
          let mint_data = &mint_info.data.borrow_mut();
          let mint = PodStateWithExtensions::<PodMint>::unpack(mint_data)?;
          let confidential_transfer_mint = mint.get_extension::<ConfidentialTransferMint>()?;
          let maybe_confidential_transfer_mint_authority: Option<Pubkey> =
              confidential_transfer_mint.authority.into();
          let confidential_transfer_mint_authority =
              maybe_confidential_transfer_mint_authority.ok_or(TokenError::NoAuthorityExists)?;
      
          if authority_info.is_signer && *authority_info.key == confidential_transfer_mint_authority {
              let confidential_transfer_state =
                  token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
              confidential_transfer_state.approved = true.into();
              Ok(())
          } else {
              Err(ProgramError::MissingRequiredSignature)
          }
      }
      *)
      Definition process_approve_account (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ accounts ] =>
          ltac:(M.monadic
            (let accounts := M.alloc (| accounts |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |);
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| mint_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::Deref",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref",
                                        []
                                      |),
                                      [ M.read (| mint_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 confidential_transfer_mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "get_extension",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                  ]
                                |),
                                [ mint ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 maybe_confidential_transfer_mint_authority :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey",
                          [
                            Ty.apply
                              (Ty.path "core::option::Option")
                              [ Ty.path "solana_program::pubkey::Pubkey" ]
                          ],
                          "into",
                          []
                        |),
                        [
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| confidential_transfer_mint |),
                              "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                              "authority"
                            |)
                          |)
                        ]
                      |)
                    |) in
                  let confidential_transfer_mint_authority :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path "solana_program::pubkey::Pubkey";
                                  Ty.path "spl_token_2022::error::TokenError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                  "ok_or",
                                  [ Ty.path "spl_token_2022::error::TokenError" ]
                                |),
                                [
                                  M.read (| maybe_confidential_transfer_mint_authority |);
                                  Value.StructTuple
                                    "spl_token_2022::error::TokenError::NoAuthorityExists"
                                    []
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path "spl_token_2022::error::TokenError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.and (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| authority_info |),
                                      "solana_program::account_info::AccountInfo",
                                      "is_signer"
                                    |)
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_trait_method (|
                                        "core::cmp::PartialEq",
                                        Ty.path "solana_program::pubkey::Pubkey",
                                        [ Ty.path "solana_program::pubkey::Pubkey" ],
                                        "eq",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| authority_info |),
                                            "solana_program::account_info::AccountInfo",
                                            "key"
                                          |)
                                        |);
                                        confidential_transfer_mint_authority
                                      ]
                                    |)))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let confidential_transfer_state :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                          Ty.apply
                                            (Ty.path
                                              "spl_token_2022::extension::PodStateWithExtensionsMut")
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          "get_extension_mut",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                          ]
                                        |),
                                        [ token_account ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "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.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_state |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "approved"
                              |),
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::convert::Into",
                                  Ty.path "bool",
                                  [ Ty.path "spl_pod::primitives::PodBool" ],
                                  "into",
                                  []
                                |),
                                [ Value.Bool true ]
                              |)
                            |) in
                          M.alloc (|
                            Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Err"
                              [
                                Value.StructTuple
                                  "solana_program::program_error::ProgramError::MissingRequiredSignature"
                                  []
                              ]
                          |)))
                    ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_empty_account(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          proof_instruction_offset: i64,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
      
          // zero-knowledge proof certifies that the available balance ciphertext holds
          // the balance of 0.
          let proof_context = verify_empty_account_proof(account_info_iter, proof_instruction_offset)?;
      
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
      
          // Check that the encryption public key and ciphertext associated with the
          // confidential extension account are consistent with those that were
          // actually used to generate the zkp.
          if confidential_transfer_account.elgamal_pubkey != proof_context.pubkey {
              msg!("Encryption public-key mismatch");
              return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
          }
          if confidential_transfer_account.available_balance != proof_context.ciphertext {
              msg!("Available balance mismatch");
              return Err(ProgramError::InvalidInstructionData);
          }
          confidential_transfer_account.available_balance = EncryptedBalance::zeroed();
      
          // check that all balances are all-zero ciphertexts
          confidential_transfer_account.closable()?;
      
          Ok(())
      }
      *)
      Definition process_empty_account (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ program_id; accounts; proof_instruction_offset ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 proof_context :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path
                                    "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_token_2022::extension::confidential_transfer::verify_proof::verify_empty_account_proof",
                                  []
                                |),
                                [
                                  M.read (| account_info_iter |);
                                  M.read (| proof_instruction_offset |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "as_slice",
                                    []
                                  |),
                                  [ M.read (| account_info_iter |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  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"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| confidential_transfer_account |),
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                        "elgamal_pubkey"
                                      |);
                                      M.SubPointer.get_struct_record_field (|
                                        proof_context,
                                        "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext",
                                        "pubkey"
                                      |)
                                    ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  let _ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "solana_program::log::sol_log", [] |),
                                        [ M.read (| Value.String "Encryption public-key mismatch" |)
                                        ]
                                      |)
                                    |) in
                                  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::ConfidentialTransferElGamalPubkeyMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| confidential_transfer_account |),
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                        "available_balance"
                                      |);
                                      M.SubPointer.get_struct_record_field (|
                                        proof_context,
                                        "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext",
                                        "ciphertext"
                                      |)
                                    ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  let _ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "solana_program::log::sol_log", [] |),
                                        [ M.read (| Value.String "Available balance mismatch" |) ]
                                      |)
                                    |) in
                                  M.return_ (|
                                    Value.StructTuple
                                      "core::result::Result::Err"
                                      [
                                        Value.StructTuple
                                          "solana_program::program_error::ProgramError::InvalidInstructionData"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "available_balance"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "bytemuck::zeroable::Zeroable",
                          Ty.path
                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                          [],
                          "zeroed",
                          []
                        |),
                        []
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "closable",
                                []
                              |),
                              [ M.read (| confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_deposit(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          amount: u64,
          expected_decimals: u8,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let mint_info = next_account_info(account_info_iter)?;
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(mint_info.owner)?;
          let mint_data = &mint_info.data.borrow_mut();
          let mint = PodStateWithExtensions::<PodMint>::unpack(mint_data)?;
      
          if expected_decimals != mint.base.decimals {
              return Err(TokenError::MintDecimalsMismatch.into());
          }
      
          if mint.get_extension::<NonTransferable>().is_ok() {
              return Err(TokenError::NonTransferable.into());
          }
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          if token_account.base.is_frozen() {
              return Err(TokenError::AccountFrozen.into());
          }
      
          if token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          // Wrapped SOL deposits are not supported because lamports cannot be vanished.
          assert!(!token_account.base.is_native());
      
          token_account.base.amount = u64::from(token_account.base.amount)
              .checked_sub(amount)
              .ok_or(TokenError::Overflow)?
              .into();
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          confidential_transfer_account.valid_as_destination()?;
      
          // A deposit amount must be a 48-bit number
          let (amount_lo, amount_hi) = verify_and_split_deposit_amount(amount)?;
      
          // Prevent unnecessary ciphertext arithmetic syscalls if `amount_lo` or
          // `amount_hi` is zero
          if amount_lo > 0 {
              confidential_transfer_account.pending_balance_lo =
                  syscall::add_to(&confidential_transfer_account.pending_balance_lo, amount_lo)
                      .ok_or(TokenError::CiphertextArithmeticFailed)?;
          }
          if amount_hi > 0 {
              confidential_transfer_account.pending_balance_hi =
                  syscall::add_to(&confidential_transfer_account.pending_balance_hi, amount_hi)
                      .ok_or(TokenError::CiphertextArithmeticFailed)?;
          }
      
          confidential_transfer_account.increment_pending_balance_credit_counter()?;
      
          Ok(())
      }
      *)
      Definition process_deposit (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ program_id; accounts; amount; expected_decimals ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let amount := M.alloc (| amount |) in
            let expected_decimals := M.alloc (| expected_decimals |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| mint_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::Deref",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref",
                                        []
                                      |),
                                      [ M.read (| mint_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.Pure.ne
                                    (M.read (| expected_decimals |))
                                    (M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            mint,
                                            "spl_token_2022::extension::PodStateWithExtensions",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodMint",
                                        "decimals"
                                      |)
                                    |))
                                |)) 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::MintDecimalsMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::non_transferable::NonTransferable"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      "is_ok",
                                      []
                                    |),
                                    [
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "spl_token_2022::extension::BaseStateWithExtensions",
                                            Ty.apply
                                              (Ty.path
                                                "spl_token_2022::extension::PodStateWithExtensions")
                                              [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            "get_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::non_transferable::NonTransferable"
                                            ]
                                          |),
                                          [ mint ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::NonTransferable"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "as_slice",
                                    []
                                  |),
                                  [ M.read (| account_info_iter |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::pod::PodAccount",
                                      "is_frozen",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          token_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::AccountFrozen"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  UnOp.Pure.not
                                    (UnOp.Pure.not
                                      (M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "spl_token_2022::pod::PodAccount",
                                          "is_native",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              token_account,
                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                              "base"
                                            |)
                                          |)
                                        ]
                                      |)))
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.call_closure (|
                                  M.get_function (| "core::panicking::panic", [] |),
                                  [
                                    M.read (|
                                      Value.String
                                        "assertion failed: !token_account.base.is_native()"
                                    |)
                                  ]
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            token_account,
                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                            "base"
                          |)
                        |),
                        "spl_token_2022::pod::PodAccount",
                        "amount"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "u64",
                          [ Ty.path "spl_pod::primitives::PodU64" ],
                          "into",
                          []
                        |),
                        [
                          M.read (|
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [ Ty.path "u64"; Ty.path "spl_token_2022::error::TokenError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ],
                                        "ok_or",
                                        [ Ty.path "spl_token_2022::error::TokenError" ]
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "u64",
                                            "checked_sub",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::convert::From",
                                                Ty.path "u64",
                                                [ Ty.path "spl_pod::primitives::PodU64" ],
                                                "from",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        token_account,
                                                        "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                        "base"
                                                      |)
                                                    |),
                                                    "spl_token_2022::pod::PodAccount",
                                                    "amount"
                                                  |)
                                                |)
                                              ]
                                            |);
                                            M.read (| amount |)
                                          ]
                                        |);
                                        Value.StructTuple
                                          "spl_token_2022::error::TokenError::Overflow"
                                          []
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.tuple [];
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ]
                                                ],
                                                "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 confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "valid_as_destination",
                                []
                              |),
                              [ M.read (| confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  M.match_operator (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.tuple [ Ty.path "u64"; Ty.path "u64" ];
                                Ty.path "spl_token_2022::error::TokenError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::verify_and_split_deposit_amount",
                                []
                              |),
                              [ M.read (| amount |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "spl_token_2022::error::TokenError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                          let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                          let amount_lo := M.copy (| γ0_0 |) in
                          let amount_hi := M.copy (| γ0_1 |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.Pure.gt (M.read (| amount_lo |)) (Value.Integer 0)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let _ :=
                                      M.write (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| confidential_transfer_account |),
                                          "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                          "pending_balance_lo"
                                        |),
                                        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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                        ],
                                                      "ok_or",
                                                      [ Ty.path "spl_token_2022::error::TokenError"
                                                      ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "solana_zk_token_sdk::zk_token_elgamal::ops::add_to",
                                                          []
                                                        |),
                                                        [
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              confidential_transfer_account
                                                            |),
                                                            "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                            "pending_balance_lo"
                                                          |);
                                                          M.read (| amount_lo |)
                                                        ]
                                                      |);
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.tuple [];
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "spl_token_2022::error::TokenError"
                                                                  ]
                                                              ],
                                                              "from_residual",
                                                              []
                                                            |),
                                                            [ M.read (| residual |) ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                      0
                                                    |) in
                                                  let val := M.copy (| γ0_0 |) in
                                                  val))
                                            ]
                                          |)
                                        |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.Pure.gt (M.read (| amount_hi |)) (Value.Integer 0)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let _ :=
                                      M.write (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| confidential_transfer_account |),
                                          "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                          "pending_balance_hi"
                                        |),
                                        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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                        ],
                                                      "ok_or",
                                                      [ Ty.path "spl_token_2022::error::TokenError"
                                                      ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "solana_zk_token_sdk::zk_token_elgamal::ops::add_to",
                                                          []
                                                        |),
                                                        [
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              confidential_transfer_account
                                                            |),
                                                            "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                            "pending_balance_hi"
                                                          |);
                                                          M.read (| amount_hi |)
                                                        ]
                                                      |);
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.tuple [];
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "spl_token_2022::error::TokenError"
                                                                  ]
                                                              ],
                                                              "from_residual",
                                                              []
                                                            |),
                                                            [ M.read (| residual |) ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                      0
                                                    |) in
                                                  let val := M.copy (| γ0_0 |) in
                                                  val))
                                            ]
                                          |)
                                        |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.tuple [];
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path
                                          "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                        "increment_pending_balance_credit_counter",
                                        []
                                      |),
                                      [ M.read (| confidential_transfer_account |) ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.tuple [];
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ]
                                                ],
                                                "from_residual",
                                                []
                                              |),
                                              [ M.read (| residual |) ]
                                            |)
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Continue",
                                        0
                                      |) in
                                    let val := M.copy (| γ0_0 |) in
                                    val))
                              ]
                            |) in
                          M.alloc (|
                            Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                          |)))
                    ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn verify_and_split_deposit_amount(amount: u64) -> Result<(u64, u64), TokenError> {
          if amount > MAXIMUM_DEPOSIT_TRANSFER_AMOUNT {
              return Err(TokenError::MaximumDepositAmountExceeded);
          }
          let deposit_amount_lo = amount & (u16::MAX as u64);
          let deposit_amount_hi = amount.checked_shr(u16::BITS).unwrap();
          Ok((deposit_amount_lo, deposit_amount_hi))
      }
      *)
      Definition verify_and_split_deposit_amount (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ amount ] =>
          ltac:(M.monadic
            (let amount := M.alloc (| amount |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.Pure.gt
                                    (M.read (| amount |))
                                    (M.read (|
                                      M.get_constant (|
                                        "spl_token_2022::extension::confidential_transfer::MAXIMUM_DEPOSIT_TRANSFER_AMOUNT"
                                      |)
                                    |))
                                |)) 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"
                                      [
                                        Value.StructTuple
                                          "spl_token_2022::error::TokenError::MaximumDepositAmountExceeded"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let deposit_amount_lo :=
                    M.alloc (|
                      BinOp.Pure.bit_and
                        (M.read (| amount |))
                        (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)))
                    |) in
                  let deposit_amount_hi :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ],
                          "unwrap",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (| Ty.path "u64", "checked_shr", [] |),
                            [
                              M.read (| amount |);
                              M.read (| M.get_constant (| "core::num::BITS" |) |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        Value.Tuple
                          [ M.read (| deposit_amount_lo |); M.read (| deposit_amount_hi |) ]
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_withdraw(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          amount: u64,
          expected_decimals: u8,
          new_decryptable_available_balance: DecryptableBalance,
          proof_instruction_offset: i64,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let mint_info = next_account_info(account_info_iter)?;
      
          // zero-knowledge proof certifies that the account has enough available balance
          // to withdraw the amount.
          let proof_context = verify_withdraw_proof(account_info_iter, proof_instruction_offset)?;
      
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(mint_info.owner)?;
          let mint_data = &mint_info.data.borrow_mut();
          let mint = PodStateWithExtensions::<PodMint>::unpack(mint_data)?;
      
          if expected_decimals != mint.base.decimals {
              return Err(TokenError::MintDecimalsMismatch.into());
          }
      
          if mint.get_extension::<NonTransferable>().is_ok() {
              return Err(TokenError::NonTransferable.into());
          }
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          if token_account.base.is_frozen() {
              return Err(TokenError::AccountFrozen.into());
          }
      
          if token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          // Wrapped SOL withdrawals are not supported because lamports cannot be
          // apparated.
          assert!(!token_account.base.is_native());
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          confidential_transfer_account.valid_as_source()?;
      
          // Check that the encryption public key associated with the confidential
          // extension is consistent with the public key that was actually used to
          // generate the zkp.
          if confidential_transfer_account.elgamal_pubkey != proof_context.pubkey {
              return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
          }
      
          // Prevent unnecessary ciphertext arithmetic syscalls if the withdraw amount is
          // zero
          if amount > 0 {
              confidential_transfer_account.available_balance =
                  syscall::subtract_from(&confidential_transfer_account.available_balance, amount)
                      .ok_or(TokenError::CiphertextArithmeticFailed)?;
          }
          // Check that the final available balance ciphertext is consistent with the
          // actual ciphertext for which the zero-knowledge proof was generated for.
          if confidential_transfer_account.available_balance != proof_context.final_ciphertext {
              return Err(TokenError::ConfidentialTransferBalanceMismatch.into());
          }
      
          confidential_transfer_account.decryptable_available_balance = new_decryptable_available_balance;
          token_account.base.amount = u64::from(token_account.base.amount)
              .checked_add(amount)
              .ok_or(TokenError::Overflow)?
              .into();
      
          Ok(())
      }
      *)
      Definition process_withdraw (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              program_id;
              accounts;
              amount;
              expected_decimals;
              new_decryptable_available_balance;
              proof_instruction_offset
            ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let amount := M.alloc (| amount |) in
            let expected_decimals := M.alloc (| expected_decimals |) in
            let new_decryptable_available_balance :=
              M.alloc (| new_decryptable_available_balance |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 proof_context :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path
                                    "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_token_2022::extension::confidential_transfer::verify_proof::verify_withdraw_proof",
                                  []
                                |),
                                [
                                  M.read (| account_info_iter |);
                                  M.read (| proof_instruction_offset |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| mint_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::Deref",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref",
                                        []
                                      |),
                                      [ M.read (| mint_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.Pure.ne
                                    (M.read (| expected_decimals |))
                                    (M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            mint,
                                            "spl_token_2022::extension::PodStateWithExtensions",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodMint",
                                        "decimals"
                                      |)
                                    |))
                                |)) 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::MintDecimalsMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::non_transferable::NonTransferable"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      "is_ok",
                                      []
                                    |),
                                    [
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "spl_token_2022::extension::BaseStateWithExtensions",
                                            Ty.apply
                                              (Ty.path
                                                "spl_token_2022::extension::PodStateWithExtensions")
                                              [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            "get_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::non_transferable::NonTransferable"
                                            ]
                                          |),
                                          [ mint ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::NonTransferable"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "as_slice",
                                    []
                                  |),
                                  [ M.read (| account_info_iter |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::pod::PodAccount",
                                      "is_frozen",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          token_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::AccountFrozen"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  UnOp.Pure.not
                                    (UnOp.Pure.not
                                      (M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "spl_token_2022::pod::PodAccount",
                                          "is_native",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              token_account,
                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                              "base"
                                            |)
                                          |)
                                        ]
                                      |)))
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.call_closure (|
                                  M.get_function (| "core::panicking::panic", [] |),
                                  [
                                    M.read (|
                                      Value.String
                                        "assertion failed: !token_account.base.is_native()"
                                    |)
                                  ]
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "valid_as_source",
                                []
                              |),
                              [ M.read (| confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  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"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| confidential_transfer_account |),
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                        "elgamal_pubkey"
                                      |);
                                      M.SubPointer.get_struct_record_field (|
                                        proof_context,
                                        "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext",
                                        "pubkey"
                                      |)
                                    ]
                                  |)
                                |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  BinOp.Pure.gt (M.read (| amount |)) (Value.Integer 0)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "available_balance"
                                |),
                                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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                              Ty.path "spl_token_2022::error::TokenError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                              "ok_or",
                                              [ Ty.path "spl_token_2022::error::TokenError" ]
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_zk_token_sdk::zk_token_elgamal::ops::subtract_from",
                                                  []
                                                |),
                                                [
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| confidential_transfer_account |),
                                                    "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                    "available_balance"
                                                  |);
                                                  M.read (| amount |)
                                                ]
                                              |);
                                              Value.StructTuple
                                                "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                []
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path "core::convert::Infallible";
                                                            Ty.path
                                                              "spl_token_2022::error::TokenError"
                                                          ]
                                                      ],
                                                      "from_residual",
                                                      []
                                                    |),
                                                    [ M.read (| residual |) ]
                                                  |)
                                                |)
                                              |)
                                            |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Continue",
                                              0
                                            |) in
                                          let val := M.copy (| γ0_0 |) in
                                          val))
                                    ]
                                  |)
                                |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| confidential_transfer_account |),
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                        "available_balance"
                                      |);
                                      M.SubPointer.get_struct_record_field (|
                                        proof_context,
                                        "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext",
                                        "final_ciphertext"
                                      |)
                                    ]
                                  |)
                                |)) 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::ConfidentialTransferBalanceMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "decryptable_available_balance"
                      |),
                      M.read (| new_decryptable_available_balance |)
                    |) in
                  let _ :=
                    M.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            token_account,
                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                            "base"
                          |)
                        |),
                        "spl_token_2022::pod::PodAccount",
                        "amount"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "u64",
                          [ Ty.path "spl_pod::primitives::PodU64" ],
                          "into",
                          []
                        |),
                        [
                          M.read (|
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [ Ty.path "u64"; Ty.path "spl_token_2022::error::TokenError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply (Ty.path "core::option::Option") [ Ty.path "u64" ],
                                        "ok_or",
                                        [ Ty.path "spl_token_2022::error::TokenError" ]
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "u64",
                                            "checked_add",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::convert::From",
                                                Ty.path "u64",
                                                [ Ty.path "spl_pod::primitives::PodU64" ],
                                                "from",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        token_account,
                                                        "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                        "base"
                                                      |)
                                                    |),
                                                    "spl_token_2022::pod::PodAccount",
                                                    "amount"
                                                  |)
                                                |)
                                              ]
                                            |);
                                            M.read (| amount |)
                                          ]
                                        |);
                                        Value.StructTuple
                                          "spl_token_2022::error::TokenError::Overflow"
                                          []
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.tuple [];
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ]
                                                ],
                                                "from_residual",
                                                []
                                              |),
                                              [ M.read (| residual |) ]
                                            |)
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Continue",
                                        0
                                      |) in
                                    let val := M.copy (| γ0_0 |) in
                                    val))
                              ]
                            |)
                          |)
                        ]
                      |)
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_transfer(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          new_source_decryptable_available_balance: DecryptableBalance,
          proof_instruction_offset: i64,
          split_proof_context_state_accounts: bool,
          no_op_on_uninitialized_split_context_state: bool,
          close_split_context_state_on_execution: bool,
          source_decrypt_handles: &SourceDecryptHandles,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let source_account_info = next_account_info(account_info_iter)?;
          let mint_info = next_account_info(account_info_iter)?;
          let destination_account_info = next_account_info(account_info_iter)?;
      
          check_program_account(mint_info.owner)?;
          let mint_data = mint_info.data.borrow_mut();
          let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)?;
      
          if mint.get_extension::<NonTransferable>().is_ok() {
              return Err(TokenError::NonTransferable.into());
          }
          let confidential_transfer_mint = mint.get_extension::<ConfidentialTransferMint>()?;
      
          // A `Transfer` instruction must be accompanied by a zero-knowledge proof
          // instruction that certify the validity of the transfer amounts. The kind
          // of zero-knowledge proof instruction depends on whether a transfer incurs
          // a fee or not.
          //   - If the mint is not extended for fees or the instruction is for a
          //     self-transfer, then
          //   transfer fee is not required.
          //   - If the mint is extended for fees and the instruction is not a
          //     self-transfer, then
          //   transfer fee is required.
          let authority_info = if mint.get_extension::<TransferFeeConfig>().is_err() {
              // Transfer fee is not required. Decode the zero-knowledge proof as
              // `TransferData`.
              //
              // The zero-knowledge proof certifies that:
              //   1. the transfer amount is encrypted in the correct form
              //   2. the source account has enough balance to send the transfer amount
              let maybe_proof_context = verify_transfer_proof(
                  account_info_iter,
                  proof_instruction_offset,
                  split_proof_context_state_accounts,
                  no_op_on_uninitialized_split_context_state,
                  close_split_context_state_on_execution,
                  source_decrypt_handles,
              )?;
              // If `maybe_proof_context` is `None`, then this means that
              // `no_op_on_uninitialized_split_context_state` is true and a required context
              // state account is not yet initialized. Even if this is the case, we
              // follow through with the rest of the transfer logic to perform all the
              // necessary checks for a transfer to be safe.
      
              // If `close_split_context_state_on_execution` is `true`, then the source
              // account authority info is located after the lamport destination,
              // context state authority, and zk token proof program account infos.
              // Flush out these account infos.
              if close_split_context_state_on_execution && maybe_proof_context.is_none() {
                  let _lamport_destination_account_info = next_account_info(account_info_iter)?;
                  let _context_state_authority_info = next_account_info(account_info_iter)?;
                  let _zk_token_proof_program_info = next_account_info(account_info_iter)?;
              }
      
              let authority_info = next_account_info(account_info_iter)?;
      
              // Check that the auditor encryption public key associated wth the confidential
              // mint is consistent with what was actually used to generate the zkp.
              if let Some(ref proof_context) = maybe_proof_context {
                  if !confidential_transfer_mint
                      .auditor_elgamal_pubkey
                      .equals(&proof_context.transfer_pubkeys.auditor)
                  {
                      return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
                  }
              }
      
              process_source_for_transfer(
                  program_id,
                  source_account_info,
                  mint_info,
                  authority_info,
                  account_info_iter.as_slice(),
                  maybe_proof_context.as_ref(),
                  new_source_decryptable_available_balance,
              )?;
      
              process_destination_for_transfer(
                  destination_account_info,
                  mint_info,
                  maybe_proof_context.as_ref(),
              )?;
      
              if maybe_proof_context.is_none() {
                  msg!(
                      "Context states not fully initialized: returning with no op; transfer is NOT yet
                  executed"
                  );
              }
              authority_info
          } else {
              // Transfer fee is required.
              let transfer_fee_config = mint.get_extension::<TransferFeeConfig>()?;
              let fee_parameters = transfer_fee_config.get_epoch_fee(Clock::get()?.epoch);
      
              // Decode the zero-knowledge proof as `TransferWithFeeData`.
              //
              // The zero-knowledge proof certifies that:
              //   1. the transfer amount is encrypted in the correct form
              //   2. the source account has enough balance to send the transfer amount
              //   3. the transfer fee is computed correctly and encrypted in the correct form
              let maybe_proof_context = verify_transfer_with_fee_proof(
                  account_info_iter,
                  proof_instruction_offset,
                  split_proof_context_state_accounts,
                  no_op_on_uninitialized_split_context_state,
                  close_split_context_state_on_execution,
                  source_decrypt_handles,
                  fee_parameters,
              )?;
      
              // If `maybe_proof_context` is `None`, then this means that
              // `no_op_on_uninitialized_split_context_state` is true and a required context
              // state account is not yet initialized. Even if this is the case, we
              // follow through with the rest of the transfer with fee logic to
              // perform all the necessary checks to be safe.
      
              // If `close_split_context_state_on_execution` is `true`, then the source
              // account authority info is located after the lamport destination,
              // context state authority, and zk token proof program account infos.
              // Flush out these account infos.
              if close_split_context_state_on_execution && maybe_proof_context.is_none() {
                  let _lamport_destination_account_info = next_account_info(account_info_iter)?;
                  let _context_state_authority_info = next_account_info(account_info_iter)?;
                  let _zk_token_proof_program_info = next_account_info(account_info_iter)?;
              }
      
              let authority_info = next_account_info(account_info_iter)?;
      
              // Check that the encryption public keys associated with the mint confidential
              // transfer and confidential transfer fee extensions are consistent with
              // the keys that were used to generate the zkp.
              if let Some(ref proof_context) = maybe_proof_context {
                  if !confidential_transfer_mint
                      .auditor_elgamal_pubkey
                      .equals(&proof_context.transfer_with_fee_pubkeys.auditor)
                  {
                      return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
                  }
              }
      
              let confidential_transfer_fee_config =
                  mint.get_extension::<ConfidentialTransferFeeConfig>()?;
      
              // Check that the withdraw withheld authority ElGamal public key in the mint is
              // consistent with what was used to generate the zkp.
              if let Some(ref proof_context) = maybe_proof_context {
                  if proof_context
                      .transfer_with_fee_pubkeys
                      .withdraw_withheld_authority
                      != confidential_transfer_fee_config.withdraw_withheld_authority_elgamal_pubkey
                  {
                      return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
                  }
              }
      
              process_source_for_transfer_with_fee(
                  program_id,
                  source_account_info,
                  mint_info,
                  authority_info,
                  account_info_iter.as_slice(),
                  maybe_proof_context.as_ref(),
                  new_source_decryptable_available_balance,
              )?;
      
              let is_self_transfer = source_account_info.key == destination_account_info.key;
              process_destination_for_transfer_with_fee(
                  destination_account_info,
                  mint_info,
                  maybe_proof_context.as_ref(),
                  is_self_transfer,
              )?;
      
              if maybe_proof_context.is_none() {
                  msg!(
                      "Context state not fully initialized: returning with no op; transfer is NOT yet executed"
                  );
              }
              authority_info
          };
      
          #[cfg(feature = "confidential-hook")]
          if let Some(program_id) = transfer_hook::get_program_id(&mint) {
              // set transferring flags, scope the borrow to avoid double-borrow during CPI
              {
                  let mut source_account_data = source_account_info.data.borrow_mut();
                  let mut source_account =
                      PodStateWithExtensionsMut::<PodAccount>::unpack(&mut source_account_data)?;
                  transfer_hook::set_transferring(&mut source_account)?;
              }
              {
                  let mut destination_account_data = destination_account_info.data.borrow_mut();
                  let mut destination_account =
                      PodStateWithExtensionsMut::<PodAccount>::unpack(&mut destination_account_data)?;
                  transfer_hook::set_transferring(&mut destination_account)?;
              }
      
              // can't doubly-borrow the mint data either
              drop(mint_data);
      
              // Since the amount is unknown during a confidential transfer, pass in
              // u64::MAX as a convention.
              spl_transfer_hook_interface::onchain::invoke_execute(
                  &program_id,
                  source_account_info.clone(),
                  mint_info.clone(),
                  destination_account_info.clone(),
                  authority_info.clone(),
                  account_info_iter.as_slice(),
                  u64::MAX,
              )?;
      
              // unset transferring flag
              transfer_hook::unset_transferring(source_account_info)?;
              transfer_hook::unset_transferring(destination_account_info)?;
          }
      
          Ok(())
      }
      *)
      Definition process_transfer (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              program_id;
              accounts;
              new_source_decryptable_available_balance;
              proof_instruction_offset;
              split_proof_context_state_accounts;
              no_op_on_uninitialized_split_context_state;
              close_split_context_state_on_execution;
              source_decrypt_handles
            ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let new_source_decryptable_available_balance :=
              M.alloc (| new_source_decryptable_available_balance |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            let split_proof_context_state_accounts :=
              M.alloc (| split_proof_context_state_accounts |) in
            let no_op_on_uninitialized_split_context_state :=
              M.alloc (| no_op_on_uninitialized_split_context_state |) in
            let close_split_context_state_on_execution :=
              M.alloc (| close_split_context_state_on_execution |) in
            let source_decrypt_handles := M.alloc (| source_decrypt_handles |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let source_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 mint_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 destination_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 mint_data :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "core::cell::RefCell")
                            [
                              Ty.apply
                                (Ty.path "&mut")
                                [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                            ],
                          "borrow_mut",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::deref::Deref",
                              Ty.apply
                                (Ty.path "alloc::rc::Rc")
                                [
                                  Ty.apply
                                    (Ty.path "core::cell::RefCell")
                                    [
                                      Ty.apply
                                        (Ty.path "&mut")
                                        [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                    ];
                                  Ty.path "alloc::alloc::Global"
                                ],
                              [],
                              "deref",
                              []
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                M.read (| mint_info |),
                                "solana_program::account_info::AccountInfo",
                                "data"
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::Deref",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref",
                                        []
                                      |),
                                      [ mint_data ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::non_transferable::NonTransferable"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      "is_ok",
                                      []
                                    |),
                                    [
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "spl_token_2022::extension::BaseStateWithExtensions",
                                            Ty.apply
                                              (Ty.path
                                                "spl_token_2022::extension::PodStateWithExtensions")
                                              [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            [ Ty.path "spl_token_2022::pod::PodMint" ],
                                            "get_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::non_transferable::NonTransferable"
                                            ]
                                          |),
                                          [ mint ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::NonTransferable"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let confidential_transfer_mint :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                  "get_extension",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint"
                                  ]
                                |),
                                [ mint ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.apply
                                              (Ty.path "&")
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::transfer_fee::TransferFeeConfig"
                                              ];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        "is_err",
                                        []
                                      |),
                                      [
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "spl_token_2022::extension::BaseStateWithExtensions",
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensions")
                                                [ Ty.path "spl_token_2022::pod::PodMint" ],
                                              [ Ty.path "spl_token_2022::pod::PodMint" ],
                                              "get_extension",
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::transfer_fee::TransferFeeConfig"
                                              ]
                                            |),
                                            [ mint ]
                                          |)
                                        |)
                                      ]
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              let maybe_proof_context :=
                                M.copy (|
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                [
                                                  Ty.path
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::extension::confidential_transfer::verify_proof::verify_transfer_proof",
                                              []
                                            |),
                                            [
                                              M.read (| account_info_iter |);
                                              M.read (| proof_instruction_offset |);
                                              M.read (| split_proof_context_state_accounts |);
                                              M.read (|
                                                no_op_on_uninitialized_split_context_state
                                              |);
                                              M.read (| close_split_context_state_on_execution |);
                                              M.read (| source_decrypt_handles |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "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 γ :=
                                          M.use
                                            (M.alloc (|
                                              LogicalOp.and (|
                                                M.read (| close_split_context_state_on_execution |),
                                                ltac:(M.monadic
                                                  (M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ],
                                                      "is_none",
                                                      []
                                                    |),
                                                    [ maybe_proof_context ]
                                                  |)))
                                              |)
                                            |)) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        let _lamport_destination_account_info :=
                                          M.copy (|
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::Try",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.path
                                                              "solana_program::account_info::AccountInfo"
                                                          ];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "solana_program::account_info::next_account_info",
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::slice::iter::Iter")
                                                            [
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo"
                                                            ]
                                                        ]
                                                      |),
                                                      [ M.read (| account_info_iter |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          M.return_ (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::try_trait::FromResidual",
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.tuple [];
                                                                    Ty.path
                                                                      "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 _context_state_authority_info :=
                                          M.copy (|
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::Try",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.path
                                                              "solana_program::account_info::AccountInfo"
                                                          ];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "solana_program::account_info::next_account_info",
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::slice::iter::Iter")
                                                            [
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo"
                                                            ]
                                                        ]
                                                      |),
                                                      [ M.read (| account_info_iter |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          M.return_ (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::try_trait::FromResidual",
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.tuple [];
                                                                    Ty.path
                                                                      "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 _zk_token_proof_program_info :=
                                          M.copy (|
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::Try",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.path
                                                              "solana_program::account_info::AccountInfo"
                                                          ];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "solana_program::account_info::next_account_info",
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::slice::iter::Iter")
                                                            [
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo"
                                                            ]
                                                        ]
                                                      |),
                                                      [ M.read (| account_info_iter |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          M.return_ (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::try_trait::FromResidual",
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.tuple [];
                                                                    Ty.path
                                                                      "solana_program::program_error::ProgramError"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path
                                                                        "solana_program::program_error::ProgramError"
                                                                    ]
                                                                ],
                                                                "from_residual",
                                                                []
                                                              |),
                                                              [ M.read (| residual |) ]
                                                            |)
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Continue",
                                                        0
                                                      |) in
                                                    let val := M.copy (| γ0_0 |) in
                                                    val))
                                              ]
                                            |)
                                          |) in
                                        M.alloc (| Value.Tuple [] |)));
                                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              let authority_info :=
                                M.copy (|
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                [
                                                  Ty.path
                                                    "solana_program::account_info::AccountInfo"
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "solana_program::account_info::next_account_info",
                                              [
                                                Ty.apply
                                                  (Ty.path "core::slice::iter::Iter")
                                                  [
                                                    Ty.path
                                                      "solana_program::account_info::AccountInfo"
                                                  ]
                                              ]
                                            |),
                                            [ M.read (| account_info_iter |) ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "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 γ := maybe_proof_context in
                                        let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::option::Option::Some",
                                            0
                                          |) in
                                        let proof_context := M.alloc (| γ0_0 |) in
                                        M.match_operator (|
                                          M.alloc (| Value.Tuple [] |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ :=
                                                  M.use
                                                    (M.alloc (|
                                                      UnOp.Pure.not
                                                        (M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroElGamalPubkey",
                                                            "equals",
                                                            []
                                                          |),
                                                          [
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (|
                                                                confidential_transfer_mint
                                                              |),
                                                              "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                                                              "auditor_elgamal_pubkey"
                                                            |);
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.SubPointer.get_struct_record_field (|
                                                                M.read (| proof_context |),
                                                                "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                                                "transfer_pubkeys"
                                                              |),
                                                              "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferPubkeysInfo",
                                                              "auditor"
                                                            |)
                                                          ]
                                                        |))
                                                    |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                                  []
                                                              ]
                                                            |)
                                                          ]
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                          ]
                                        |)));
                                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              let _ :=
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::Try",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_function (|
                                            "spl_token_2022::extension::confidential_transfer::processor::process_source_for_transfer",
                                            []
                                          |),
                                          [
                                            M.read (| program_id |);
                                            M.read (| source_account_info |);
                                            M.read (| mint_info |);
                                            M.read (| authority_info |);
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::slice::iter::Iter")
                                                  [
                                                    Ty.path
                                                      "solana_program::account_info::AccountInfo"
                                                  ],
                                                "as_slice",
                                                []
                                              |),
                                              [ M.read (| account_info_iter |) ]
                                            |);
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::option::Option")
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                  ],
                                                "as_ref",
                                                []
                                              |),
                                              [ maybe_proof_context ]
                                            |);
                                            M.read (| new_source_decryptable_available_balance |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "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 (|
                                    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::extension::confidential_transfer::processor::process_destination_for_transfer",
                                            []
                                          |),
                                          [
                                            M.read (| destination_account_info |);
                                            M.read (| mint_info |);
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::option::Option")
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                  ],
                                                "as_ref",
                                                []
                                              |),
                                              [ maybe_proof_context ]
                                            |)
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "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 γ :=
                                          M.use
                                            (M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                    ],
                                                  "is_none",
                                                  []
                                                |),
                                                [ maybe_proof_context ]
                                              |)
                                            |)) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        let _ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_function (|
                                                "solana_program::log::sol_log",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  Value.String
                                                    "Context states not fully initialized: returning with no op; transfer is NOT yet
            executed"
                                                |)
                                              ]
                                            |)
                                          |) in
                                        M.alloc (| Value.Tuple [] |)));
                                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              authority_info));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                M.read (|
                                  let transfer_fee_config :=
                                    M.copy (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::transfer_fee::TransferFeeConfig"
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                                  Ty.apply
                                                    (Ty.path
                                                      "spl_token_2022::extension::PodStateWithExtensions")
                                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                                  "get_extension",
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::transfer_fee::TransferFeeConfig"
                                                  ]
                                                |),
                                                [ mint ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.tuple [];
                                                              Ty.path
                                                                "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 fee_parameters :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "spl_token_2022::extension::transfer_fee::TransferFeeConfig",
                                          "get_epoch_fee",
                                          []
                                        |),
                                        [
                                          M.read (| transfer_fee_config |);
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              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::clock::Clock";
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "solana_program::sysvar::Sysvar",
                                                          Ty.path "solana_program::clock::Clock",
                                                          [],
                                                          "get",
                                                          []
                                                        |),
                                                        []
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            M.return_ (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::ops::try_trait::FromResidual",
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    [
                                                                      Ty.tuple [];
                                                                      Ty.path
                                                                        "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))
                                                ]
                                              |),
                                              "solana_program::clock::Clock",
                                              "epoch"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let maybe_proof_context :=
                                    M.copy (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::option::Option")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "spl_token_2022::extension::confidential_transfer::verify_proof::verify_transfer_with_fee_proof",
                                                  []
                                                |),
                                                [
                                                  M.read (| account_info_iter |);
                                                  M.read (| proof_instruction_offset |);
                                                  M.read (| split_proof_context_state_accounts |);
                                                  M.read (|
                                                    no_op_on_uninitialized_split_context_state
                                                  |);
                                                  M.read (|
                                                    close_split_context_state_on_execution
                                                  |);
                                                  M.read (| source_decrypt_handles |);
                                                  M.read (| fee_parameters |)
                                                ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.tuple [];
                                                              Ty.path
                                                                "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 γ :=
                                              M.use
                                                (M.alloc (|
                                                  LogicalOp.and (|
                                                    M.read (|
                                                      close_split_context_state_on_execution
                                                    |),
                                                    ltac:(M.monadic
                                                      (M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path "core::option::Option")
                                                            [
                                                              Ty.path
                                                                "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                            ],
                                                          "is_none",
                                                          []
                                                        |),
                                                        [ maybe_proof_context ]
                                                      |)))
                                                  |)
                                                |)) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ |),
                                                Value.Bool true
                                              |) in
                                            let _lamport_destination_account_info :=
                                              M.copy (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&")
                                                              [
                                                                Ty.path
                                                                  "solana_program::account_info::AccountInfo"
                                                              ];
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "solana_program::account_info::next_account_info",
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::slice::iter::Iter")
                                                                [
                                                                  Ty.path
                                                                    "solana_program::account_info::AccountInfo"
                                                                ]
                                                            ]
                                                          |),
                                                          [ M.read (| account_info_iter |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.tuple [];
                                                                        Ty.path
                                                                          "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 _context_state_authority_info :=
                                              M.copy (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&")
                                                              [
                                                                Ty.path
                                                                  "solana_program::account_info::AccountInfo"
                                                              ];
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "solana_program::account_info::next_account_info",
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::slice::iter::Iter")
                                                                [
                                                                  Ty.path
                                                                    "solana_program::account_info::AccountInfo"
                                                                ]
                                                            ]
                                                          |),
                                                          [ M.read (| account_info_iter |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.tuple [];
                                                                        Ty.path
                                                                          "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 _zk_token_proof_program_info :=
                                              M.copy (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "&")
                                                              [
                                                                Ty.path
                                                                  "solana_program::account_info::AccountInfo"
                                                              ];
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "solana_program::account_info::next_account_info",
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::slice::iter::Iter")
                                                                [
                                                                  Ty.path
                                                                    "solana_program::account_info::AccountInfo"
                                                                ]
                                                            ]
                                                          |),
                                                          [ M.read (| account_info_iter |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.tuple [];
                                                                        Ty.path
                                                                          "solana_program::program_error::ProgramError"
                                                                      ],
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::result::Result")
                                                                        [
                                                                          Ty.path
                                                                            "core::convert::Infallible";
                                                                          Ty.path
                                                                            "solana_program::program_error::ProgramError"
                                                                        ]
                                                                    ],
                                                                    "from_residual",
                                                                    []
                                                                  |),
                                                                  [ M.read (| residual |) ]
                                                                |)
                                                              |)
                                                            |)
                                                          |)
                                                        |)));
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Continue",
                                                            0
                                                          |) in
                                                        let val := M.copy (| γ0_0 |) in
                                                        val))
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let authority_info :=
                                    M.copy (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "solana_program::account_info::AccountInfo"
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::account_info::next_account_info",
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Iter")
                                                      [
                                                        Ty.path
                                                          "solana_program::account_info::AccountInfo"
                                                      ]
                                                  ]
                                                |),
                                                [ M.read (| account_info_iter |) ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.tuple [];
                                                              Ty.path
                                                                "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 γ := maybe_proof_context in
                                            let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let proof_context := M.alloc (| γ0_0 |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          UnOp.Pure.not
                                                            (M.call_closure (|
                                                              M.get_associated_function (|
                                                                Ty.path
                                                                  "spl_pod::optional_keys::OptionalNonZeroElGamalPubkey",
                                                                "equals",
                                                                []
                                                              |),
                                                              [
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    confidential_transfer_mint
                                                                  |),
                                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                                                                  "auditor_elgamal_pubkey"
                                                                |);
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| proof_context |),
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                                                    "transfer_with_fee_pubkeys"
                                                                  |),
                                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeePubkeysInfo",
                                                                  "auditor"
                                                                |)
                                                              ]
                                                            |))
                                                        |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                                      []
                                                                  ]
                                                                |)
                                                              ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let confidential_transfer_fee_config :=
                                    M.copy (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeConfig"
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                                  Ty.apply
                                                    (Ty.path
                                                      "spl_token_2022::extension::PodStateWithExtensions")
                                                    [ Ty.path "spl_token_2022::pod::PodMint" ],
                                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                                  "get_extension",
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeConfig"
                                                  ]
                                                |),
                                                [ mint ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.tuple [];
                                                              Ty.path
                                                                "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 γ := maybe_proof_context in
                                            let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let proof_context := M.alloc (| γ0_0 |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::cmp::PartialEq",
                                                              Ty.path
                                                                "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey",
                                                              [
                                                                Ty.path
                                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey"
                                                              ],
                                                              "ne",
                                                              []
                                                            |),
                                                            [
                                                              M.SubPointer.get_struct_record_field (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (| proof_context |),
                                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                                                  "transfer_with_fee_pubkeys"
                                                                |),
                                                                "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeePubkeysInfo",
                                                                "withdraw_withheld_authority"
                                                              |);
                                                              M.SubPointer.get_struct_record_field (|
                                                                M.read (|
                                                                  confidential_transfer_fee_config
                                                                |),
                                                                "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeConfig",
                                                                "withdraw_withheld_authority_elgamal_pubkey"
                                                              |)
                                                            ]
                                                          |)
                                                        |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                                      []
                                                                  ]
                                                                |)
                                                              ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.tuple [];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::extension::confidential_transfer::processor::process_source_for_transfer_with_fee",
                                                []
                                              |),
                                              [
                                                M.read (| program_id |);
                                                M.read (| source_account_info |);
                                                M.read (| mint_info |);
                                                M.read (| authority_info |);
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Iter")
                                                      [
                                                        Ty.path
                                                          "solana_program::account_info::AccountInfo"
                                                      ],
                                                    "as_slice",
                                                    []
                                                  |),
                                                  [ M.read (| account_info_iter |) ]
                                                |);
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      [
                                                        Ty.path
                                                          "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                      ],
                                                    "as_ref",
                                                    []
                                                  |),
                                                  [ maybe_proof_context ]
                                                |);
                                                M.read (|
                                                  new_source_decryptable_available_balance
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.tuple [];
                                                            Ty.path
                                                              "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 is_self_transfer :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::cmp::PartialEq",
                                          Ty.apply
                                            (Ty.path "&")
                                            [ Ty.path "solana_program::pubkey::Pubkey" ],
                                          [
                                            Ty.apply
                                              (Ty.path "&")
                                              [ Ty.path "solana_program::pubkey::Pubkey" ]
                                          ],
                                          "eq",
                                          []
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| source_account_info |),
                                            "solana_program::account_info::AccountInfo",
                                            "key"
                                          |);
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| destination_account_info |),
                                            "solana_program::account_info::AccountInfo",
                                            "key"
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.tuple [];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::extension::confidential_transfer::processor::process_destination_for_transfer_with_fee",
                                                []
                                              |),
                                              [
                                                M.read (| destination_account_info |);
                                                M.read (| mint_info |);
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.apply
                                                      (Ty.path "core::option::Option")
                                                      [
                                                        Ty.path
                                                          "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                      ],
                                                    "as_ref",
                                                    []
                                                  |),
                                                  [ maybe_proof_context ]
                                                |);
                                                M.read (| is_self_transfer |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.tuple [];
                                                            Ty.path
                                                              "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 γ :=
                                              M.use
                                                (M.alloc (|
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ],
                                                      "is_none",
                                                      []
                                                    |),
                                                    [ maybe_proof_context ]
                                                  |)
                                                |)) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ |),
                                                Value.Bool true
                                              |) in
                                            let _ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_function (|
                                                    "solana_program::log::sol_log",
                                                    []
                                                  |),
                                                  [
                                                    M.read (|
                                                      Value.String
                                                        "Context state not fully initialized: returning with no op; transfer is NOT yet executed"
                                                    |)
                                                  ]
                                                |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  authority_info
                                |)
                              |)))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::transfer_hook::get_program_id",
                                    [
                                      Ty.path "spl_token_2022::pod::PodMint";
                                      Ty.apply
                                        (Ty.path
                                          "spl_token_2022::extension::PodStateWithExtensions")
                                        [ Ty.path "spl_token_2022::pod::PodMint" ]
                                    ]
                                  |),
                                  [ mint ]
                                |)
                              |) in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let program_id := M.copy (| γ0_0 |) in
                            let _ :=
                              let source_account_data :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::cell::RefCell")
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                        ],
                                      "borrow_mut",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::deref::Deref",
                                          Ty.apply
                                            (Ty.path "alloc::rc::Rc")
                                            [
                                              Ty.apply
                                                (Ty.path "core::cell::RefCell")
                                                [
                                                  Ty.apply
                                                    (Ty.path "&mut")
                                                    [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                                ];
                                              Ty.path "alloc::alloc::Global"
                                            ],
                                          [],
                                          "deref",
                                          []
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| source_account_info |),
                                            "solana_program::account_info::AccountInfo",
                                            "data"
                                          |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |) in
                              let source_account :=
                                M.copy (|
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                              "unpack",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::DerefMut",
                                                    Ty.apply
                                                      (Ty.path "core::cell::RefMut")
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&mut")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ]
                                                          ]
                                                      ],
                                                    [],
                                                    "deref_mut",
                                                    []
                                                  |),
                                                  [ source_account_data ]
                                                |)
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "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 (|
                                    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::extension::transfer_hook::set_transferring",
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                              Ty.path "spl_token_2022::pod::PodAccount"
                                            ]
                                          |),
                                          [ source_account ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |) in
                            let _ :=
                              let destination_account_data :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.apply
                                        (Ty.path "core::cell::RefCell")
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                        ],
                                      "borrow_mut",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::deref::Deref",
                                          Ty.apply
                                            (Ty.path "alloc::rc::Rc")
                                            [
                                              Ty.apply
                                                (Ty.path "core::cell::RefCell")
                                                [
                                                  Ty.apply
                                                    (Ty.path "&mut")
                                                    [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                                ];
                                              Ty.path "alloc::alloc::Global"
                                            ],
                                          [],
                                          "deref",
                                          []
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| destination_account_info |),
                                            "solana_program::account_info::AccountInfo",
                                            "data"
                                          |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |) in
                              let destination_account :=
                                M.copy (|
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                              "unpack",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::DerefMut",
                                                    Ty.apply
                                                      (Ty.path "core::cell::RefMut")
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&mut")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ]
                                                          ]
                                                      ],
                                                    [],
                                                    "deref_mut",
                                                    []
                                                  |),
                                                  [ destination_account_data ]
                                                |)
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "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 (|
                                    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::extension::transfer_hook::set_transferring",
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                              Ty.path "spl_token_2022::pod::PodAccount"
                                            ]
                                          |),
                                          [ destination_account ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |) in
                              M.alloc (| Value.Tuple [] |) in
                            let _ :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "core::mem::drop",
                                    [
                                      Ty.apply
                                        (Ty.path "core::cell::RefMut")
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                        ]
                                    ]
                                  |),
                                  [ M.read (| mint_data |) ]
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.tuple [];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_transfer_hook_interface::onchain::invoke_execute",
                                          []
                                        |),
                                        [
                                          program_id;
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::clone::Clone",
                                              Ty.path "solana_program::account_info::AccountInfo",
                                              [],
                                              "clone",
                                              []
                                            |),
                                            [ M.read (| source_account_info |) ]
                                          |);
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::clone::Clone",
                                              Ty.path "solana_program::account_info::AccountInfo",
                                              [],
                                              "clone",
                                              []
                                            |),
                                            [ M.read (| mint_info |) ]
                                          |);
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::clone::Clone",
                                              Ty.path "solana_program::account_info::AccountInfo",
                                              [],
                                              "clone",
                                              []
                                            |),
                                            [ M.read (| destination_account_info |) ]
                                          |);
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::clone::Clone",
                                              Ty.path "solana_program::account_info::AccountInfo",
                                              [],
                                              "clone",
                                              []
                                            |),
                                            [ M.read (| authority_info |) ]
                                          |);
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::slice::iter::Iter")
                                                [
                                                  Ty.path
                                                    "solana_program::account_info::AccountInfo"
                                                ],
                                              "as_slice",
                                              []
                                            |),
                                            [ M.read (| account_info_iter |) ]
                                          |);
                                          M.read (| M.get_constant (| "core::num::MAX" |) |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      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 (|
                                  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::extension::transfer_hook::unset_transferring",
                                          []
                                        |),
                                        [ M.read (| source_account_info |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "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 (|
                                  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::extension::transfer_hook::unset_transferring",
                                          []
                                        |),
                                        [ M.read (| destination_account_info |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_source_for_transfer(
          program_id: &Pubkey,
          source_account_info: &AccountInfo,
          mint_info: &AccountInfo,
          authority_info: &AccountInfo,
          signers: &[AccountInfo],
          maybe_proof_context: Option<&TransferProofContextInfo>,
          new_source_decryptable_available_balance: DecryptableBalance,
      ) -> ProgramResult {
          check_program_account(source_account_info.owner)?;
          let authority_info_data_len = authority_info.data_len();
          let token_account_data = &mut source_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              signers,
          )?;
      
          if token_account.base.is_frozen() {
              return Err(TokenError::AccountFrozen.into());
          }
      
          if token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          confidential_transfer_account.valid_as_source()?;
      
          if let Some(proof_context) = maybe_proof_context {
              // Check that the source encryption public key is consistent with what was
              // actually used to generate the zkp.
              if proof_context.transfer_pubkeys.source != confidential_transfer_account.elgamal_pubkey {
                  return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
              }
      
              let source_transfer_amount_lo =
                  transfer_amount_source_ciphertext(&proof_context.ciphertext_lo);
              let source_transfer_amount_hi =
                  transfer_amount_source_ciphertext(&proof_context.ciphertext_hi);
      
              let new_source_available_balance = syscall::subtract_with_lo_hi(
                  &confidential_transfer_account.available_balance,
                  &source_transfer_amount_lo,
                  &source_transfer_amount_hi,
              )
              .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
              // Check that the computed available balance is consistent with what was
              // actually used to generate the zkp on the client side.
              if new_source_available_balance != proof_context.new_source_ciphertext {
                  return Err(TokenError::ConfidentialTransferBalanceMismatch.into());
              }
      
              confidential_transfer_account.available_balance = new_source_available_balance;
              confidential_transfer_account.decryptable_available_balance =
                  new_source_decryptable_available_balance;
          }
      
          Ok(())
      }
      *)
      Definition process_source_for_transfer (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              program_id;
              source_account_info;
              mint_info;
              authority_info;
              signers;
              maybe_proof_context;
              new_source_decryptable_available_balance
            ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let source_account_info := M.alloc (| source_account_info |) in
            let mint_info := M.alloc (| mint_info |) in
            let authority_info := M.alloc (| authority_info |) in
            let signers := M.alloc (| signers |) in
            let maybe_proof_context := M.alloc (| maybe_proof_context |) in
            let new_source_decryptable_available_balance :=
              M.alloc (| new_source_decryptable_available_balance |) 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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| source_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| source_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.read (| signers |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::pod::PodAccount",
                                      "is_frozen",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          token_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::AccountFrozen"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "valid_as_source",
                                []
                              |),
                              [ M.read (| confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ := maybe_proof_context in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let proof_context := M.copy (| γ0_0 |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey"
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| proof_context |),
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                                    "transfer_pubkeys"
                                                  |),
                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferPubkeysInfo",
                                                  "source"
                                                |);
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "elgamal_pubkey"
                                                |)
                                              ]
                                            |)
                                          |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let source_transfer_amount_lo :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_source_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                      "ciphertext_lo"
                                    |)
                                  ]
                                |)
                              |) in
                            let source_transfer_amount_hi :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_source_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                      "ciphertext_hi"
                                    |)
                                  ]
                                |)
                              |) in
                            let new_source_available_balance :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::Try",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path
                                              "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                            Ty.path "spl_token_2022::error::TokenError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::option::Option")
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                              ],
                                            "ok_or",
                                            [ Ty.path "spl_token_2022::error::TokenError" ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "solana_zk_token_sdk::zk_token_elgamal::ops::subtract_with_lo_hi",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "available_balance"
                                                |);
                                                source_transfer_amount_lo;
                                                source_transfer_amount_hi
                                              ]
                                            |);
                                            Value.StructTuple
                                              "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                              []
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "spl_token_2022::error::TokenError"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                new_source_available_balance;
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| proof_context |),
                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                                  "new_source_ciphertext"
                                                |)
                                              ]
                                            |)
                                          |)) 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::ConfidentialTransferBalanceMismatch"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "available_balance"
                                |),
                                M.read (| new_source_available_balance |)
                              |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "decryptable_available_balance"
                                |),
                                M.read (| new_source_decryptable_available_balance |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_destination_for_transfer(
          destination_account_info: &AccountInfo,
          mint_info: &AccountInfo,
          maybe_transfer_proof_context_info: Option<&TransferProofContextInfo>,
      ) -> ProgramResult {
          check_program_account(destination_account_info.owner)?;
          let destination_token_account_data = &mut destination_account_info.data.borrow_mut();
          let mut destination_token_account =
              PodStateWithExtensionsMut::<PodAccount>::unpack(destination_token_account_data)?;
      
          if destination_token_account.base.is_frozen() {
              return Err(TokenError::AccountFrozen.into());
          }
      
          if destination_token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          if memo_required(&destination_token_account) {
              check_previous_sibling_instruction_is_memo()?;
          }
      
          let destination_confidential_transfer_account =
              destination_token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          destination_confidential_transfer_account.valid_as_destination()?;
      
          if let Some(proof_context) = maybe_transfer_proof_context_info {
              if proof_context.transfer_pubkeys.destination
                  != destination_confidential_transfer_account.elgamal_pubkey
              {
                  return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
              }
      
              let destination_ciphertext_lo =
                  transfer_amount_destination_ciphertext(&proof_context.ciphertext_lo);
              let destination_ciphertext_hi =
                  transfer_amount_destination_ciphertext(&proof_context.ciphertext_hi);
      
              destination_confidential_transfer_account.pending_balance_lo = syscall::add(
                  &destination_confidential_transfer_account.pending_balance_lo,
                  &destination_ciphertext_lo,
              )
              .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
              destination_confidential_transfer_account.pending_balance_hi = syscall::add(
                  &destination_confidential_transfer_account.pending_balance_hi,
                  &destination_ciphertext_hi,
              )
              .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
              destination_confidential_transfer_account.increment_pending_balance_credit_counter()?;
          }
      
          Ok(())
      }
      *)
      Definition process_destination_for_transfer (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ destination_account_info; mint_info; maybe_transfer_proof_context_info ] =>
          ltac:(M.monadic
            (let destination_account_info := M.alloc (| destination_account_info |) in
            let mint_info := M.alloc (| mint_info |) in
            let maybe_transfer_proof_context_info :=
              M.alloc (| maybe_transfer_proof_context_info |) 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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| destination_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 destination_token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| destination_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let destination_token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| destination_token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::pod::PodAccount",
                                      "is_frozen",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          destination_token_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::AccountFrozen"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            destination_token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::memo_transfer::memo_required",
                                      [
                                        Ty.apply
                                          (Ty.path
                                            "spl_token_2022::extension::PodStateWithExtensionsMut")
                                          [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                        Ty.path "spl_token_2022::pod::PodAccount"
                                      ]
                                    |),
                                    [ destination_token_account ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.tuple [];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::memo_transfer::check_previous_sibling_instruction_is_memo",
                                          []
                                        |),
                                        []
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let destination_confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ destination_token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "valid_as_destination",
                                []
                              |),
                              [ M.read (| destination_confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ := maybe_transfer_proof_context_info in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let proof_context := M.copy (| γ0_0 |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey"
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| proof_context |),
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                                    "transfer_pubkeys"
                                                  |),
                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferPubkeysInfo",
                                                  "destination"
                                                |);
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (|
                                                    destination_confidential_transfer_account
                                                  |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "elgamal_pubkey"
                                                |)
                                              ]
                                            |)
                                          |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let destination_ciphertext_lo :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_destination_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                      "ciphertext_lo"
                                    |)
                                  ]
                                |)
                              |) in
                            let destination_ciphertext_hi :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_destination_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                      "ciphertext_hi"
                                    |)
                                  ]
                                |)
                              |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| destination_confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "pending_balance_lo"
                                |),
                                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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                              Ty.path "spl_token_2022::error::TokenError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                              "ok_or",
                                              [ Ty.path "spl_token_2022::error::TokenError" ]
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_zk_token_sdk::zk_token_elgamal::ops::add",
                                                  []
                                                |),
                                                [
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (|
                                                      destination_confidential_transfer_account
                                                    |),
                                                    "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                    "pending_balance_lo"
                                                  |);
                                                  destination_ciphertext_lo
                                                ]
                                              |);
                                              Value.StructTuple
                                                "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                []
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path "core::convert::Infallible";
                                                            Ty.path
                                                              "spl_token_2022::error::TokenError"
                                                          ]
                                                      ],
                                                      "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.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| destination_confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "pending_balance_hi"
                                |),
                                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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                              Ty.path "spl_token_2022::error::TokenError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                              "ok_or",
                                              [ Ty.path "spl_token_2022::error::TokenError" ]
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_zk_token_sdk::zk_token_elgamal::ops::add",
                                                  []
                                                |),
                                                [
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (|
                                                      destination_confidential_transfer_account
                                                    |),
                                                    "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                    "pending_balance_hi"
                                                  |);
                                                  destination_ciphertext_hi
                                                ]
                                              |);
                                              Value.StructTuple
                                                "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                []
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path "core::convert::Infallible";
                                                            Ty.path
                                                              "spl_token_2022::error::TokenError"
                                                          ]
                                                      ],
                                                      "from_residual",
                                                      []
                                                    |),
                                                    [ M.read (| residual |) ]
                                                  |)
                                                |)
                                              |)
                                            |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Continue",
                                              0
                                            |) in
                                          let val := M.copy (| γ0_0 |) in
                                          val))
                                    ]
                                  |)
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.tuple [];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                          "increment_pending_balance_credit_counter",
                                          []
                                        |),
                                        [ M.read (| destination_confidential_transfer_account |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_source_for_transfer_with_fee(
          program_id: &Pubkey,
          source_account_info: &AccountInfo,
          mint_info: &AccountInfo,
          authority_info: &AccountInfo,
          signers: &[AccountInfo],
          maybe_proof_context: Option<&TransferWithFeeProofContextInfo>,
          new_source_decryptable_available_balance: DecryptableBalance,
      ) -> ProgramResult {
          check_program_account(source_account_info.owner)?;
          let authority_info_data_len = authority_info.data_len();
          let token_account_data = &mut source_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              signers,
          )?;
      
          if token_account.base.is_frozen() {
              return Err(TokenError::AccountFrozen.into());
          }
      
          if token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          confidential_transfer_account.valid_as_source()?;
      
          if let Some(proof_context) = maybe_proof_context {
              // Check that the source encryption public key is consistent with what was
              // actually used to generate the zkp.
              if proof_context.transfer_with_fee_pubkeys.source
                  != confidential_transfer_account.elgamal_pubkey
              {
                  return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
              }
      
              let source_transfer_amount_lo =
                  transfer_amount_source_ciphertext(&proof_context.ciphertext_lo);
              let source_transfer_amount_hi =
                  transfer_amount_source_ciphertext(&proof_context.ciphertext_hi);
      
              let new_source_available_balance = syscall::subtract_with_lo_hi(
                  &confidential_transfer_account.available_balance,
                  &source_transfer_amount_lo,
                  &source_transfer_amount_hi,
              )
              .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
              // Check that the computed available balance is consistent with what was
              // actually used to generate the zkp on the client side.
              if new_source_available_balance != proof_context.new_source_ciphertext {
                  return Err(TokenError::ConfidentialTransferBalanceMismatch.into());
              }
      
              confidential_transfer_account.available_balance = new_source_available_balance;
              confidential_transfer_account.decryptable_available_balance =
                  new_source_decryptable_available_balance;
          }
      
          Ok(())
      }
      *)
      Definition process_source_for_transfer_with_fee (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              program_id;
              source_account_info;
              mint_info;
              authority_info;
              signers;
              maybe_proof_context;
              new_source_decryptable_available_balance
            ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let source_account_info := M.alloc (| source_account_info |) in
            let mint_info := M.alloc (| mint_info |) in
            let authority_info := M.alloc (| authority_info |) in
            let signers := M.alloc (| signers |) in
            let maybe_proof_context := M.alloc (| maybe_proof_context |) in
            let new_source_decryptable_available_balance :=
              M.alloc (| new_source_decryptable_available_balance |) 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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| source_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| source_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.read (| signers |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::pod::PodAccount",
                                      "is_frozen",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          token_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::AccountFrozen"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "valid_as_source",
                                []
                              |),
                              [ M.read (| confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ := maybe_proof_context in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let proof_context := M.copy (| γ0_0 |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey"
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| proof_context |),
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                                    "transfer_with_fee_pubkeys"
                                                  |),
                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeePubkeysInfo",
                                                  "source"
                                                |);
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "elgamal_pubkey"
                                                |)
                                              ]
                                            |)
                                          |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let source_transfer_amount_lo :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_source_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                      "ciphertext_lo"
                                    |)
                                  ]
                                |)
                              |) in
                            let source_transfer_amount_hi :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_source_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                      "ciphertext_hi"
                                    |)
                                  ]
                                |)
                              |) in
                            let new_source_available_balance :=
                              M.copy (|
                                M.match_operator (|
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::Try",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path
                                              "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                            Ty.path "spl_token_2022::error::TokenError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::option::Option")
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                              ],
                                            "ok_or",
                                            [ Ty.path "spl_token_2022::error::TokenError" ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "solana_zk_token_sdk::zk_token_elgamal::ops::subtract_with_lo_hi",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "available_balance"
                                                |);
                                                source_transfer_amount_lo;
                                                source_transfer_amount_hi
                                              ]
                                            |);
                                            Value.StructTuple
                                              "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                              []
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "spl_token_2022::error::TokenError"
                                                        ]
                                                    ],
                                                    "from_residual",
                                                    []
                                                  |),
                                                  [ M.read (| residual |) ]
                                                |)
                                              |)
                                            |)
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Continue",
                                            0
                                          |) in
                                        let val := M.copy (| γ0_0 |) in
                                        val))
                                  ]
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                new_source_available_balance;
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| proof_context |),
                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                                  "new_source_ciphertext"
                                                |)
                                              ]
                                            |)
                                          |)) 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::ConfidentialTransferBalanceMismatch"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "available_balance"
                                |),
                                M.read (| new_source_available_balance |)
                              |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "decryptable_available_balance"
                                |),
                                M.read (| new_source_decryptable_available_balance |)
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_destination_for_transfer_with_fee(
          destination_account_info: &AccountInfo,
          mint_info: &AccountInfo,
          maybe_proof_context: Option<&TransferWithFeeProofContextInfo>,
          is_self_transfer: bool,
      ) -> ProgramResult {
          check_program_account(destination_account_info.owner)?;
          let destination_token_account_data = &mut destination_account_info.data.borrow_mut();
          let mut destination_token_account =
              PodStateWithExtensionsMut::<PodAccount>::unpack(destination_token_account_data)?;
      
          if destination_token_account.base.is_frozen() {
              return Err(TokenError::AccountFrozen.into());
          }
      
          if destination_token_account.base.mint != *mint_info.key {
              return Err(TokenError::MintMismatch.into());
          }
      
          if memo_required(&destination_token_account) {
              check_previous_sibling_instruction_is_memo()?;
          }
      
          let destination_confidential_transfer_account =
              destination_token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          destination_confidential_transfer_account.valid_as_destination()?;
      
          if let Some(proof_context) = maybe_proof_context {
              if proof_context.transfer_with_fee_pubkeys.destination
                  != destination_confidential_transfer_account.elgamal_pubkey
              {
                  return Err(TokenError::ConfidentialTransferElGamalPubkeyMismatch.into());
              }
      
              let destination_transfer_amount_lo =
                  transfer_amount_destination_ciphertext(&proof_context.ciphertext_lo);
              let destination_transfer_amount_hi =
                  transfer_amount_destination_ciphertext(&proof_context.ciphertext_hi);
      
              destination_confidential_transfer_account.pending_balance_lo = syscall::add(
                  &destination_confidential_transfer_account.pending_balance_lo,
                  &destination_transfer_amount_lo,
              )
              .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
              destination_confidential_transfer_account.pending_balance_hi = syscall::add(
                  &destination_confidential_transfer_account.pending_balance_hi,
                  &destination_transfer_amount_hi,
              )
              .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
              destination_confidential_transfer_account.increment_pending_balance_credit_counter()?;
      
              // process transfer fee
              if !is_self_transfer {
                  // Decode lo and hi fee amounts encrypted under the destination encryption
                  // public key
                  let destination_fee_lo =
                      fee_amount_destination_ciphertext(&proof_context.fee_ciphertext_lo);
                  let destination_fee_hi =
                      fee_amount_destination_ciphertext(&proof_context.fee_ciphertext_hi);
      
                  // Subtract the fee amount from the destination pending balance
                  destination_confidential_transfer_account.pending_balance_lo = syscall::subtract(
                      &destination_confidential_transfer_account.pending_balance_lo,
                      &destination_fee_lo,
                  )
                  .ok_or(TokenError::CiphertextArithmeticFailed)?;
                  destination_confidential_transfer_account.pending_balance_hi = syscall::subtract(
                      &destination_confidential_transfer_account.pending_balance_hi,
                      &destination_fee_hi,
                  )
                  .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
                  // Decode lo and hi fee amounts encrypted under the withdraw authority
                  // encryption public key
                  let withdraw_withheld_authority_fee_lo =
                      fee_amount_withdraw_withheld_authority_ciphertext(&proof_context.fee_ciphertext_lo);
                  let withdraw_withheld_authority_fee_hi =
                      fee_amount_withdraw_withheld_authority_ciphertext(&proof_context.fee_ciphertext_hi);
      
                  let destination_confidential_transfer_fee_amount =
                      destination_token_account.get_extension_mut::<ConfidentialTransferFeeAmount>()?;
      
                  // Add the fee amount to the destination withheld fee
                  destination_confidential_transfer_fee_amount.withheld_amount = syscall::add_with_lo_hi(
                      &destination_confidential_transfer_fee_amount.withheld_amount,
                      &withdraw_withheld_authority_fee_lo,
                      &withdraw_withheld_authority_fee_hi,
                  )
                  .ok_or(TokenError::CiphertextArithmeticFailed)?;
              }
          }
      
          Ok(())
      }
      *)
      Definition process_destination_for_transfer_with_fee (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ destination_account_info; mint_info; maybe_proof_context; is_self_transfer ] =>
          ltac:(M.monadic
            (let destination_account_info := M.alloc (| destination_account_info |) in
            let mint_info := M.alloc (| mint_info |) in
            let maybe_proof_context := M.alloc (| maybe_proof_context |) in
            let is_self_transfer := M.alloc (| is_self_transfer |) 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 (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| destination_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 destination_token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| destination_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let destination_token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| destination_token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::pod::PodAccount",
                                      "is_frozen",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          destination_token_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::AccountFrozen"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path "solana_program::pubkey::Pubkey",
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            destination_token_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "mint"
                                      |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| mint_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "key"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::MintMismatch"
                                              []
                                          ]
                                        |)
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::memo_transfer::memo_required",
                                      [
                                        Ty.apply
                                          (Ty.path
                                            "spl_token_2022::extension::PodStateWithExtensionsMut")
                                          [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                        Ty.path "spl_token_2022::pod::PodAccount"
                                      ]
                                    |),
                                    [ destination_token_account ]
                                  |)
                                |)) in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.tuple [];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::memo_transfer::check_previous_sibling_instruction_is_memo",
                                          []
                                        |),
                                        []
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            M.alloc (| Value.Tuple [] |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  let destination_confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ destination_token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "valid_as_destination",
                                []
                              |),
                              [ M.read (| destination_confidential_transfer_account |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 γ := maybe_proof_context in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let proof_context := M.copy (| γ0_0 |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::cmp::PartialEq",
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalPubkey"
                                                ],
                                                "ne",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| proof_context |),
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                                    "transfer_with_fee_pubkeys"
                                                  |),
                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeePubkeysInfo",
                                                  "destination"
                                                |);
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (|
                                                    destination_confidential_transfer_account
                                                  |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "elgamal_pubkey"
                                                |)
                                              ]
                                            |)
                                          |)) 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::ConfidentialTransferElGamalPubkeyMismatch"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |) in
                            let destination_transfer_amount_lo :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_destination_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                      "ciphertext_lo"
                                    |)
                                  ]
                                |)
                              |) in
                            let destination_transfer_amount_hi :=
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::transfer_amount_destination_ciphertext",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| proof_context |),
                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                      "ciphertext_hi"
                                    |)
                                  ]
                                |)
                              |) in
                            let _ :=
                              M.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| destination_confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "pending_balance_lo"
                                |),
                                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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                              Ty.path "spl_token_2022::error::TokenError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                              "ok_or",
                                              [ Ty.path "spl_token_2022::error::TokenError" ]
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_zk_token_sdk::zk_token_elgamal::ops::add",
                                                  []
                                                |),
                                                [
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (|
                                                      destination_confidential_transfer_account
                                                    |),
                                                    "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                    "pending_balance_lo"
                                                  |);
                                                  destination_transfer_amount_lo
                                                ]
                                              |);
                                              Value.StructTuple
                                                "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                []
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path "core::convert::Infallible";
                                                            Ty.path
                                                              "spl_token_2022::error::TokenError"
                                                          ]
                                                      ],
                                                      "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.write (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| destination_confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "pending_balance_hi"
                                |),
                                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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                              Ty.path "spl_token_2022::error::TokenError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                ],
                                              "ok_or",
                                              [ Ty.path "spl_token_2022::error::TokenError" ]
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_zk_token_sdk::zk_token_elgamal::ops::add",
                                                  []
                                                |),
                                                [
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (|
                                                      destination_confidential_transfer_account
                                                    |),
                                                    "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                    "pending_balance_hi"
                                                  |);
                                                  destination_transfer_amount_hi
                                                ]
                                              |);
                                              Value.StructTuple
                                                "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                []
                                            ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path "core::convert::Infallible";
                                                            Ty.path
                                                              "spl_token_2022::error::TokenError"
                                                          ]
                                                      ],
                                                      "from_residual",
                                                      []
                                                    |),
                                                    [ M.read (| residual |) ]
                                                  |)
                                                |)
                                              |)
                                            |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Continue",
                                              0
                                            |) in
                                          let val := M.copy (| γ0_0 |) in
                                          val))
                                    ]
                                  |)
                                |)
                              |) in
                            let _ :=
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.tuple [];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                          "increment_pending_balance_credit_counter",
                                          []
                                        |),
                                        [ M.read (| destination_confidential_transfer_account |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |) in
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          UnOp.Pure.not (M.read (| is_self_transfer |))
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let destination_fee_lo :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_function (|
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::fee_amount_destination_ciphertext",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| proof_context |),
                                              "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                              "fee_ciphertext_lo"
                                            |)
                                          ]
                                        |)
                                      |) in
                                    let destination_fee_hi :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_function (|
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::fee_amount_destination_ciphertext",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| proof_context |),
                                              "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                              "fee_ciphertext_hi"
                                            |)
                                          ]
                                        |)
                                      |) in
                                    let _ :=
                                      M.write (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| destination_confidential_transfer_account |),
                                          "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                          "pending_balance_lo"
                                        |),
                                        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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                        ],
                                                      "ok_or",
                                                      [ Ty.path "spl_token_2022::error::TokenError"
                                                      ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "solana_zk_token_sdk::zk_token_elgamal::ops::subtract",
                                                          []
                                                        |),
                                                        [
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              destination_confidential_transfer_account
                                                            |),
                                                            "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                            "pending_balance_lo"
                                                          |);
                                                          destination_fee_lo
                                                        ]
                                                      |);
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.tuple [];
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "spl_token_2022::error::TokenError"
                                                                  ]
                                                              ],
                                                              "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.write (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| destination_confidential_transfer_account |),
                                          "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                          "pending_balance_hi"
                                        |),
                                        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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                        ],
                                                      "ok_or",
                                                      [ Ty.path "spl_token_2022::error::TokenError"
                                                      ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "solana_zk_token_sdk::zk_token_elgamal::ops::subtract",
                                                          []
                                                        |),
                                                        [
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              destination_confidential_transfer_account
                                                            |),
                                                            "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                            "pending_balance_hi"
                                                          |);
                                                          destination_fee_hi
                                                        ]
                                                      |);
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.tuple [];
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "spl_token_2022::error::TokenError"
                                                                  ]
                                                              ],
                                                              "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 withdraw_withheld_authority_fee_lo :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_function (|
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::fee_amount_withdraw_withheld_authority_ciphertext",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| proof_context |),
                                              "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                              "fee_ciphertext_lo"
                                            |)
                                          ]
                                        |)
                                      |) in
                                    let withdraw_withheld_authority_fee_hi :=
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_function (|
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::fee_amount_withdraw_withheld_authority_ciphertext",
                                            []
                                          |),
                                          [
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| proof_context |),
                                              "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                              "fee_ciphertext_hi"
                                            |)
                                          ]
                                        |)
                                      |) in
                                    let destination_confidential_transfer_fee_amount :=
                                      M.copy (|
                                        M.match_operator (|
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::Try",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&mut")
                                                      [
                                                        Ty.path
                                                          "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount"
                                                      ];
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                                    Ty.apply
                                                      (Ty.path
                                                        "spl_token_2022::extension::PodStateWithExtensionsMut")
                                                      [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                                    "get_extension_mut",
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount"
                                                    ]
                                                  |),
                                                  [ destination_token_account ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Break",
                                                    0
                                                  |) in
                                                let residual := M.copy (| γ0_0 |) in
                                                M.alloc (|
                                                  M.never_to_any (|
                                                    M.read (|
                                                      M.return_ (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::try_trait::FromResidual",
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.tuple [];
                                                                Ty.path
                                                                  "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.write (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| destination_confidential_transfer_fee_amount |),
                                          "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount",
                                          "withheld_amount"
                                        |),
                                        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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                                      Ty.path "spl_token_2022::error::TokenError"
                                                    ],
                                                  [],
                                                  "branch",
                                                  []
                                                |),
                                                [
                                                  M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                                        ],
                                                      "ok_or",
                                                      [ Ty.path "spl_token_2022::error::TokenError"
                                                      ]
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "solana_zk_token_sdk::zk_token_elgamal::ops::add_with_lo_hi",
                                                          []
                                                        |),
                                                        [
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              destination_confidential_transfer_fee_amount
                                                            |),
                                                            "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount",
                                                            "withheld_amount"
                                                          |);
                                                          withdraw_withheld_authority_fee_lo;
                                                          withdraw_withheld_authority_fee_hi
                                                        ]
                                                      |);
                                                      Value.StructTuple
                                                        "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                                        []
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Break",
                                                      0
                                                    |) in
                                                  let residual := M.copy (| γ0_0 |) in
                                                  M.alloc (|
                                                    M.never_to_any (|
                                                      M.read (|
                                                        M.return_ (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::ops::try_trait::FromResidual",
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.tuple [];
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ],
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  [
                                                                    Ty.path
                                                                      "core::convert::Infallible";
                                                                    Ty.path
                                                                      "spl_token_2022::error::TokenError"
                                                                  ]
                                                              ],
                                                              "from_residual",
                                                              []
                                                            |),
                                                            [ M.read (| residual |) ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ0_0 :=
                                                    M.SubPointer.get_struct_tuple_field (|
                                                      γ,
                                                      "core::ops::control_flow::ControlFlow::Continue",
                                                      0
                                                    |) in
                                                  let val := M.copy (| γ0_0 |) in
                                                  val))
                                            ]
                                          |)
                                        |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_apply_pending_balance(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          ApplyPendingBalanceData {
              expected_pending_balance_credit_counter,
              new_decryptable_available_balance,
          }: &ApplyPendingBalanceData,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
      
          confidential_transfer_account.available_balance = syscall::add_with_lo_hi(
              &confidential_transfer_account.available_balance,
              &confidential_transfer_account.pending_balance_lo,
              &confidential_transfer_account.pending_balance_hi,
          )
          .ok_or(TokenError::CiphertextArithmeticFailed)?;
      
          confidential_transfer_account.actual_pending_balance_credit_counter =
              confidential_transfer_account.pending_balance_credit_counter;
          confidential_transfer_account.expected_pending_balance_credit_counter =
              *expected_pending_balance_credit_counter;
          confidential_transfer_account.decryptable_available_balance =
              *new_decryptable_available_balance;
          confidential_transfer_account.pending_balance_credit_counter = 0.into();
          confidential_transfer_account.pending_balance_lo = EncryptedBalance::zeroed();
          confidential_transfer_account.pending_balance_hi = EncryptedBalance::zeroed();
      
          Ok(())
      }
      *)
      Definition process_apply_pending_balance (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ program_id; accounts; β2 ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let β2 := M.alloc (| β2 |) in
            M.match_operator (|
              β2,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::extension::confidential_transfer::instruction::ApplyPendingBalanceData",
                        "expected_pending_balance_credit_counter"
                      |) in
                    let γ0_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::extension::confidential_transfer::instruction::ApplyPendingBalanceData",
                        "new_decryptable_available_balance"
                      |) in
                    let expected_pending_balance_credit_counter := M.copy (| γ0_0 |) in
                    let new_decryptable_available_balance := M.copy (| γ0_1 |) in
                    M.catch_return (|
                      ltac:(M.monadic
                        (M.read (|
                          let account_info_iter :=
                            M.alloc (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "slice")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "iter",
                                    []
                                  |),
                                  [ M.read (| accounts |) ]
                                |)
                              |)
                            |) in
                          let token_account_info :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [ Ty.path "solana_program::account_info::AccountInfo" ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "solana_program::account_info::next_account_info",
                                          [
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [ Ty.path "solana_program::account_info::AccountInfo"
                                              ]
                                          ]
                                        |),
                                        [ M.read (| account_info_iter |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "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 authority_info :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [ Ty.path "solana_program::account_info::AccountInfo" ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "solana_program::account_info::next_account_info",
                                          [
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [ Ty.path "solana_program::account_info::AccountInfo"
                                              ]
                                          ]
                                        |),
                                        [ M.read (| account_info_iter |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "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 authority_info_data_len :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "solana_program::account_info::AccountInfo",
                                  "data_len",
                                  []
                                |),
                                [ M.read (| authority_info |) ]
                              |)
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.tuple [];
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_function (|
                                        "spl_token_2022::check_program_account",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| token_account_info |),
                                            "solana_program::account_info::AccountInfo",
                                            "owner"
                                          |)
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.tuple [];
                                                    Ty.path
                                                      "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 token_account_data :=
                            M.alloc (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ],
                                    "borrow_mut",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::Deref",
                                        Ty.apply
                                          (Ty.path "alloc::rc::Rc")
                                          [
                                            Ty.apply
                                              (Ty.path "core::cell::RefCell")
                                              [
                                                Ty.apply
                                                  (Ty.path "&mut")
                                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                              ];
                                            Ty.path "alloc::alloc::Global"
                                          ],
                                        [],
                                        "deref",
                                        []
                                      |),
                                      [
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| token_account_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "data"
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |)
                            |) in
                          let token_account :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path
                                              "spl_token_2022::extension::PodStateWithExtensionsMut")
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path
                                              "spl_token_2022::extension::PodStateWithExtensionsMut")
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          "unpack",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::deref::DerefMut",
                                                Ty.apply
                                                  (Ty.path "core::cell::RefMut")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&mut")
                                                      [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ]
                                                      ]
                                                  ],
                                                [],
                                                "deref_mut",
                                                []
                                              |),
                                              [ M.read (| token_account_data |) ]
                                            |)
                                          |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "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 (|
                                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_associated_function (|
                                        Ty.path "spl_token_2022::processor::Processor",
                                        "validate_owner",
                                        []
                                      |),
                                      [
                                        M.read (| program_id |);
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              token_account,
                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                              "base"
                                            |)
                                          |),
                                          "spl_token_2022::pod::PodAccount",
                                          "owner"
                                        |);
                                        M.read (| authority_info |);
                                        M.read (| authority_info_data_len |);
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [ Ty.path "solana_program::account_info::AccountInfo"
                                              ],
                                            "as_slice",
                                            []
                                          |),
                                          [ M.read (| account_info_iter |) ]
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::FromResidual",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.tuple [];
                                                    Ty.path
                                                      "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 confidential_transfer_account :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&mut")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                          Ty.apply
                                            (Ty.path
                                              "spl_token_2022::extension::PodStateWithExtensionsMut")
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          "get_extension_mut",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                          ]
                                        |),
                                        [ token_account ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "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.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "available_balance"
                              |),
                              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_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext";
                                            Ty.path "spl_token_2022::error::TokenError"
                                          ],
                                        [],
                                        "branch",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::option::Option")
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext"
                                              ],
                                            "ok_or",
                                            [ Ty.path "spl_token_2022::error::TokenError" ]
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "solana_zk_token_sdk::zk_token_elgamal::ops::add_with_lo_hi",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "available_balance"
                                                |);
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "pending_balance_lo"
                                                |);
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| confidential_transfer_account |),
                                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                                  "pending_balance_hi"
                                                |)
                                              ]
                                            |);
                                            Value.StructTuple
                                              "spl_token_2022::error::TokenError::CiphertextArithmeticFailed"
                                              []
                                          ]
                                        |)
                                      ]
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::ops::control_flow::ControlFlow::Break",
                                            0
                                          |) in
                                        let residual := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.never_to_any (|
                                            M.read (|
                                              M.return_ (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::FromResidual",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ],
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path "core::convert::Infallible";
                                                          Ty.path
                                                            "spl_token_2022::error::TokenError"
                                                        ]
                                                    ],
                                                    "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.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "actual_pending_balance_credit_counter"
                              |),
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| confidential_transfer_account |),
                                  "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                  "pending_balance_credit_counter"
                                |)
                              |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "expected_pending_balance_credit_counter"
                              |),
                              M.read (| M.read (| expected_pending_balance_credit_counter |) |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "decryptable_available_balance"
                              |),
                              M.read (| M.read (| new_decryptable_available_balance |) |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "pending_balance_credit_counter"
                              |),
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::convert::Into",
                                  Ty.path "u64",
                                  [ Ty.path "spl_pod::primitives::PodU64" ],
                                  "into",
                                  []
                                |),
                                [ Value.Integer 0 ]
                              |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "pending_balance_lo"
                              |),
                              M.call_closure (|
                                M.get_trait_method (|
                                  "bytemuck::zeroable::Zeroable",
                                  Ty.path
                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                  [],
                                  "zeroed",
                                  []
                                |),
                                []
                              |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (| confidential_transfer_account |),
                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                                "pending_balance_hi"
                              |),
                              M.call_closure (|
                                M.get_trait_method (|
                                  "bytemuck::zeroable::Zeroable",
                                  Ty.path
                                    "solana_zk_token_sdk::zk_token_elgamal::pod::elgamal::ElGamalCiphertext",
                                  [],
                                  "zeroed",
                                  []
                                |),
                                []
                              |)
                            |) in
                          M.alloc (|
                            Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                          |)
                        |)))
                    |)))
              ]
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_allow_confidential_credits(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          allow_confidential_credits: bool,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          confidential_transfer_account.allow_confidential_credits = allow_confidential_credits.into();
      
          Ok(())
      }
      *)
      Definition process_allow_confidential_credits (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ program_id; accounts; allow_confidential_credits ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let allow_confidential_credits := M.alloc (| allow_confidential_credits |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "as_slice",
                                    []
                                  |),
                                  [ M.read (| account_info_iter |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "allow_confidential_credits"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "bool",
                          [ Ty.path "spl_pod::primitives::PodBool" ],
                          "into",
                          []
                        |),
                        [ M.read (| allow_confidential_credits |) ]
                      |)
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn process_allow_non_confidential_credits(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          allow_non_confidential_credits: bool,
      ) -> ProgramResult {
          let account_info_iter = &mut accounts.iter();
          let token_account_info = next_account_info(account_info_iter)?;
          let authority_info = next_account_info(account_info_iter)?;
          let authority_info_data_len = authority_info.data_len();
      
          check_program_account(token_account_info.owner)?;
          let token_account_data = &mut token_account_info.data.borrow_mut();
          let mut token_account = PodStateWithExtensionsMut::<PodAccount>::unpack(token_account_data)?;
      
          Processor::validate_owner(
              program_id,
              &token_account.base.owner,
              authority_info,
              authority_info_data_len,
              account_info_iter.as_slice(),
          )?;
      
          let confidential_transfer_account =
              token_account.get_extension_mut::<ConfidentialTransferAccount>()?;
          confidential_transfer_account.allow_non_confidential_credits =
              allow_non_confidential_credits.into();
      
          Ok(())
      }
      *)
      Definition process_allow_non_confidential_credits (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ program_id; accounts; allow_non_confidential_credits ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let allow_non_confidential_credits := M.alloc (| allow_non_confidential_credits |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let account_info_iter :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "slice")
                              [ Ty.path "solana_program::account_info::AccountInfo" ],
                            "iter",
                            []
                          |),
                          [ M.read (| accounts |) ]
                        |)
                      |)
                    |) in
                  let token_account_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&")
                                    [ Ty.path "solana_program::account_info::AccountInfo" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "solana_program::account_info::next_account_info",
                                  [
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ]
                                  ]
                                |),
                                [ M.read (| account_info_iter |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 authority_info_data_len :=
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "solana_program::account_info::AccountInfo",
                          "data_len",
                          []
                        |),
                        [ M.read (| authority_info |) ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::check_program_account", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| token_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 token_account_data :=
                    M.alloc (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.apply
                              (Ty.path "core::cell::RefCell")
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                              ],
                            "borrow_mut",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::deref::Deref",
                                Ty.apply
                                  (Ty.path "alloc::rc::Rc")
                                  [
                                    Ty.apply
                                      (Ty.path "core::cell::RefCell")
                                      [
                                        Ty.apply
                                          (Ty.path "&mut")
                                          [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                      ];
                                    Ty.path "alloc::alloc::Global"
                                  ],
                                [],
                                "deref",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| token_account_info |),
                                  "solana_program::account_info::AccountInfo",
                                  "data"
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)
                    |) in
                  let token_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "unpack",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::deref::DerefMut",
                                        Ty.apply
                                          (Ty.path "core::cell::RefMut")
                                          [
                                            Ty.apply
                                              (Ty.path "&mut")
                                              [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                          ],
                                        [],
                                        "deref_mut",
                                        []
                                      |),
                                      [ M.read (| token_account_data |) ]
                                    |)
                                  |)
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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 (|
                        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_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "validate_owner",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      token_account,
                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                      "base"
                                    |)
                                  |),
                                  "spl_token_2022::pod::PodAccount",
                                  "owner"
                                |);
                                M.read (| authority_info |);
                                M.read (| authority_info_data_len |);
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "as_slice",
                                    []
                                  |),
                                  [ M.read (| account_info_iter |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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 confidential_transfer_account :=
                    M.copy (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.apply
                                    (Ty.path "&mut")
                                    [
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensionsMut",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "get_extension_mut",
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                  ]
                                |),
                                [ token_account ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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.write (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| confidential_transfer_account |),
                        "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount",
                        "allow_non_confidential_credits"
                      |),
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::convert::Into",
                          Ty.path "bool",
                          [ Ty.path "spl_pod::primitives::PodBool" ],
                          "into",
                          []
                        |),
                        [ M.read (| allow_non_confidential_credits |) ]
                      |)
                    |) in
                  M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub(crate) fn process_instruction(
          program_id: &Pubkey,
          accounts: &[AccountInfo],
          input: &[u8],
      ) -> ProgramResult {
          check_program_account(program_id)?;
      
          match decode_instruction_type(input)? {
              ConfidentialTransferInstruction::InitializeMint => {
                  msg!("ConfidentialTransferInstruction::InitializeMint");
                  let data = decode_instruction_data::<InitializeMintData>(input)?;
                  process_initialize_mint(
                      accounts,
                      &data.authority,
                      data.auto_approve_new_accounts,
                      &data.auditor_elgamal_pubkey,
                  )
              }
              ConfidentialTransferInstruction::UpdateMint => {
                  msg!("ConfidentialTransferInstruction::UpdateMint");
                  let data = decode_instruction_data::<UpdateMintData>(input)?;
                  process_update_mint(
                      accounts,
                      data.auto_approve_new_accounts,
                      &data.auditor_elgamal_pubkey,
                  )
              }
              ConfidentialTransferInstruction::ConfigureAccount => {
                  msg!("ConfidentialTransferInstruction::ConfigureAccount");
                  let data = decode_instruction_data::<ConfigureAccountInstructionData>(input)?;
                  process_configure_account(
                      program_id,
                      accounts,
                      &data.decryptable_zero_balance,
                      &data.maximum_pending_balance_credit_counter,
                      data.proof_instruction_offset as i64,
                  )
              }
              ConfidentialTransferInstruction::ApproveAccount => {
                  msg!("ConfidentialTransferInstruction::ApproveAccount");
                  process_approve_account(accounts)
              }
              ConfidentialTransferInstruction::EmptyAccount => {
                  msg!("ConfidentialTransferInstruction::EmptyAccount");
                  let data = decode_instruction_data::<EmptyAccountInstructionData>(input)?;
                  process_empty_account(program_id, accounts, data.proof_instruction_offset as i64)
              }
              ConfidentialTransferInstruction::Deposit => {
                  msg!("ConfidentialTransferInstruction::Deposit");
                  #[cfg(feature = "zk-ops")]
                  {
                      let data = decode_instruction_data::<DepositInstructionData>(input)?;
                      process_deposit(program_id, accounts, data.amount.into(), data.decimals)
                  }
                  #[cfg(not(feature = "zk-ops"))]
                  Err(ProgramError::InvalidInstructionData)
              }
              ConfidentialTransferInstruction::Withdraw => {
                  msg!("ConfidentialTransferInstruction::Withdraw");
                  #[cfg(feature = "zk-ops")]
                  {
                      let data = decode_instruction_data::<WithdrawInstructionData>(input)?;
                      process_withdraw(
                          program_id,
                          accounts,
                          data.amount.into(),
                          data.decimals,
                          data.new_decryptable_available_balance,
                          data.proof_instruction_offset as i64,
                      )
                  }
                  #[cfg(not(feature = "zk-ops"))]
                  Err(ProgramError::InvalidInstructionData)
              }
              ConfidentialTransferInstruction::Transfer => {
                  msg!("ConfidentialTransferInstruction::Transfer");
                  #[cfg(feature = "zk-ops")]
                  {
                      let data = decode_instruction_data::<TransferInstructionData>(input)?;
                      process_transfer(
                          program_id,
                          accounts,
                          data.new_source_decryptable_available_balance,
                          data.proof_instruction_offset as i64,
                          false,
                          false,
                          false,
                          &SourceDecryptHandles::zeroed(),
                      )
                  }
                  #[cfg(not(feature = "zk-ops"))]
                  Err(ProgramError::InvalidInstructionData)
              }
              ConfidentialTransferInstruction::ApplyPendingBalance => {
                  msg!("ConfidentialTransferInstruction::ApplyPendingBalance");
                  #[cfg(feature = "zk-ops")]
                  {
                      process_apply_pending_balance(
                          program_id,
                          accounts,
                          decode_instruction_data::<ApplyPendingBalanceData>(input)?,
                      )
                  }
                  #[cfg(not(feature = "zk-ops"))]
                  {
                      Err(ProgramError::InvalidInstructionData)
                  }
              }
              ConfidentialTransferInstruction::DisableConfidentialCredits => {
                  msg!("ConfidentialTransferInstruction::DisableConfidentialCredits");
                  process_allow_confidential_credits(program_id, accounts, false)
              }
              ConfidentialTransferInstruction::EnableConfidentialCredits => {
                  msg!("ConfidentialTransferInstruction::EnableConfidentialCredits");
                  process_allow_confidential_credits(program_id, accounts, true)
              }
              ConfidentialTransferInstruction::DisableNonConfidentialCredits => {
                  msg!("ConfidentialTransferInstruction::DisableNonConfidentialCredits");
                  process_allow_non_confidential_credits(program_id, accounts, false)
              }
              ConfidentialTransferInstruction::EnableNonConfidentialCredits => {
                  msg!("ConfidentialTransferInstruction::EnableNonConfidentialCredits");
                  process_allow_non_confidential_credits(program_id, accounts, true)
              }
              ConfidentialTransferInstruction::TransferWithSplitProofs => {
                  msg!("ConfidentialTransferInstruction::TransferWithSplitProofs");
                  #[cfg(feature = "zk-ops")]
                  {
                      let data =
                          decode_instruction_data::<TransferWithSplitProofsInstructionData>(input)?;
                      process_transfer(
                          program_id,
                          accounts,
                          data.new_source_decryptable_available_balance,
                          0,
                          true,
                          data.no_op_on_uninitialized_split_context_state.into(),
                          data.close_split_context_state_on_execution.into(),
                          &data.source_decrypt_handles,
                      )
                  }
                  #[cfg(not(feature = "zk-ops"))]
                  Err(ProgramError::InvalidInstructionData)
              }
          }
      }
      *)
      Definition process_instruction (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ program_id; accounts; input ] =>
          ltac:(M.monadic
            (let program_id := M.alloc (| program_id |) in
            let accounts := M.alloc (| accounts |) in
            let input := M.alloc (| input |) 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 (| 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.tuple [];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  M.match_operator (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.path
                                  "spl_token_2022::extension::confidential_transfer::instruction::ConfidentialTransferInstruction";
                                Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::instruction::decode_instruction_type",
                                [
                                  Ty.path
                                    "spl_token_2022::extension::confidential_transfer::instruction::ConfidentialTransferInstruction"
                                ]
                              |),
                              [ M.read (| input |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.tuple [];
                                            Ty.path "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))
                      ]
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::InitializeMint"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::InitializeMintData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::InitializeMintData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_initialize_mint",
                                []
                              |),
                              [
                                M.read (| accounts |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| data |),
                                  "spl_token_2022::extension::confidential_transfer::instruction::InitializeMintData",
                                  "authority"
                                |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::InitializeMintData",
                                    "auto_approve_new_accounts"
                                  |)
                                |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| data |),
                                  "spl_token_2022::extension::confidential_transfer::instruction::InitializeMintData",
                                  "auditor_elgamal_pubkey"
                                |)
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::UpdateMint"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::UpdateMintData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::UpdateMintData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_update_mint",
                                []
                              |),
                              [
                                M.read (| accounts |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::UpdateMintData",
                                    "auto_approve_new_accounts"
                                  |)
                                |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| data |),
                                  "spl_token_2022::extension::confidential_transfer::instruction::UpdateMintData",
                                  "auditor_elgamal_pubkey"
                                |)
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::ConfigureAccount"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::ConfigureAccountInstructionData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::ConfigureAccountInstructionData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_configure_account",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| data |),
                                  "spl_token_2022::extension::confidential_transfer::instruction::ConfigureAccountInstructionData",
                                  "decryptable_zero_balance"
                                |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| data |),
                                  "spl_token_2022::extension::confidential_transfer::instruction::ConfigureAccountInstructionData",
                                  "maximum_pending_balance_credit_counter"
                                |);
                                M.rust_cast
                                  (M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| data |),
                                      "spl_token_2022::extension::confidential_transfer::instruction::ConfigureAccountInstructionData",
                                      "proof_instruction_offset"
                                    |)
                                  |))
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::ApproveAccount"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_approve_account",
                                []
                              |),
                              [ M.read (| accounts |) ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::EmptyAccount"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::EmptyAccountInstructionData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::EmptyAccountInstructionData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_empty_account",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.rust_cast
                                  (M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| data |),
                                      "spl_token_2022::extension::confidential_transfer::instruction::EmptyAccountInstructionData",
                                      "proof_instruction_offset"
                                    |)
                                  |))
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::Deposit"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::DepositInstructionData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::DepositInstructionData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_deposit",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "spl_pod::primitives::PodU64",
                                    [ Ty.path "u64" ],
                                    "into",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| data |),
                                        "spl_token_2022::extension::confidential_transfer::instruction::DepositInstructionData",
                                        "amount"
                                      |)
                                    |)
                                  ]
                                |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::DepositInstructionData",
                                    "decimals"
                                  |)
                                |)
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::Withdraw"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::WithdrawInstructionData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::WithdrawInstructionData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_withdraw",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "spl_pod::primitives::PodU64",
                                    [ Ty.path "u64" ],
                                    "into",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| data |),
                                        "spl_token_2022::extension::confidential_transfer::instruction::WithdrawInstructionData",
                                        "amount"
                                      |)
                                    |)
                                  ]
                                |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::WithdrawInstructionData",
                                    "decimals"
                                  |)
                                |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::WithdrawInstructionData",
                                    "new_decryptable_available_balance"
                                  |)
                                |);
                                M.rust_cast
                                  (M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| data |),
                                      "spl_token_2022::extension::confidential_transfer::instruction::WithdrawInstructionData",
                                      "proof_instruction_offset"
                                    |)
                                  |))
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String "ConfidentialTransferInstruction::Transfer"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::TransferInstructionData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::TransferInstructionData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_transfer",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::TransferInstructionData",
                                    "new_source_decryptable_available_balance"
                                  |)
                                |);
                                M.rust_cast
                                  (M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| data |),
                                      "spl_token_2022::extension::confidential_transfer::instruction::TransferInstructionData",
                                      "proof_instruction_offset"
                                    |)
                                  |));
                                Value.Bool false;
                                Value.Bool false;
                                Value.Bool false;
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "bytemuck::zeroable::Zeroable",
                                      Ty.path
                                        "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::SourceDecryptHandles",
                                      [],
                                      "zeroed",
                                      []
                                    |),
                                    []
                                  |)
                                |)
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String
                                      "ConfidentialTransferInstruction::ApplyPendingBalance"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_apply_pending_balance",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.read (|
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                [
                                                  Ty.path
                                                    "spl_token_2022::extension::confidential_transfer::instruction::ApplyPendingBalanceData"
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::instruction::decode_instruction_data",
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::confidential_transfer::instruction::ApplyPendingBalanceData"
                                              ]
                                            |),
                                            [ M.read (| input |) ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::ops::try_trait::FromResidual",
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.tuple [];
                                                          Ty.path
                                                            "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
                                          M.alloc (| M.read (| val |) |)))
                                    ]
                                  |)
                                |)
                              ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String
                                      "ConfidentialTransferInstruction::DisableConfidentialCredits"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_allow_confidential_credits",
                                []
                              |),
                              [ M.read (| program_id |); M.read (| accounts |); Value.Bool false ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String
                                      "ConfidentialTransferInstruction::EnableConfidentialCredits"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_allow_confidential_credits",
                                []
                              |),
                              [ M.read (| program_id |); M.read (| accounts |); Value.Bool true ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String
                                      "ConfidentialTransferInstruction::DisableNonConfidentialCredits"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_allow_non_confidential_credits",
                                []
                              |),
                              [ M.read (| program_id |); M.read (| accounts |); Value.Bool false ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String
                                      "ConfidentialTransferInstruction::EnableNonConfidentialCredits"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_allow_non_confidential_credits",
                                []
                              |),
                              [ M.read (| program_id |); M.read (| accounts |); Value.Bool true ]
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (| "solana_program::log::sol_log", [] |),
                                [
                                  M.read (|
                                    Value.String
                                      "ConfidentialTransferInstruction::TransferWithSplitProofs"
                                  |)
                                ]
                              |)
                            |) in
                          let data :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "&")
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::instruction::TransferWithSplitProofsInstructionData"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::instruction::decode_instruction_data",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::instruction::TransferWithSplitProofsInstructionData"
                                          ]
                                        |),
                                        [ M.read (| input |) ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::extension::confidential_transfer::processor::process_transfer",
                                []
                              |),
                              [
                                M.read (| program_id |);
                                M.read (| accounts |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| data |),
                                    "spl_token_2022::extension::confidential_transfer::instruction::TransferWithSplitProofsInstructionData",
                                    "new_source_decryptable_available_balance"
                                  |)
                                |);
                                Value.Integer 0;
                                Value.Bool true;
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "spl_pod::primitives::PodBool",
                                    [ Ty.path "bool" ],
                                    "into",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| data |),
                                        "spl_token_2022::extension::confidential_transfer::instruction::TransferWithSplitProofsInstructionData",
                                        "no_op_on_uninitialized_split_context_state"
                                      |)
                                    |)
                                  ]
                                |);
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "spl_pod::primitives::PodBool",
                                    [ Ty.path "bool" ],
                                    "into",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| data |),
                                        "spl_token_2022::extension::confidential_transfer::instruction::TransferWithSplitProofsInstructionData",
                                        "close_split_context_state_on_execution"
                                      |)
                                    |)
                                  ]
                                |);
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| data |),
                                  "spl_token_2022::extension::confidential_transfer::instruction::TransferWithSplitProofsInstructionData",
                                  "source_decrypt_handles"
                                |)
                              ]
                            |)
                          |)))
                    ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
    End processor.
  End confidential_transfer.
End extension.
