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

Module processor.
  (* StructTuple
    {
      name := "Processor";
      ty_params := [];
      fields := [];
    } *)
  
  Module Impl_spl_token_2022_processor_Processor.
    Definition Self : Ty.t := Ty.path "spl_token_2022::processor::Processor".
    
    (*
        fn _process_initialize_mint(
            accounts: &[AccountInfo],
            decimals: u8,
            mint_authority: &Pubkey,
            freeze_authority: PodCOption<Pubkey>,
            rent_sysvar_account: bool,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let mint_info = next_account_info(account_info_iter)?;
            let mint_data_len = mint_info.data_len();
            let mut mint_data = mint_info.data.borrow_mut();
            let rent = if rent_sysvar_account {
                Rent::from_account_info(next_account_info(account_info_iter)?)?
            } else {
                Rent::get()?
            };
    
            if !rent.is_exempt(mint_info.lamports(), mint_data_len) {
                return Err(TokenError::NotRentExempt.into());
            }
    
            let mut mint = PodStateWithExtensionsMut::<PodMint>::unpack_uninitialized(&mut mint_data)?;
            let extension_types = mint.get_extension_types()?;
            if ExtensionType::try_calculate_account_len::<Mint>(&extension_types)? != mint_data_len {
                return Err(ProgramError::InvalidAccountData);
            }
            ExtensionType::check_for_invalid_mint_extension_combinations(&extension_types)?;
    
            if let Ok(default_account_state) = mint.get_extension_mut::<DefaultAccountState>() {
                let default_account_state = AccountState::try_from(default_account_state.state)
                    .or(Err(ProgramError::InvalidAccountData))?;
                if default_account_state == AccountState::Frozen && freeze_authority.is_none() {
                    return Err(TokenError::MintCannotFreeze.into());
                }
            }
    
            mint.base.mint_authority = PodCOption::some( *mint_authority);
            mint.base.decimals = decimals;
            mint.base.is_initialized = PodBool::from_bool(true);
            mint.base.freeze_authority = freeze_authority;
            mint.init_account_type()?;
    
            Ok(())
        }
    *)
    Definition _process_initialize_mint (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; decimals; mint_authority; freeze_authority; rent_sysvar_account ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let decimals := M.alloc (| decimals |) in
          let mint_authority := M.alloc (| mint_authority |) in
          let freeze_authority := M.alloc (| freeze_authority |) in
          let rent_sysvar_account := M.alloc (| rent_sysvar_account |) 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 mint_data_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "data_len",
                        []
                      |),
                      [ M.read (| mint_info |) ]
                    |)
                  |) 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 rent :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.use rent_sysvar_account in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.path "solana_program::rent::Rent";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "solana_program::sysvar::Sysvar",
                                        Ty.path "solana_program::rent::Rent",
                                        [],
                                        "from_account_info",
                                        []
                                      |),
                                      [
                                        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
                                                            "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
                                                  M.alloc (| M.read (| val |) |)))
                                            ]
                                          |)
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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
                            (M.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::rent::Rent";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "solana_program::sysvar::Sysvar",
                                        Ty.path "solana_program::rent::Rent",
                                        [],
                                        "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))
                              ]
                            |)))
                      ]
                    |)
                  |) in
                let _ :=
                  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 "solana_program::rent::Rent",
                                      "is_exempt",
                                      []
                                    |),
                                    [
                                      rent;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "lamports",
                                          []
                                        |),
                                        [ M.read (| mint_info |) ]
                                      |);
                                      M.read (| mint_data_len |)
                                    ]
                                  |))
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_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::NotRentExempt"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) 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",
                                      []
                                    |),
                                    [ 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 extension_types :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  [
                                    Ty.path "spl_token_2022::extension::ExtensionType";
                                    Ty.path "alloc::alloc::Global"
                                  ];
                                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::PodStateWithExtensionsMut")
                                  [ Ty.path "spl_token_2022::pod::PodMint" ],
                                [ Ty.path "spl_token_2022::pod::PodMint" ],
                                "get_extension_types",
                                []
                              |),
                              [ 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 γ :=
                            M.use
                              (M.alloc (|
                                BinOp.Pure.ne
                                  (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 "usize";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "spl_token_2022::extension::ExtensionType",
                                                "try_calculate_account_len",
                                                [ Ty.path "spl_token_2022::state::Mint" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "spl_token_2022::extension::ExtensionType";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [ extension_types ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  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))
                                      ]
                                    |)
                                  |))
                                  (M.read (| mint_data_len |))
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      Value.StructTuple
                                        "solana_program::program_error::ProgramError::InvalidAccountData"
                                        []
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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 "spl_token_2022::error::TokenError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "spl_token_2022::extension::ExtensionType",
                              "check_for_invalid_mint_extension_combinations",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::ops::deref::Deref",
                                  Ty.apply
                                    (Ty.path "alloc::vec::Vec")
                                    [
                                      Ty.path "spl_token_2022::extension::ExtensionType";
                                      Ty.path "alloc::alloc::Global"
                                    ],
                                  [],
                                  "deref",
                                  []
                                |),
                                [ extension_types ]
                              |)
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                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.alloc (|
                              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::default_account_state::DefaultAccountState"
                                  ]
                                |),
                                [ mint ]
                              |)
                            |) in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let default_account_state := M.copy (| γ0_0 |) in
                          let default_account_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.path "spl_token_2022::state::AccountState";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "spl_token_2022::state::AccountState";
                                              Ty.apply
                                                (Ty.path "num_enum::TryFromPrimitiveError")
                                                [ Ty.path "spl_token_2022::state::AccountState" ]
                                            ],
                                          "or",
                                          [ Ty.path "solana_program::program_error::ProgramError" ]
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::convert::TryFrom",
                                              Ty.path "spl_token_2022::state::AccountState",
                                              [ Ty.path "u8" ],
                                              "try_from",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| default_account_state |),
                                                  "spl_token_2022::extension::default_account_state::DefaultAccountState",
                                                  "state"
                                                |)
                                              |)
                                            ]
                                          |);
                                          Value.StructTuple
                                            "core::result::Result::Err"
                                            [
                                              Value.StructTuple
                                                "solana_program::program_error::ProgramError::InvalidAccountData"
                                                []
                                            ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            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 (|
                                        LogicalOp.and (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::cmp::PartialEq",
                                              Ty.path "spl_token_2022::state::AccountState",
                                              [ Ty.path "spl_token_2022::state::AccountState" ],
                                              "eq",
                                              []
                                            |),
                                            [
                                              default_account_state;
                                              M.alloc (|
                                                Value.StructTuple
                                                  "spl_token_2022::state::AccountState::Frozen"
                                                  []
                                              |)
                                            ]
                                          |),
                                          ltac:(M.monadic
                                            (M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "spl_token_2022::pod::PodCOption")
                                                  [ Ty.path "solana_program::pubkey::Pubkey" ],
                                                "is_none",
                                                []
                                              |),
                                              [ freeze_authority ]
                                            |)))
                                        |)
                                      |)) 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::MintCannotFreeze"
                                                    []
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |)));
                      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 (|
                          mint,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodMint",
                      "mint_authority"
                    |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "solana_program::pubkey::Pubkey" ],
                        "some",
                        []
                      |),
                      [ M.read (| M.read (| mint_authority |) |) ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          mint,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodMint",
                      "decimals"
                    |),
                    M.read (| decimals |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          mint,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodMint",
                      "is_initialized"
                    |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "spl_pod::primitives::PodBool",
                        "from_bool",
                        []
                      |),
                      [ Value.Bool true ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          mint,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodMint",
                      "freeze_authority"
                    |),
                    M.read (| freeze_authority |)
                  |) 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_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_account_type",
                              []
                            |),
                            [ 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
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction__process_initialize_mint :
      M.IsAssociatedFunction Self "_process_initialize_mint" _process_initialize_mint.
    
    (*
        pub fn process_initialize_mint(
            accounts: &[AccountInfo],
            decimals: u8,
            mint_authority: &Pubkey,
            freeze_authority: PodCOption<Pubkey>,
        ) -> ProgramResult {
            Self::_process_initialize_mint(accounts, decimals, mint_authority, freeze_authority, true)
        }
    *)
    Definition process_initialize_mint (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; decimals; mint_authority; freeze_authority ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let decimals := M.alloc (| decimals |) in
          let mint_authority := M.alloc (| mint_authority |) in
          let freeze_authority := M.alloc (| freeze_authority |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_mint",
              []
            |),
            [
              M.read (| accounts |);
              M.read (| decimals |);
              M.read (| mint_authority |);
              M.read (| freeze_authority |);
              Value.Bool true
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_mint :
      M.IsAssociatedFunction Self "process_initialize_mint" process_initialize_mint.
    
    (*
        pub fn process_initialize_mint2(
            accounts: &[AccountInfo],
            decimals: u8,
            mint_authority: &Pubkey,
            freeze_authority: PodCOption<Pubkey>,
        ) -> ProgramResult {
            Self::_process_initialize_mint(accounts, decimals, mint_authority, freeze_authority, false)
        }
    *)
    Definition process_initialize_mint2 (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; decimals; mint_authority; freeze_authority ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let decimals := M.alloc (| decimals |) in
          let mint_authority := M.alloc (| mint_authority |) in
          let freeze_authority := M.alloc (| freeze_authority |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_mint",
              []
            |),
            [
              M.read (| accounts |);
              M.read (| decimals |);
              M.read (| mint_authority |);
              M.read (| freeze_authority |);
              Value.Bool false
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_mint2 :
      M.IsAssociatedFunction Self "process_initialize_mint2" process_initialize_mint2.
    
    (*
        fn _process_initialize_account(
            accounts: &[AccountInfo],
            owner: Option<&Pubkey>,
            rent_sysvar_account: bool,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let new_account_info = next_account_info(account_info_iter)?;
            let mint_info = next_account_info(account_info_iter)?;
            let owner = if let Some(owner) = owner {
                owner
            } else {
                next_account_info(account_info_iter)?.key
            };
            let new_account_info_data_len = new_account_info.data_len();
            let rent = if rent_sysvar_account {
                Rent::from_account_info(next_account_info(account_info_iter)?)?
            } else {
                Rent::get()?
            };
    
            let mut account_data = new_account_info.data.borrow_mut();
            // unpack_uninitialized checks account.base.is_initialized() under the hood
            let mut account =
                PodStateWithExtensionsMut::<PodAccount>::unpack_uninitialized(&mut account_data)?;
    
            if !rent.is_exempt(new_account_info.lamports(), new_account_info_data_len) {
                return Err(TokenError::NotRentExempt.into());
            }
    
            // get_required_account_extensions checks mint validity
            let mint_data = mint_info.data.borrow();
            let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)
                .map_err(|_| Into::<ProgramError>::into(TokenError::InvalidMint))?;
            if mint
                .get_extension::<PermanentDelegate>()
                .map(|e| Option::<Pubkey>::from(e.delegate).is_some())
                .unwrap_or(false)
            {
                msg!("Warning: Mint has a permanent delegate, so tokens in this account may be seized at any time");
            }
            let required_extensions =
                Self::get_required_account_extensions_from_unpacked_mint(mint_info.owner, &mint)?;
            if ExtensionType::try_calculate_account_len::<Account>(&required_extensions)?
                > new_account_info_data_len
            {
                return Err(ProgramError::InvalidAccountData);
            }
            for extension in required_extensions {
                account.init_account_extension_from_type(extension)?;
            }
    
            let starting_state =
                if let Ok(default_account_state) = mint.get_extension::<DefaultAccountState>() {
                    AccountState::try_from(default_account_state.state)
                        .or(Err(ProgramError::InvalidAccountData))?
                } else {
                    AccountState::Initialized
                };
    
            account.base.mint = *mint_info.key;
            account.base.owner = *owner;
            account.base.close_authority = PodCOption::none();
            account.base.delegate = PodCOption::none();
            account.base.delegated_amount = 0.into();
            account.base.state = starting_state.into();
            if cmp_pubkeys(mint_info.key, &native_mint::id()) {
                let rent_exempt_reserve = rent.minimum_balance(new_account_info_data_len);
                account.base.is_native = PodCOption::some(rent_exempt_reserve.into());
                account.base.amount = new_account_info
                    .lamports()
                    .checked_sub(rent_exempt_reserve)
                    .ok_or(TokenError::Overflow)?
                    .into();
            } else {
                account.base.is_native = PodCOption::none();
                account.base.amount = 0.into();
            };
    
            account.init_account_type()?;
    
            Ok(())
        }
    *)
    Definition _process_initialize_account (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; owner; rent_sysvar_account ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let owner := M.alloc (| owner |) in
          let rent_sysvar_account := M.alloc (| rent_sysvar_account |) 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 new_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 owner :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := owner in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let owner := M.copy (| γ0_0 |) in
                            owner));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (|
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  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
                                                      "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))
                                      ]
                                    |)
                                  |),
                                  "solana_program::account_info::AccountInfo",
                                  "key"
                                |)
                              |)
                            |)))
                      ]
                    |)
                  |) in
                let new_account_info_data_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "data_len",
                        []
                      |),
                      [ M.read (| new_account_info |) ]
                    |)
                  |) in
                let rent :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.use rent_sysvar_account in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.path "solana_program::rent::Rent";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "solana_program::sysvar::Sysvar",
                                        Ty.path "solana_program::rent::Rent",
                                        [],
                                        "from_account_info",
                                        []
                                      |),
                                      [
                                        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
                                                            "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
                                                  M.alloc (| M.read (| val |) |)))
                                            ]
                                          |)
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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
                            (M.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::rent::Rent";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "solana_program::sysvar::Sysvar",
                                        Ty.path "solana_program::rent::Rent",
                                        [],
                                        "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))
                              ]
                            |)))
                      ]
                    |)
                  |) in
                let 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 (| new_account_info |),
                              "solana_program::account_info::AccountInfo",
                              "data"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let 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_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",
                                      []
                                    |),
                                    [ 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 (|
                                UnOp.Pure.not
                                  (M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "solana_program::rent::Rent",
                                      "is_exempt",
                                      []
                                    |),
                                    [
                                      rent;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "lamports",
                                          []
                                        |),
                                        [ M.read (| new_account_info |) ]
                                      |);
                                      M.read (| new_account_info_data_len |)
                                    ]
                                  |))
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_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::NotRentExempt"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) 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",
                        []
                      |),
                      [
                        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 "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"
                                  ],
                                "map_err",
                                [
                                  Ty.path "solana_program::program_error::ProgramError";
                                  Ty.function
                                    [
                                      Ty.tuple
                                        [ Ty.path "solana_program::program_error::ProgramError" ]
                                    ]
                                    (Ty.path "solana_program::program_error::ProgramError")
                                ]
                              |),
                              [
                                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",
                                          []
                                        |),
                                        [ mint_data ]
                                      |)
                                    |)
                                  ]
                                |);
                                M.closure
                                  (fun γ =>
                                    ltac:(M.monadic
                                      match γ with
                                      | [ α0 ] =>
                                        M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (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::InvalidMint"
                                                      []
                                                  ]
                                                |)))
                                          ]
                                        |)
                                      | _ => M.impossible (||)
                                      end))
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.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.path "bool";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    "unwrap_or",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.apply
                                              (Ty.path "&")
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::permanent_delegate::PermanentDelegate"
                                              ];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        "map",
                                        [
                                          Ty.path "bool";
                                          Ty.function
                                            [
                                              Ty.tuple
                                                [
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::permanent_delegate::PermanentDelegate"
                                                    ]
                                                ]
                                            ]
                                            (Ty.path "bool")
                                        ]
                                      |),
                                      [
                                        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::permanent_delegate::PermanentDelegate"
                                            ]
                                          |),
                                          [ mint ]
                                        |);
                                        M.closure
                                          (fun γ =>
                                            ltac:(M.monadic
                                              match γ with
                                              | [ α0 ] =>
                                                M.match_operator (|
                                                  M.alloc (| α0 |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let e := M.copy (| γ |) in
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.apply
                                                              (Ty.path "core::option::Option")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            "is_some",
                                                            []
                                                          |),
                                                          [
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::convert::From",
                                                                  Ty.apply
                                                                    (Ty.path "core::option::Option")
                                                                    [
                                                                      Ty.path
                                                                        "solana_program::pubkey::Pubkey"
                                                                    ],
                                                                  [
                                                                    Ty.path
                                                                      "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                                  ],
                                                                  "from",
                                                                  []
                                                                |),
                                                                [
                                                                  M.read (|
                                                                    M.SubPointer.get_struct_record_field (|
                                                                      M.read (| e |),
                                                                      "spl_token_2022::extension::permanent_delegate::PermanentDelegate",
                                                                      "delegate"
                                                                    |)
                                                                  |)
                                                                ]
                                                              |)
                                                            |)
                                                          ]
                                                        |)))
                                                  ]
                                                |)
                                              | _ => M.impossible (||)
                                              end))
                                      ]
                                    |);
                                    Value.Bool false
                                  ]
                                |)
                              |)) 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
                                      "Warning: Mint has a permanent delegate, so tokens in this account may be seized at any time"
                                  |)
                                ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let required_extensions :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  [
                                    Ty.path "spl_token_2022::extension::ExtensionType";
                                    Ty.path "alloc::alloc::Global"
                                  ];
                                Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "get_required_account_extensions_from_unpacked_mint",
                                []
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| mint_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "owner"
                                  |)
                                |);
                                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 γ :=
                            M.use
                              (M.alloc (|
                                BinOp.Pure.gt
                                  (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 "usize";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path "spl_token_2022::extension::ExtensionType",
                                                "try_calculate_account_len",
                                                [ Ty.path "spl_token_2022::state::Account" ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::deref::Deref",
                                                    Ty.apply
                                                      (Ty.path "alloc::vec::Vec")
                                                      [
                                                        Ty.path
                                                          "spl_token_2022::extension::ExtensionType";
                                                        Ty.path "alloc::alloc::Global"
                                                      ],
                                                    [],
                                                    "deref",
                                                    []
                                                  |),
                                                  [ required_extensions ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  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))
                                      ]
                                    |)
                                  |))
                                  (M.read (| new_account_info_data_len |))
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      Value.StructTuple
                                        "solana_program::program_error::ProgramError::InvalidAccountData"
                                        []
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let _ :=
                  M.use
                    (M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::collect::IntoIterator",
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              [
                                Ty.path "spl_token_2022::extension::ExtensionType";
                                Ty.path "alloc::alloc::Global"
                              ],
                            [],
                            "into_iter",
                            []
                          |),
                          [ M.read (| required_extensions |) ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let iter := M.copy (| γ |) in
                            M.loop (|
                              ltac:(M.monadic
                                (let _ :=
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "alloc::vec::into_iter::IntoIter")
                                            [
                                              Ty.path "spl_token_2022::extension::ExtensionType";
                                              Ty.path "alloc::alloc::Global"
                                            ],
                                          [],
                                          "next",
                                          []
                                        |),
                                        [ iter ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (M.alloc (|
                                            M.never_to_any (| M.read (| M.break (||) |) |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::option::Option::Some",
                                              0
                                            |) in
                                          let extension := M.copy (| γ0_0 |) in
                                          let _ :=
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::Try",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "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_account_extension_from_type",
                                                        []
                                                      |),
                                                      [ account; M.read (| extension |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          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
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                let starting_state :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              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::default_account_state::DefaultAccountState"
                                    ]
                                  |),
                                  [ mint ]
                                |)
                              |) in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::result::Result::Ok",
                                0
                              |) in
                            let default_account_state := M.copy (| γ0_0 |) in
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.path "spl_token_2022::state::AccountState";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "spl_token_2022::state::AccountState";
                                            Ty.apply
                                              (Ty.path "num_enum::TryFromPrimitiveError")
                                              [ Ty.path "spl_token_2022::state::AccountState" ]
                                          ],
                                        "or",
                                        [ Ty.path "solana_program::program_error::ProgramError" ]
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::convert::TryFrom",
                                            Ty.path "spl_token_2022::state::AccountState",
                                            [ Ty.path "u8" ],
                                            "try_from",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| default_account_state |),
                                                "spl_token_2022::extension::default_account_state::DefaultAccountState",
                                                "state"
                                              |)
                                            |)
                                          ]
                                        |);
                                        Value.StructTuple
                                          "core::result::Result::Err"
                                          [
                                            Value.StructTuple
                                              "solana_program::program_error::ProgramError::InvalidAccountData"
                                              []
                                          ]
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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
                            (M.alloc (|
                              Value.StructTuple
                                "spl_token_2022::state::AccountState::Initialized"
                                []
                            |)))
                      ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "mint"
                    |),
                    M.read (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| mint_info |),
                          "solana_program::account_info::AccountInfo",
                          "key"
                        |)
                      |)
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "owner"
                    |),
                    M.read (| M.read (| owner |) |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "close_authority"
                    |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "solana_program::pubkey::Pubkey" ],
                        "none",
                        []
                      |),
                      []
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "delegate"
                    |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "solana_program::pubkey::Pubkey" ],
                        "none",
                        []
                      |),
                      []
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "delegated_amount"
                    |),
                    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 (|
                        M.SubPointer.get_struct_record_field (|
                          account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "state"
                    |),
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::convert::Into",
                        Ty.path "spl_token_2022::state::AccountState",
                        [ Ty.path "u8" ],
                        "into",
                        []
                      |),
                      [ M.read (| starting_state |) ]
                    |)
                  |) 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::cmp_pubkeys", [] |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| mint_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::native_mint::id", [] |),
                                        []
                                      |)
                                    |)
                                  ]
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let rent_exempt_reserve :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "solana_program::rent::Rent",
                                  "minimum_balance",
                                  []
                                |),
                                [ rent; M.read (| new_account_info_data_len |) ]
                              |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    account,
                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                    "base"
                                  |)
                                |),
                                "spl_token_2022::pod::PodAccount",
                                "is_native"
                              |),
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                    [ Ty.path "spl_pod::primitives::PodU64" ],
                                  "some",
                                  []
                                |),
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::convert::Into",
                                      Ty.path "u64",
                                      [ Ty.path "spl_pod::primitives::PodU64" ],
                                      "into",
                                      []
                                    |),
                                    [ M.read (| rent_exempt_reserve |) ]
                                  |)
                                ]
                              |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    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_associated_function (|
                                                        Ty.path
                                                          "solana_program::account_info::AccountInfo",
                                                        "lamports",
                                                        []
                                                      |),
                                                      [ M.read (| new_account_info |) ]
                                                    |);
                                                    M.read (| rent_exempt_reserve |)
                                                  ]
                                                |);
                                                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.Tuple [] |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    account,
                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                    "base"
                                  |)
                                |),
                                "spl_token_2022::pod::PodAccount",
                                "is_native"
                              |),
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                    [ Ty.path "spl_pod::primitives::PodU64" ],
                                  "none",
                                  []
                                |),
                                []
                              |)
                            |) in
                          let _ :=
                            M.write (|
                              M.SubPointer.get_struct_record_field (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    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",
                                  []
                                |),
                                [ Value.Integer 0 ]
                              |)
                            |) in
                          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_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_account_type",
                              []
                            |),
                            [ 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.
    
    Axiom AssociatedFunction__process_initialize_account :
      M.IsAssociatedFunction Self "_process_initialize_account" _process_initialize_account.
    
    (*
        pub fn process_initialize_account(accounts: &[AccountInfo]) -> ProgramResult {
            Self::_process_initialize_account(accounts, None, true)
        }
    *)
    Definition process_initialize_account (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_account",
              []
            |),
            [
              M.read (| accounts |);
              Value.StructTuple "core::option::Option::None" [];
              Value.Bool true
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_account :
      M.IsAssociatedFunction Self "process_initialize_account" process_initialize_account.
    
    (*
        pub fn process_initialize_account2(accounts: &[AccountInfo], owner: &Pubkey) -> ProgramResult {
            Self::_process_initialize_account(accounts, Some(owner), true)
        }
    *)
    Definition process_initialize_account2 (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; owner ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let owner := M.alloc (| owner |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_account",
              []
            |),
            [
              M.read (| accounts |);
              Value.StructTuple "core::option::Option::Some" [ M.read (| owner |) ];
              Value.Bool true
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_account2 :
      M.IsAssociatedFunction Self "process_initialize_account2" process_initialize_account2.
    
    (*
        pub fn process_initialize_account3(accounts: &[AccountInfo], owner: &Pubkey) -> ProgramResult {
            Self::_process_initialize_account(accounts, Some(owner), false)
        }
    *)
    Definition process_initialize_account3 (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; owner ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let owner := M.alloc (| owner |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_account",
              []
            |),
            [
              M.read (| accounts |);
              Value.StructTuple "core::option::Option::Some" [ M.read (| owner |) ];
              Value.Bool false
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_account3 :
      M.IsAssociatedFunction Self "process_initialize_account3" process_initialize_account3.
    
    (*
        fn _process_initialize_multisig(
            accounts: &[AccountInfo],
            m: u8,
            rent_sysvar_account: bool,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let multisig_info = next_account_info(account_info_iter)?;
            let multisig_info_data_len = multisig_info.data_len();
            let rent = if rent_sysvar_account {
                Rent::from_account_info(next_account_info(account_info_iter)?)?
            } else {
                Rent::get()?
            };
    
            let mut multisig_data = multisig_info.data.borrow_mut();
            let multisig = pod_from_bytes_mut::<PodMultisig>(&mut multisig_data)?;
            if bool::from(multisig.is_initialized) {
                return Err(TokenError::AlreadyInUse.into());
            }
    
            if !rent.is_exempt(multisig_info.lamports(), multisig_info_data_len) {
                return Err(TokenError::NotRentExempt.into());
            }
    
            let signer_infos = account_info_iter.as_slice();
            multisig.m = m;
            multisig.n = signer_infos.len() as u8;
            if !is_valid_signer_index(multisig.n as usize) {
                return Err(TokenError::InvalidNumberOfProvidedSigners.into());
            }
            if !is_valid_signer_index(multisig.m as usize) {
                return Err(TokenError::InvalidNumberOfRequiredSigners.into());
            }
            for (i, signer_info) in signer_infos.iter().enumerate() {
                multisig.signers[i] = *signer_info.key;
            }
            multisig.is_initialized = true.into();
    
            Ok(())
        }
    *)
    Definition _process_initialize_multisig (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; m; rent_sysvar_account ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let m := M.alloc (| m |) in
          let rent_sysvar_account := M.alloc (| rent_sysvar_account |) 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 multisig_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 multisig_info_data_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "data_len",
                        []
                      |),
                      [ M.read (| multisig_info |) ]
                    |)
                  |) in
                let rent :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := M.use rent_sysvar_account in
                            let _ :=
                              M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.path "solana_program::rent::Rent";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "solana_program::sysvar::Sysvar",
                                        Ty.path "solana_program::rent::Rent",
                                        [],
                                        "from_account_info",
                                        []
                                      |),
                                      [
                                        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
                                                            "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
                                                  M.alloc (| M.read (| val |) |)))
                                            ]
                                          |)
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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
                            (M.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::rent::Rent";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "solana_program::sysvar::Sysvar",
                                        Ty.path "solana_program::rent::Rent",
                                        [],
                                        "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))
                              ]
                            |)))
                      ]
                    |)
                  |) in
                let multisig_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 (| multisig_info |),
                              "solana_program::account_info::AccountInfo",
                              "data"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let multisig :=
                  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::pod::PodMultisig" ];
                                Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_pod::bytemuck::pod_from_bytes_mut",
                                [ Ty.path "spl_token_2022::pod::PodMultisig" ]
                              |),
                              [
                                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",
                                      []
                                    |),
                                    [ multisig_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::convert::From",
                                    Ty.path "bool",
                                    [ Ty.path "spl_pod::primitives::PodBool" ],
                                    "from",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| multisig |),
                                        "spl_token_2022::pod::PodMultisig",
                                        "is_initialized"
                                      |)
                                    |)
                                  ]
                                |)
                              |)) 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::AlreadyInUse"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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
                                  (M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "solana_program::rent::Rent",
                                      "is_exempt",
                                      []
                                    |),
                                    [
                                      rent;
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "lamports",
                                          []
                                        |),
                                        [ M.read (| multisig_info |) ]
                                      |);
                                      M.read (| multisig_info_data_len |)
                                    ]
                                  |))
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_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::NotRentExempt"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let signer_infos :=
                  M.alloc (|
                    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 |) ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| multisig |),
                      "spl_token_2022::pod::PodMultisig",
                      "m"
                    |),
                    M.read (| m |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| multisig |),
                      "spl_token_2022::pod::PodMultisig",
                      "n"
                    |),
                    M.rust_cast
                      (M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "slice")
                            [ Ty.path "solana_program::account_info::AccountInfo" ],
                          "len",
                          []
                        |),
                        [ M.read (| signer_infos |) ]
                      |))
                  |) in
                let _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                UnOp.Pure.not
                                  (M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::instruction::is_valid_signer_index",
                                      []
                                    |),
                                    [
                                      M.rust_cast
                                        (M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| multisig |),
                                            "spl_token_2022::pod::PodMultisig",
                                            "n"
                                          |)
                                        |))
                                    ]
                                  |))
                              |)) 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::InvalidNumberOfProvidedSigners"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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
                                  (M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::instruction::is_valid_signer_index",
                                      []
                                    |),
                                    [
                                      M.rust_cast
                                        (M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| multisig |),
                                            "spl_token_2022::pod::PodMultisig",
                                            "m"
                                          |)
                                        |))
                                    ]
                                  |))
                              |)) 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::InvalidNumberOfRequiredSigners"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let _ :=
                  M.use
                    (M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::collect::IntoIterator",
                            Ty.apply
                              (Ty.path "core::iter::adapters::enumerate::Enumerate")
                              [
                                Ty.apply
                                  (Ty.path "core::slice::iter::Iter")
                                  [ Ty.path "solana_program::account_info::AccountInfo" ]
                              ],
                            [],
                            "into_iter",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::iter::traits::iterator::Iterator",
                                Ty.apply
                                  (Ty.path "core::slice::iter::Iter")
                                  [ Ty.path "solana_program::account_info::AccountInfo" ],
                                [],
                                "enumerate",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_associated_function (|
                                    Ty.apply
                                      (Ty.path "slice")
                                      [ Ty.path "solana_program::account_info::AccountInfo" ],
                                    "iter",
                                    []
                                  |),
                                  [ M.read (| signer_infos |) ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let iter := M.copy (| γ |) in
                            M.loop (|
                              ltac:(M.monadic
                                (let _ :=
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "core::iter::adapters::enumerate::Enumerate")
                                            [
                                              Ty.apply
                                                (Ty.path "core::slice::iter::Iter")
                                                [
                                                  Ty.path
                                                    "solana_program::account_info::AccountInfo"
                                                ]
                                            ],
                                          [],
                                          "next",
                                          []
                                        |),
                                        [ iter ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (M.alloc (|
                                            M.never_to_any (| M.read (| M.break (||) |) |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::option::Option::Some",
                                              0
                                            |) in
                                          let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                                          let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                                          let i := M.copy (| γ1_0 |) in
                                          let signer_info := M.copy (| γ1_1 |) in
                                          let _ :=
                                            M.write (|
                                              M.SubPointer.get_array_field (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| multisig |),
                                                  "spl_token_2022::pod::PodMultisig",
                                                  "signers"
                                                |),
                                                i
                                              |),
                                              M.read (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| signer_info |),
                                                    "solana_program::account_info::AccountInfo",
                                                    "key"
                                                  |)
                                                |)
                                              |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| multisig |),
                      "spl_token_2022::pod::PodMultisig",
                      "is_initialized"
                    |),
                    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 [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction__process_initialize_multisig :
      M.IsAssociatedFunction Self "_process_initialize_multisig" _process_initialize_multisig.
    
    (*
        pub fn process_initialize_multisig(accounts: &[AccountInfo], m: u8) -> ProgramResult {
            Self::_process_initialize_multisig(accounts, m, true)
        }
    *)
    Definition process_initialize_multisig (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; m ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let m := M.alloc (| m |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_multisig",
              []
            |),
            [ M.read (| accounts |); M.read (| m |); Value.Bool true ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_multisig :
      M.IsAssociatedFunction Self "process_initialize_multisig" process_initialize_multisig.
    
    (*
        pub fn process_initialize_multisig2(accounts: &[AccountInfo], m: u8) -> ProgramResult {
            Self::_process_initialize_multisig(accounts, m, false)
        }
    *)
    Definition process_initialize_multisig2 (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; m ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let m := M.alloc (| m |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "spl_token_2022::processor::Processor",
              "_process_initialize_multisig",
              []
            |),
            [ M.read (| accounts |); M.read (| m |); Value.Bool false ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_multisig2 :
      M.IsAssociatedFunction Self "process_initialize_multisig2" process_initialize_multisig2.
    
    (*
        pub fn process_transfer(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
            amount: u64,
            expected_decimals: Option<u8>,
            expected_fee: Option<u64>,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
    
            let source_account_info = next_account_info(account_info_iter)?;
    
            let expected_mint_info = if let Some(expected_decimals) = expected_decimals {
                Some((next_account_info(account_info_iter)?, expected_decimals))
            } else {
                None
            };
    
            let destination_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();
    
            let mut source_account_data = source_account_info.data.borrow_mut();
            let mut source_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut source_account_data)?;
            if source_account.base.is_frozen() {
                return Err(TokenError::AccountFrozen.into());
            }
            let source_amount = u64::from(source_account.base.amount);
            if source_amount < amount {
                return Err(TokenError::InsufficientFunds.into());
            }
            if source_account
                .get_extension::<NonTransferableAccount>()
                .is_ok()
            {
                return Err(TokenError::NonTransferable.into());
            }
            let (fee, maybe_permanent_delegate, maybe_transfer_hook_program_id) =
                if let Some((mint_info, expected_decimals)) = expected_mint_info {
                    if !cmp_pubkeys(&source_account.base.mint, mint_info.key) {
                        return Err(TokenError::MintMismatch.into());
                    }
    
                    let mint_data = mint_info.try_borrow_data()?;
                    let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)?;
    
                    if expected_decimals != mint.base.decimals {
                        return Err(TokenError::MintDecimalsMismatch.into());
                    }
    
                    let fee = if let Ok(transfer_fee_config) = mint.get_extension::<TransferFeeConfig>()
                    {
                        transfer_fee_config
                            .calculate_epoch_fee(Clock::get()?.epoch, amount)
                            .ok_or(TokenError::Overflow)?
                    } else {
                        0
                    };
    
                    let maybe_permanent_delegate = get_permanent_delegate(&mint);
                    let maybe_transfer_hook_program_id = transfer_hook::get_program_id(&mint);
    
                    (
                        fee,
                        maybe_permanent_delegate,
                        maybe_transfer_hook_program_id,
                    )
                } else {
                    // Transfer hook extension exists on the account, but no mint
                    // was provided to figure out required accounts, abort
                    if source_account
                        .get_extension::<TransferHookAccount>()
                        .is_ok()
                    {
                        return Err(TokenError::MintRequiredForTransfer.into());
                    }
    
                    // Transfer fee amount extension exists on the account, but no mint
                    // was provided to calculate the fee, abort
                    if source_account
                        .get_extension_mut::<TransferFeeAmount>()
                        .is_ok()
                    {
                        return Err(TokenError::MintRequiredForTransfer.into());
                    } else {
                        (0, None, None)
                    }
                };
            if let Some(expected_fee) = expected_fee {
                if expected_fee != fee {
                    msg!("Calculated fee {}, received {}", fee, expected_fee);
                    return Err(TokenError::FeeMismatch.into());
                }
            }
    
            let self_transfer = cmp_pubkeys(source_account_info.key, destination_account_info.key);
            match (source_account.base.delegate, maybe_permanent_delegate) {
                (_, Some(ref delegate)) if cmp_pubkeys(authority_info.key, delegate) => {
                    Self::validate_owner(
                        program_id,
                        delegate,
                        authority_info,
                        authority_info_data_len,
                        account_info_iter.as_slice(),
                    )?
                }
                (
                    PodCOption {
                        option: PodCOption::<Pubkey>::SOME,
                        value: delegate,
                    },
                    _,
                ) if cmp_pubkeys(authority_info.key, &delegate) => {
                    Self::validate_owner(
                        program_id,
                        &delegate,
                        authority_info,
                        authority_info_data_len,
                        account_info_iter.as_slice(),
                    )?;
                    let delegated_amount = u64::from(source_account.base.delegated_amount);
                    if delegated_amount < amount {
                        return Err(TokenError::InsufficientFunds.into());
                    }
                    if !self_transfer {
                        source_account.base.delegated_amount = delegated_amount
                            .checked_sub(amount)
                            .ok_or(TokenError::Overflow)?
                            .into();
                        if u64::from(source_account.base.delegated_amount) == 0 {
                            source_account.base.delegate = PodCOption::none();
                        }
                    }
                }
                _ => {
                    Self::validate_owner(
                        program_id,
                        &source_account.base.owner,
                        authority_info,
                        authority_info_data_len,
                        account_info_iter.as_slice(),
                    )?;
    
                    if let Ok(cpi_guard) = source_account.get_extension::<CpiGuard>() {
                        if cpi_guard.lock_cpi.into() && in_cpi() {
                            return Err(TokenError::CpiGuardTransferBlocked.into());
                        }
                    }
                }
            }
    
            // Revisit this later to see if it's worth adding a check to reduce
            // compute costs, ie:
            // if self_transfer || amount == 0
            check_program_account(source_account_info.owner)?;
            check_program_account(destination_account_info.owner)?;
    
            // This check MUST occur just before the amounts are manipulated
            // to ensure self-transfers are fully validated
            if self_transfer {
                return Ok(());
            }
    
            // self-transfer was dealt with earlier, so this *should* be safe
            let mut destination_account_data = destination_account_info.data.borrow_mut();
            let mut destination_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut destination_account_data)?;
    
            if destination_account.base.is_frozen() {
                return Err(TokenError::AccountFrozen.into());
            }
            if !cmp_pubkeys(&source_account.base.mint, &destination_account.base.mint) {
                return Err(TokenError::MintMismatch.into());
            }
    
            if memo_required(&destination_account) {
                check_previous_sibling_instruction_is_memo()?;
            }
    
            if let Ok(confidential_transfer_state) =
                destination_account.get_extension::<ConfidentialTransferAccount>()
            {
                confidential_transfer_state.non_confidential_transfer_allowed()?
            }
    
            source_account.base.amount = source_amount
                .checked_sub(amount)
                .ok_or(TokenError::Overflow)?
                .into();
            let credited_amount = amount.checked_sub(fee).ok_or(TokenError::Overflow)?;
            destination_account.base.amount = u64::from(destination_account.base.amount)
                .checked_add(credited_amount)
                .ok_or(TokenError::Overflow)?
                .into();
            if fee > 0 {
                if let Ok(extension) = destination_account.get_extension_mut::<TransferFeeAmount>() {
                    let new_withheld_amount = u64::from(extension.withheld_amount)
                        .checked_add(fee)
                        .ok_or(TokenError::Overflow)?;
                    extension.withheld_amount = new_withheld_amount.into();
                } else {
                    // Use the generic error since this should never happen. If there's
                    // a fee, then the mint has a fee configured, which means all accounts
                    // must have the withholding.
                    return Err(TokenError::InvalidState.into());
                }
            }
    
            if source_account.base.is_native() {
                let source_starting_lamports = source_account_info.lamports();
                **source_account_info.lamports.borrow_mut() = source_starting_lamports
                    .checked_sub(amount)
                    .ok_or(TokenError::Overflow)?;
    
                let destination_starting_lamports = destination_account_info.lamports();
                **destination_account_info.lamports.borrow_mut() = destination_starting_lamports
                    .checked_add(amount)
                    .ok_or(TokenError::Overflow)?;
            }
    
            if let Some(program_id) = maybe_transfer_hook_program_id {
                if let Some((mint_info, _)) = expected_mint_info {
                    // set transferring flags
                    transfer_hook::set_transferring(&mut source_account)?;
                    transfer_hook::set_transferring(&mut destination_account)?;
    
                    // must drop these to avoid the double-borrow during CPI
                    drop(source_account_data);
                    drop(destination_account_data);
                    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(),
                        amount,
                    )?;
    
                    // unset transferring flag
                    transfer_hook::unset_transferring(source_account_info)?;
                    transfer_hook::unset_transferring(destination_account_info)?;
                } else {
                    return Err(TokenError::MintRequiredForTransfer.into());
                }
            }
    
            Ok(())
        }
    *)
    Definition process_transfer (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; accounts; amount; expected_decimals; expected_fee ] =>
        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 expected_fee := M.alloc (| expected_fee |) 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 expected_mint_info :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := expected_decimals in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let expected_decimals := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "core::option::Option::Some"
                                [
                                  Value.Tuple
                                    [
                                      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
                                                          "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))
                                          ]
                                        |)
                                      |);
                                      M.read (| expected_decimals |)
                                    ]
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
                      ]
                    |)
                  |) 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 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 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 (| 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 (|
                                        source_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 source_amount :=
                  M.alloc (|
                    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 (|
                                source_account,
                                "spl_token_2022::extension::PodStateWithExtensionsMut",
                                "base"
                              |)
                            |),
                            "spl_token_2022::pod::PodAccount",
                            "amount"
                          |)
                        |)
                      ]
                    |)
                  |) in
                let _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.Pure.lt (M.read (| source_amount |)) (M.read (| 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"
                                    [
                                      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::InsufficientFunds"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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::NonTransferableAccount"
                                          ];
                                        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::PodStateWithExtensionsMut")
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          "get_extension",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::non_transferable::NonTransferableAccount"
                                          ]
                                        |),
                                        [ source_account ]
                                      |)
                                    |)
                                  ]
                                |)
                              |)) 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
                M.match_operator (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ := expected_mint_info in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::option::Option::Some",
                              0
                            |) in
                          let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                          let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                          let mint_info := M.copy (| γ1_0 |) in
                          let expected_decimals := M.copy (| γ1_1 |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          UnOp.Pure.not
                                            (M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::cmp_pubkeys",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (|
                                                    M.SubPointer.get_struct_record_field (|
                                                      source_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 mint_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 "core::cell::Ref")
                                            [
                                              Ty.apply
                                                (Ty.path "&mut")
                                                [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "try_borrow_data",
                                          []
                                        |),
                                        [ M.read (| mint_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 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",
                                                []
                                              |),
                                              [ 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 fee :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        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 γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::result::Result::Ok",
                                          0
                                        |) in
                                      let transfer_fee_config := M.copy (| γ0_0 |) in
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.path "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
                                                        "spl_token_2022::extension::transfer_fee::TransferFeeConfig",
                                                      "calculate_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"
                                                        |)
                                                      |);
                                                      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))
                                        ]
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |)))
                                ]
                              |)
                            |) in
                          let maybe_permanent_delegate :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_function (|
                                  "spl_token_2022::extension::permanent_delegate::get_permanent_delegate",
                                  [
                                    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 maybe_transfer_hook_program_id :=
                            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
                          M.alloc (|
                            Value.Tuple
                              [
                                M.read (| fee |);
                                M.read (| maybe_permanent_delegate |);
                                M.read (| maybe_transfer_hook_program_id |)
                              ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (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_hook::TransferHookAccount"
                                                    ];
                                                  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::PodStateWithExtensionsMut")
                                                      [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                                    "get_extension",
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::transfer_hook::TransferHookAccount"
                                                    ]
                                                  |),
                                                  [ source_account ]
                                                |)
                                              |)
                                            ]
                                          |)
                                        |)) 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::MintRequiredForTransfer"
                                                      []
                                                  ]
                                                |)
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.apply
                                                  (Ty.path "&mut")
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::transfer_fee::TransferFeeAmount"
                                                  ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            "is_ok",
                                            []
                                          |),
                                          [
                                            M.alloc (|
                                              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::transfer_fee::TransferFeeAmount"
                                                  ]
                                                |),
                                                [ source_account ]
                                              |)
                                            |)
                                          ]
                                        |)
                                      |)) 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::MintRequiredForTransfer"
                                                    []
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.alloc (|
                                    Value.Tuple
                                      [
                                        Value.Integer 0;
                                        Value.StructTuple "core::option::Option::None" [];
                                        Value.StructTuple "core::option::Option::None" []
                                      ]
                                  |)))
                            ]
                          |)))
                    ]
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                        let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in
                        let fee := M.copy (| γ0_0 |) in
                        let maybe_permanent_delegate := M.copy (| γ0_1 |) in
                        let maybe_transfer_hook_program_id := M.copy (| γ0_2 |) in
                        let _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ := expected_fee in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::option::Option::Some",
                                      0
                                    |) in
                                  let expected_fee := M.copy (| γ0_0 |) in
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.Pure.ne
                                                  (M.read (| expected_fee |))
                                                  (M.read (| fee |))
                                              |)) 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.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::deref::Deref",
                                                            Ty.path "alloc::string::String",
                                                            [],
                                                            "deref",
                                                            []
                                                          |),
                                                          [
                                                            let res :=
                                                              M.alloc (|
                                                                M.call_closure (|
                                                                  M.get_function (|
                                                                    "alloc::fmt::format",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_associated_function (|
                                                                        Ty.path
                                                                          "core::fmt::Arguments",
                                                                        "new_v1",
                                                                        []
                                                                      |),
                                                                      [
                                                                        (* Unsize *)
                                                                        M.pointer_coercion
                                                                          (M.alloc (|
                                                                            Value.Array
                                                                              [
                                                                                M.read (|
                                                                                  Value.String
                                                                                    "Calculated fee "
                                                                                |);
                                                                                M.read (|
                                                                                  Value.String
                                                                                    ", received "
                                                                                |)
                                                                              ]
                                                                          |));
                                                                        (* Unsize *)
                                                                        M.pointer_coercion
                                                                          (M.alloc (|
                                                                            Value.Array
                                                                              [
                                                                                M.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.path
                                                                                      "core::fmt::rt::Argument",
                                                                                    "new_display",
                                                                                    [ Ty.path "u64"
                                                                                    ]
                                                                                  |),
                                                                                  [ fee ]
                                                                                |);
                                                                                M.call_closure (|
                                                                                  M.get_associated_function (|
                                                                                    Ty.path
                                                                                      "core::fmt::rt::Argument",
                                                                                    "new_display",
                                                                                    [ Ty.path "u64"
                                                                                    ]
                                                                                  |),
                                                                                  [ expected_fee ]
                                                                                |)
                                                                              ]
                                                                          |))
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |) in
                                                            res
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  |) 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::FeeMismatch"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        let self_transfer :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| source_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "key"
                                  |)
                                |);
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| destination_account_info |),
                                    "solana_program::account_info::AccountInfo",
                                    "key"
                                  |)
                                |)
                              ]
                            |)
                          |) in
                        let _ :=
                          M.match_operator (|
                            M.alloc (|
                              Value.Tuple
                                [
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          source_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |),
                                      "spl_token_2022::pod::PodAccount",
                                      "delegate"
                                    |)
                                  |);
                                  M.read (| maybe_permanent_delegate |)
                                ]
                            |),
                            [
                              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 γ1_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ0_1,
                                      "core::option::Option::Some",
                                      0
                                    |) in
                                  let delegate := M.alloc (| γ1_0 |) in
                                  let γ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| authority_info |),
                                              "solana_program::account_info::AccountInfo",
                                              "key"
                                            |)
                                          |);
                                          M.read (| delegate |)
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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.read (| delegate |);
                                              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))
                                    ]
                                  |)));
                              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 γ1_0 :=
                                    M.SubPointer.get_struct_record_field (|
                                      γ0_0,
                                      "spl_token_2022::pod::PodCOption",
                                      "option"
                                    |) in
                                  let γ1_1 :=
                                    M.SubPointer.get_struct_record_field (|
                                      γ0_0,
                                      "spl_token_2022::pod::PodCOption",
                                      "value"
                                    |) in
                                  let γ2_0 := M.SubPointer.get_slice_index (| γ1_0, 0 |) in
                                  let γ2_1 := M.SubPointer.get_slice_index (| γ1_0, 1 |) in
                                  let γ2_2 := M.SubPointer.get_slice_index (| γ1_0, 2 |) in
                                  let γ2_3 := M.SubPointer.get_slice_index (| γ1_0, 3 |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ2_0 |),
                                      Value.Integer 1
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ2_1 |),
                                      Value.Integer 0
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ2_2 |),
                                      Value.Integer 0
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ2_3 |),
                                      Value.Integer 0
                                    |) in
                                  let delegate := M.copy (| γ1_1 |) in
                                  let γ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| authority_info |),
                                              "solana_program::account_info::AccountInfo",
                                              "key"
                                            |)
                                          |);
                                          delegate
                                        ]
                                      |)
                                    |) 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_associated_function (|
                                                Ty.path "spl_token_2022::processor::Processor",
                                                "validate_owner",
                                                []
                                              |),
                                              [
                                                M.read (| program_id |);
                                                delegate;
                                                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 delegated_amount :=
                                    M.alloc (|
                                      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 (|
                                                  source_account,
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                  "base"
                                                |)
                                              |),
                                              "spl_token_2022::pod::PodAccount",
                                              "delegated_amount"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  BinOp.Pure.lt
                                                    (M.read (| delegated_amount |))
                                                    (M.read (| 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"
                                                      [
                                                        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::InsufficientFunds"
                                                              []
                                                          ]
                                                        |)
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                UnOp.Pure.not (M.read (| self_transfer |))
                                              |)) 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 (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    source_account,
                                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                    "base"
                                                  |)
                                                |),
                                                "spl_token_2022::pod::PodAccount",
                                                "delegated_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.read (| delegated_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.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        BinOp.Pure.eq
                                                          (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 (|
                                                                      source_account,
                                                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                                      "base"
                                                                    |)
                                                                  |),
                                                                  "spl_token_2022::pod::PodAccount",
                                                                  "delegated_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 (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            source_account,
                                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                            "base"
                                                          |)
                                                        |),
                                                        "spl_token_2022::pod::PodAccount",
                                                        "delegate"
                                                      |),
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "spl_token_2022::pod::PodCOption")
                                                            [
                                                              Ty.path
                                                                "solana_program::pubkey::Pubkey"
                                                            ],
                                                          "none",
                                                          []
                                                        |),
                                                        []
                                                      |)
                                                    |) in
                                                  M.alloc (| Value.Tuple [] |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.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 (|
                                                      source_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
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                                  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",
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::cpi_guard::CpiGuard"
                                                  ]
                                                |),
                                                [ source_account ]
                                              |)
                                            |) in
                                          let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::result::Result::Ok",
                                              0
                                            |) in
                                          let cpi_guard := M.copy (| γ0_0 |) in
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        LogicalOp.and (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::convert::Into",
                                                              Ty.path
                                                                "spl_pod::primitives::PodBool",
                                                              [ Ty.path "bool" ],
                                                              "into",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (| cpi_guard |),
                                                                  "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                                  "lock_cpi"
                                                                |)
                                                              |)
                                                            ]
                                                          |),
                                                          ltac:(M.monadic
                                                            (M.call_closure (|
                                                              M.get_function (|
                                                                "spl_token_2022::extension::cpi_guard::in_cpi",
                                                                []
                                                              |),
                                                              []
                                                            |)))
                                                        |)
                                                      |)) 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::CpiGuardTransferBlocked"
                                                                    []
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              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::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 _ :=
                          M.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 _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ := M.use self_transfer 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::Ok"
                                            [ Value.Tuple [] ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        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 (| 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_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 (|
                                        UnOp.Pure.not
                                          (M.call_closure (|
                                            M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    source_account,
                                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                    "base"
                                                  |)
                                                |),
                                                "spl_token_2022::pod::PodAccount",
                                                "mint"
                                              |);
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    destination_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 (| 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_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 _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "spl_token_2022::extension::BaseStateWithExtensions",
                                          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",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                          ]
                                        |),
                                        [ destination_account ]
                                      |)
                                    |) in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Ok",
                                      0
                                    |) in
                                  let confidential_transfer_state := M.copy (| γ0_0 |) in
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.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",
                                              "non_confidential_transfer_allowed",
                                              []
                                            |),
                                            [ M.read (| confidential_transfer_state |) ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                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 (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        let _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  source_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.read (| source_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 credited_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.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.read (| amount |); M.read (| fee |) ]
                                        |);
                                        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 _ :=
                          M.write (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (|
                                M.SubPointer.get_struct_record_field (|
                                  destination_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 (|
                                                              destination_account,
                                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                              "base"
                                                            |)
                                                          |),
                                                          "spl_token_2022::pod::PodAccount",
                                                          "amount"
                                                        |)
                                                      |)
                                                    ]
                                                  |);
                                                  M.read (| credited_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 _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        BinOp.Pure.gt (M.read (| fee |)) (Value.Integer 0)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.alloc (|
                                              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::transfer_fee::TransferFeeAmount"
                                                  ]
                                                |),
                                                [ destination_account ]
                                              |)
                                            |) in
                                          let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::result::Result::Ok",
                                              0
                                            |) in
                                          let extension := M.copy (| γ0_0 |) in
                                          let new_withheld_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.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 (| extension |),
                                                                      "spl_token_2022::extension::transfer_fee::TransferFeeAmount",
                                                                      "withheld_amount"
                                                                    |)
                                                                  |)
                                                                ]
                                                              |);
                                                              M.read (| fee |)
                                                            ]
                                                          |);
                                                          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 _ :=
                                            M.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::transfer_fee::TransferFeeAmount",
                                                "withheld_amount"
                                              |),
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::convert::Into",
                                                  Ty.path "u64",
                                                  [ Ty.path "spl_pod::primitives::PodU64" ],
                                                  "into",
                                                  []
                                                |),
                                                [ M.read (| new_withheld_amount |) ]
                                              |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  Value.StructTuple
                                                    "core::result::Result::Err"
                                                    [
                                                      M.call_closure (|
                                                        M.get_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::InvalidState"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)));
                              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.path "spl_token_2022::pod::PodAccount",
                                            "is_native",
                                            []
                                          |),
                                          [
                                            M.read (|
                                              M.SubPointer.get_struct_record_field (|
                                                source_account,
                                                "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                "base"
                                              |)
                                            |)
                                          ]
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let source_starting_lamports :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "lamports",
                                          []
                                        |),
                                        [ M.read (| source_account_info |) ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.write (|
                                      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.path "u64" ] ],
                                            [],
                                            "deref_mut",
                                            []
                                          |),
                                          [
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::cell::RefCell")
                                                    [ Ty.apply (Ty.path "&mut") [ Ty.path "u64" ] ],
                                                  "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.path "u64" ]
                                                            ];
                                                          Ty.path "alloc::alloc::Global"
                                                        ],
                                                      [],
                                                      "deref",
                                                      []
                                                    |),
                                                    [
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| source_account_info |),
                                                        "solana_program::account_info::AccountInfo",
                                                        "lamports"
                                                      |)
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |)
                                          ]
                                        |)
                                      |),
                                      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.read (| source_starting_lamports |);
                                                        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 destination_starting_lamports :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "lamports",
                                          []
                                        |),
                                        [ M.read (| destination_account_info |) ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.write (|
                                      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.path "u64" ] ],
                                            [],
                                            "deref_mut",
                                            []
                                          |),
                                          [
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::cell::RefCell")
                                                    [ Ty.apply (Ty.path "&mut") [ Ty.path "u64" ] ],
                                                  "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.path "u64" ]
                                                            ];
                                                          Ty.path "alloc::alloc::Global"
                                                        ],
                                                      [],
                                                      "deref",
                                                      []
                                                    |),
                                                    [
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| destination_account_info |),
                                                        "solana_program::account_info::AccountInfo",
                                                        "lamports"
                                                      |)
                                                    ]
                                                  |)
                                                ]
                                              |)
                                            |)
                                          ]
                                        |)
                                      |),
                                      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.read (| destination_starting_lamports |);
                                                        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.Tuple [] |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        let _ :=
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ := maybe_transfer_hook_program_id in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::option::Option::Some",
                                      0
                                    |) in
                                  let program_id := M.copy (| γ0_0 |) in
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ := expected_mint_info in
                                          let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::option::Option::Some",
                                              0
                                            |) in
                                          let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                                          let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                                          let mint_info := M.copy (| γ1_0 |) in
                                          let _ :=
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::Try",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.tuple [];
                                                        Ty.path
                                                          "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
                                          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
                                          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 (| source_account_data |) ]
                                              |)
                                            |) 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 (| destination_account_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 (| 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
                                                                        "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 (|
                                            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::MintRequiredForTransfer"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |) in
                        M.alloc (|
                          Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_transfer :
      M.IsAssociatedFunction Self "process_transfer" process_transfer.
    
    (*
        pub fn process_approve(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
            amount: u64,
            expected_decimals: Option<u8>,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
    
            let source_account_info = next_account_info(account_info_iter)?;
    
            let expected_mint_info = if let Some(expected_decimals) = expected_decimals {
                Some((next_account_info(account_info_iter)?, expected_decimals))
            } else {
                None
            };
            let delegate_info = next_account_info(account_info_iter)?;
            let owner_info = next_account_info(account_info_iter)?;
            let owner_info_data_len = owner_info.data_len();
    
            let mut source_account_data = source_account_info.data.borrow_mut();
            let source_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut source_account_data)?;
    
            if source_account.base.is_frozen() {
                return Err(TokenError::AccountFrozen.into());
            }
    
            if let Some((mint_info, expected_decimals)) = expected_mint_info {
                if !cmp_pubkeys(&source_account.base.mint, mint_info.key) {
                    return Err(TokenError::MintMismatch.into());
                }
    
                let mint_data = mint_info.data.borrow();
                let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)?;
                if expected_decimals != mint.base.decimals {
                    return Err(TokenError::MintDecimalsMismatch.into());
                }
            }
    
            Self::validate_owner(
                program_id,
                &source_account.base.owner,
                owner_info,
                owner_info_data_len,
                account_info_iter.as_slice(),
            )?;
    
            if let Ok(cpi_guard) = source_account.get_extension::<CpiGuard>() {
                if cpi_guard.lock_cpi.into() && in_cpi() {
                    return Err(TokenError::CpiGuardApproveBlocked.into());
                }
            }
    
            source_account.base.delegate = PodCOption::some( *delegate_info.key);
            source_account.base.delegated_amount = amount.into();
    
            Ok(())
        }
    *)
    Definition process_approve (τ : 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 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 expected_mint_info :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ := expected_decimals in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::option::Option::Some",
                                0
                              |) in
                            let expected_decimals := M.copy (| γ0_0 |) in
                            M.alloc (|
                              Value.StructTuple
                                "core::option::Option::Some"
                                [
                                  Value.Tuple
                                    [
                                      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
                                                          "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))
                                          ]
                                        |)
                                      |);
                                      M.read (| expected_decimals |)
                                    ]
                                ]
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
                      ]
                    |)
                  |) in
                let delegate_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 owner_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 owner_info_data_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "data_len",
                        []
                      |),
                      [ M.read (| owner_info |) ]
                    |)
                  |) in
                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 (| 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 (|
                                        source_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 γ := expected_mint_info in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::option::Option::Some",
                              0
                            |) in
                          let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in
                          let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in
                          let mint_info := M.copy (| γ1_0 |) in
                          let expected_decimals := M.copy (| γ1_1 |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          UnOp.Pure.not
                                            (M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::cmp_pubkeys",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (|
                                                    M.SubPointer.get_struct_record_field (|
                                                      source_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 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",
                                  []
                                |),
                                [
                                  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",
                                                []
                                              |),
                                              [ 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
                          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 [] |)))
                            ]
                          |)));
                      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 (|
                                    source_account,
                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                    "base"
                                  |)
                                |),
                                "spl_token_2022::pod::PodAccount",
                                "owner"
                              |);
                              M.read (| owner_info |);
                              M.read (| owner_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.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                  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",
                                  [ Ty.path "spl_token_2022::extension::cpi_guard::CpiGuard" ]
                                |),
                                [ source_account ]
                              |)
                            |) in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let cpi_guard := M.copy (| γ0_0 |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        LogicalOp.and (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::convert::Into",
                                              Ty.path "spl_pod::primitives::PodBool",
                                              [ Ty.path "bool" ],
                                              "into",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| cpi_guard |),
                                                  "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                  "lock_cpi"
                                                |)
                                              |)
                                            ]
                                          |),
                                          ltac:(M.monadic
                                            (M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::extension::cpi_guard::in_cpi",
                                                []
                                              |),
                                              []
                                            |)))
                                        |)
                                      |)) 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::CpiGuardApproveBlocked"
                                                    []
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |)));
                      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 (|
                          source_account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "delegate"
                    |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "solana_program::pubkey::Pubkey" ],
                        "some",
                        []
                      |),
                      [
                        M.read (|
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| delegate_info |),
                              "solana_program::account_info::AccountInfo",
                              "key"
                            |)
                          |)
                        |)
                      ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          source_account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "delegated_amount"
                    |),
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::convert::Into",
                        Ty.path "u64",
                        [ Ty.path "spl_pod::primitives::PodU64" ],
                        "into",
                        []
                      |),
                      [ M.read (| amount |) ]
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_approve :
      M.IsAssociatedFunction Self "process_approve" process_approve.
    
    (*
        pub fn process_revoke(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let source_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();
    
            let mut source_account_data = source_account_info.data.borrow_mut();
            let source_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut source_account_data)?;
            if source_account.base.is_frozen() {
                return Err(TokenError::AccountFrozen.into());
            }
    
            Self::validate_owner(
                program_id,
                match &source_account.base.delegate {
                    PodCOption {
                        option: PodCOption::<Pubkey>::SOME,
                        value: delegate,
                    } if cmp_pubkeys(authority_info.key, delegate) => delegate,
                    _ => &source_account.base.owner,
                },
                authority_info,
                authority_info_data_len,
                account_info_iter.as_slice(),
            )?;
    
            source_account.base.delegate = PodCOption::none();
            source_account.base.delegated_amount = 0.into();
    
            Ok(())
        }
    *)
    Definition process_revoke (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; accounts ] =>
        ltac:(M.monadic
          (let program_id := M.alloc (| program_id |) in
          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 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 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 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 (| 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 (|
                                        source_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 (|
                      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.read (|
                                M.match_operator (|
                                  M.alloc (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          source_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |),
                                      "spl_token_2022::pod::PodAccount",
                                      "delegate"
                                    |)
                                  |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ := M.read (| γ |) in
                                        let γ1_0 :=
                                          M.SubPointer.get_struct_record_field (|
                                            γ,
                                            "spl_token_2022::pod::PodCOption",
                                            "option"
                                          |) in
                                        let γ1_1 :=
                                          M.SubPointer.get_struct_record_field (|
                                            γ,
                                            "spl_token_2022::pod::PodCOption",
                                            "value"
                                          |) in
                                        let γ2_0 := M.SubPointer.get_slice_index (| γ1_0, 0 |) in
                                        let γ2_1 := M.SubPointer.get_slice_index (| γ1_0, 1 |) in
                                        let γ2_2 := M.SubPointer.get_slice_index (| γ1_0, 2 |) in
                                        let γ2_3 := M.SubPointer.get_slice_index (| γ1_0, 3 |) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ2_0 |),
                                            Value.Integer 1
                                          |) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ2_1 |),
                                            Value.Integer 0
                                          |) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ2_2 |),
                                            Value.Integer 0
                                          |) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ2_3 |),
                                            Value.Integer 0
                                          |) in
                                        let delegate := M.alloc (| γ1_1 |) in
                                        let γ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::cmp_pubkeys",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| authority_info |),
                                                    "solana_program::account_info::AccountInfo",
                                                    "key"
                                                  |)
                                                |);
                                                M.read (| delegate |)
                                              ]
                                            |)
                                          |) in
                                        let _ :=
                                          M.is_constant_or_break_match (|
                                            M.read (| γ |),
                                            Value.Bool true
                                          |) in
                                        M.alloc (| M.read (| delegate |) |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (M.alloc (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (|
                                              M.SubPointer.get_struct_record_field (|
                                                source_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.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          source_account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "delegate"
                    |),
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "solana_program::pubkey::Pubkey" ],
                        "none",
                        []
                      |),
                      []
                    |)
                  |) in
                let _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          source_account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "delegated_amount"
                    |),
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::convert::Into",
                        Ty.path "u64",
                        [ Ty.path "spl_pod::primitives::PodU64" ],
                        "into",
                        []
                      |),
                      [ Value.Integer 0 ]
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_revoke :
      M.IsAssociatedFunction Self "process_revoke" process_revoke.
    
    (*
        pub fn process_set_authority(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
            authority_type: AuthorityType,
            new_authority: PodCOption<Pubkey>,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let 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();
    
            let mut account_data = account_info.data.borrow_mut();
            if let Ok(mut account) = PodStateWithExtensionsMut::<PodAccount>::unpack(&mut account_data)
            {
                if account.base.is_frozen() {
                    return Err(TokenError::AccountFrozen.into());
                }
    
                match authority_type {
                    AuthorityType::AccountOwner => {
                        Self::validate_owner(
                            program_id,
                            &account.base.owner,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
    
                        if account.get_extension_mut::<ImmutableOwner>().is_ok() {
                            return Err(TokenError::ImmutableOwner.into());
                        }
    
                        if let Ok(cpi_guard) = account.get_extension::<CpiGuard>() {
                            if cpi_guard.lock_cpi.into() && in_cpi() {
                                return Err(TokenError::CpiGuardSetAuthorityBlocked.into());
                            } else if cpi_guard.lock_cpi.into() {
                                return Err(TokenError::CpiGuardOwnerChangeBlocked.into());
                            }
                        }
    
                        if let PodCOption {
                            option: PodCOption::<Pubkey>::SOME,
                            value: authority,
                        } = new_authority
                        {
                            account.base.owner = authority;
                        } else {
                            return Err(TokenError::InvalidInstruction.into());
                        }
    
                        account.base.delegate = PodCOption::none();
                        account.base.delegated_amount = 0.into();
    
                        if account.base.is_native() {
                            account.base.close_authority = PodCOption::none();
                        }
                    }
                    AuthorityType::CloseAccount => {
                        let authority = account.base.close_authority.unwrap_or(account.base.owner);
                        Self::validate_owner(
                            program_id,
                            &authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
    
                        if let Ok(cpi_guard) = account.get_extension::<CpiGuard>() {
                            if cpi_guard.lock_cpi.into() && in_cpi() && new_authority.is_some() {
                                return Err(TokenError::CpiGuardSetAuthorityBlocked.into());
                            }
                        }
    
                        account.base.close_authority = new_authority;
                    }
                    _ => {
                        return Err(TokenError::AuthorityTypeNotSupported.into());
                    }
                }
            } else if let Ok(mut mint) = PodStateWithExtensionsMut::<PodMint>::unpack(&mut account_data)
            {
                match authority_type {
                    AuthorityType::MintTokens => {
                        // Once a mint's supply is fixed, it cannot be undone by setting a new
                        // mint_authority
                        let mint_authority = mint
                            .base
                            .mint_authority
                            .ok_or(Into::<ProgramError>::into(TokenError::FixedSupply))?;
                        Self::validate_owner(
                            program_id,
                            &mint_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        mint.base.mint_authority = new_authority;
                    }
                    AuthorityType::FreezeAccount => {
                        // Once a mint's freeze authority is disabled, it cannot be re-enabled by
                        // setting a new freeze_authority
                        let freeze_authority = mint
                            .base
                            .freeze_authority
                            .ok_or(Into::<ProgramError>::into(TokenError::MintCannotFreeze))?;
                        Self::validate_owner(
                            program_id,
                            &freeze_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        mint.base.freeze_authority = new_authority;
                    }
                    AuthorityType::CloseMint => {
                        let extension = mint.get_extension_mut::<MintCloseAuthority>()?;
                        let maybe_close_authority: Option<Pubkey> = extension.close_authority.into();
                        let close_authority =
                            maybe_close_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &close_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.close_authority = new_authority.try_into()?;
                    }
                    AuthorityType::TransferFeeConfig => {
                        let extension = mint.get_extension_mut::<TransferFeeConfig>()?;
                        let maybe_transfer_fee_config_authority: Option<Pubkey> =
                            extension.transfer_fee_config_authority.into();
                        let transfer_fee_config_authority = maybe_transfer_fee_config_authority
                            .ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &transfer_fee_config_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.transfer_fee_config_authority = new_authority.try_into()?;
                    }
                    AuthorityType::WithheldWithdraw => {
                        let extension = mint.get_extension_mut::<TransferFeeConfig>()?;
                        let maybe_withdraw_withheld_authority: Option<Pubkey> =
                            extension.withdraw_withheld_authority.into();
                        let withdraw_withheld_authority = maybe_withdraw_withheld_authority
                            .ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &withdraw_withheld_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.withdraw_withheld_authority = new_authority.try_into()?;
                    }
                    AuthorityType::InterestRate => {
                        let extension = mint.get_extension_mut::<InterestBearingConfig>()?;
                        let maybe_rate_authority: Option<Pubkey> = extension.rate_authority.into();
                        let rate_authority =
                            maybe_rate_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &rate_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.rate_authority = new_authority.try_into()?;
                    }
                    AuthorityType::PermanentDelegate => {
                        let extension = mint.get_extension_mut::<PermanentDelegate>()?;
                        let maybe_delegate: Option<Pubkey> = extension.delegate.into();
                        let delegate = maybe_delegate.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &delegate,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.delegate = new_authority.try_into()?;
                    }
                    AuthorityType::ConfidentialTransferMint => {
                        let extension = mint.get_extension_mut::<ConfidentialTransferMint>()?;
                        let maybe_confidential_transfer_mint_authority: Option<Pubkey> =
                            extension.authority.into();
                        let confidential_transfer_mint_authority =
                            maybe_confidential_transfer_mint_authority
                                .ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &confidential_transfer_mint_authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.authority = new_authority.try_into()?;
                    }
                    AuthorityType::TransferHookProgramId => {
                        let extension = mint.get_extension_mut::<TransferHook>()?;
                        let maybe_authority: Option<Pubkey> = extension.authority.into();
                        let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.authority = new_authority.try_into()?;
                    }
                    AuthorityType::ConfidentialTransferFeeConfig => {
                        let extension = mint.get_extension_mut::<ConfidentialTransferFeeConfig>()?;
                        let maybe_authority: Option<Pubkey> = extension.authority.into();
                        let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.authority = new_authority.try_into()?;
                    }
                    AuthorityType::MetadataPointer => {
                        let extension = mint.get_extension_mut::<MetadataPointer>()?;
                        let maybe_authority: Option<Pubkey> = extension.authority.into();
                        let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.authority = new_authority.try_into()?;
                    }
                    AuthorityType::GroupPointer => {
                        let extension = mint.get_extension_mut::<GroupPointer>()?;
                        let maybe_authority: Option<Pubkey> = extension.authority.into();
                        let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.authority = new_authority.try_into()?;
                    }
                    AuthorityType::GroupMemberPointer => {
                        let extension = mint.get_extension_mut::<GroupMemberPointer>()?;
                        let maybe_authority: Option<Pubkey> = extension.authority.into();
                        let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                        Self::validate_owner(
                            program_id,
                            &authority,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
                        extension.authority = new_authority.try_into()?;
                    }
                    _ => {
                        return Err(TokenError::AuthorityTypeNotSupported.into());
                    }
                }
            } else {
                return Err(ProgramError::InvalidAccountData);
            }
    
            Ok(())
        }
    *)
    Definition process_set_authority (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; accounts; authority_type; new_authority ] =>
        ltac:(M.monadic
          (let program_id := M.alloc (| program_id |) in
          let accounts := M.alloc (| accounts |) in
          let authority_type := M.alloc (| authority_type |) in
          let new_authority := M.alloc (| new_authority |) 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 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 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 (| account_info |),
                              "solana_program::account_info::AccountInfo",
                              "data"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.alloc (|
                              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",
                                        []
                                      |),
                                      [ account_data ]
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let account := 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_associated_function (|
                                              Ty.path "spl_token_2022::pod::PodAccount",
                                              "is_frozen",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  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
                          M.match_operator (|
                            authority_type,
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.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 (|
                                                      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.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&mut")
                                                            [
                                                              Ty.path
                                                                "spl_token_2022::extension::immutable_owner::ImmutableOwner"
                                                            ];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      "is_ok",
                                                      []
                                                    |),
                                                    [
                                                      M.alloc (|
                                                        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::immutable_owner::ImmutableOwner"
                                                            ]
                                                          |),
                                                          [ account ]
                                                        |)
                                                      |)
                                                    ]
                                                  |)
                                                |)) 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::ImmutableOwner"
                                                              []
                                                          ]
                                                        |)
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "spl_token_2022::extension::BaseStateWithExtensions",
                                                    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",
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::cpi_guard::CpiGuard"
                                                    ]
                                                  |),
                                                  [ account ]
                                                |)
                                              |) in
                                            let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::result::Result::Ok",
                                                0
                                              |) in
                                            let cpi_guard := M.copy (| γ0_0 |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          LogicalOp.and (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::convert::Into",
                                                                Ty.path
                                                                  "spl_pod::primitives::PodBool",
                                                                [ Ty.path "bool" ],
                                                                "into",
                                                                []
                                                              |),
                                                              [
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| cpi_guard |),
                                                                    "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                                    "lock_cpi"
                                                                  |)
                                                                |)
                                                              ]
                                                            |),
                                                            ltac:(M.monadic
                                                              (M.call_closure (|
                                                                M.get_function (|
                                                                  "spl_token_2022::extension::cpi_guard::in_cpi",
                                                                  []
                                                                |),
                                                                []
                                                              |)))
                                                          |)
                                                        |)) 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::CpiGuardSetAuthorityBlocked"
                                                                      []
                                                                  ]
                                                                |)
                                                              ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (M.match_operator (|
                                                      M.alloc (| Value.Tuple [] |),
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (let γ :=
                                                              M.use
                                                                (M.alloc (|
                                                                  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 (| cpi_guard |),
                                                                          "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                                          "lock_cpi"
                                                                        |)
                                                                      |)
                                                                    ]
                                                                  |)
                                                                |)) 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::CpiGuardOwnerChangeBlocked"
                                                                              []
                                                                          ]
                                                                        |)
                                                                      ]
                                                                  |)
                                                                |)
                                                              |)
                                                            |)));
                                                        fun γ =>
                                                          ltac:(M.monadic
                                                            (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 γ := new_authority in
                                            let γ0_0 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "spl_token_2022::pod::PodCOption",
                                                "option"
                                              |) in
                                            let γ0_1 :=
                                              M.SubPointer.get_struct_record_field (|
                                                γ,
                                                "spl_token_2022::pod::PodCOption",
                                                "value"
                                              |) in
                                            let γ1_0 :=
                                              M.SubPointer.get_slice_index (| γ0_0, 0 |) in
                                            let γ1_1 :=
                                              M.SubPointer.get_slice_index (| γ0_0, 1 |) in
                                            let γ1_2 :=
                                              M.SubPointer.get_slice_index (| γ0_0, 2 |) in
                                            let γ1_3 :=
                                              M.SubPointer.get_slice_index (| γ0_0, 3 |) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ1_0 |),
                                                Value.Integer 1
                                              |) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ1_1 |),
                                                Value.Integer 0
                                              |) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ1_2 |),
                                                Value.Integer 0
                                              |) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ1_3 |),
                                                Value.Integer 0
                                              |) in
                                            let authority := M.copy (| γ0_1 |) in
                                            let _ :=
                                              M.write (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (|
                                                    M.SubPointer.get_struct_record_field (|
                                                      account,
                                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                      "base"
                                                    |)
                                                  |),
                                                  "spl_token_2022::pod::PodAccount",
                                                  "owner"
                                                |),
                                                M.read (| authority |)
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    Value.StructTuple
                                                      "core::result::Result::Err"
                                                      [
                                                        M.call_closure (|
                                                          M.get_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::InvalidInstruction"
                                                              []
                                                          ]
                                                        |)
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)))
                                      ]
                                    |) in
                                  let _ :=
                                    M.write (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "delegate"
                                      |),
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "spl_token_2022::pod::PodCOption")
                                            [ Ty.path "solana_program::pubkey::Pubkey" ],
                                          "none",
                                          []
                                        |),
                                        []
                                      |)
                                    |) in
                                  let _ :=
                                    M.write (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "delegated_amount"
                                      |),
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::Into",
                                          Ty.path "u64",
                                          [ Ty.path "spl_pod::primitives::PodU64" ],
                                          "into",
                                          []
                                        |),
                                        [ Value.Integer 0 ]
                                      |)
                                    |) in
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                M.call_closure (|
                                                  M.get_associated_function (|
                                                    Ty.path "spl_token_2022::pod::PodAccount",
                                                    "is_native",
                                                    []
                                                  |),
                                                  [
                                                    M.read (|
                                                      M.SubPointer.get_struct_record_field (|
                                                        account,
                                                        "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                        "base"
                                                      |)
                                                    |)
                                                  ]
                                                |)
                                              |)) 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 (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    account,
                                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                    "base"
                                                  |)
                                                |),
                                                "spl_token_2022::pod::PodAccount",
                                                "close_authority"
                                              |),
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                                  "none",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let authority :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "spl_token_2022::pod::PodCOption")
                                            [ Ty.path "solana_program::pubkey::Pubkey" ],
                                          "unwrap_or",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  account,
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                  "base"
                                                |)
                                              |),
                                              "spl_token_2022::pod::PodAccount",
                                              "close_authority"
                                            |)
                                          |);
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  account,
                                                  "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                  "base"
                                                |)
                                              |),
                                              "spl_token_2022::pod::PodAccount",
                                              "owner"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) 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 |);
                                                authority;
                                                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.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "spl_token_2022::extension::BaseStateWithExtensions",
                                                    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",
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::extension::cpi_guard::CpiGuard"
                                                    ]
                                                  |),
                                                  [ account ]
                                                |)
                                              |) in
                                            let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::result::Result::Ok",
                                                0
                                              |) in
                                            let cpi_guard := M.copy (| γ0_0 |) in
                                            M.match_operator (|
                                              M.alloc (| Value.Tuple [] |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ :=
                                                      M.use
                                                        (M.alloc (|
                                                          LogicalOp.and (|
                                                            LogicalOp.and (|
                                                              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 (| cpi_guard |),
                                                                      "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                                      "lock_cpi"
                                                                    |)
                                                                  |)
                                                                ]
                                                              |),
                                                              ltac:(M.monadic
                                                                (M.call_closure (|
                                                                  M.get_function (|
                                                                    "spl_token_2022::extension::cpi_guard::in_cpi",
                                                                    []
                                                                  |),
                                                                  []
                                                                |)))
                                                            |),
                                                            ltac:(M.monadic
                                                              (M.call_closure (|
                                                                M.get_associated_function (|
                                                                  Ty.apply
                                                                    (Ty.path
                                                                      "spl_token_2022::pod::PodCOption")
                                                                    [
                                                                      Ty.path
                                                                        "solana_program::pubkey::Pubkey"
                                                                    ],
                                                                  "is_some",
                                                                  []
                                                                |),
                                                                [ new_authority ]
                                                              |)))
                                                          |)
                                                        |)) 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::CpiGuardSetAuthorityBlocked"
                                                                      []
                                                                  ]
                                                                |)
                                                              ]
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                              ]
                                            |)));
                                        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 (|
                                            account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "close_authority"
                                      |),
                                      M.read (| new_authority |)
                                    |) in
                                  M.alloc (| Value.Tuple [] |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          Value.StructTuple
                                            "core::result::Result::Err"
                                            [
                                              M.call_closure (|
                                                M.get_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::AuthorityTypeNotSupported"
                                                    []
                                                ]
                                              |)
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)))
                            ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.alloc (|
                                      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",
                                                []
                                              |),
                                              [ account_data ]
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Ok",
                                      0
                                    |) in
                                  let mint := M.copy (| γ0_0 |) in
                                  M.match_operator (|
                                    authority_type,
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let 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
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "spl_token_2022::pod::PodCOption")
                                                            [
                                                              Ty.path
                                                                "solana_program::pubkey::Pubkey"
                                                            ],
                                                          "ok_or",
                                                          [
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ]
                                                        |),
                                                        [
                                                          M.read (|
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  mint,
                                                                  "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                                  "base"
                                                                |)
                                                              |),
                                                              "spl_token_2022::pod::PodMint",
                                                              "mint_authority"
                                                            |)
                                                          |);
                                                          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::FixedSupply"
                                                                []
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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 |);
                                                        mint_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    mint,
                                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                    "base"
                                                  |)
                                                |),
                                                "spl_token_2022::pod::PodMint",
                                                "mint_authority"
                                              |),
                                              M.read (| new_authority |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let freeze_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
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_associated_function (|
                                                          Ty.apply
                                                            (Ty.path
                                                              "spl_token_2022::pod::PodCOption")
                                                            [
                                                              Ty.path
                                                                "solana_program::pubkey::Pubkey"
                                                            ],
                                                          "ok_or",
                                                          [
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ]
                                                        |),
                                                        [
                                                          M.read (|
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  mint,
                                                                  "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                                  "base"
                                                                |)
                                                              |),
                                                              "spl_token_2022::pod::PodMint",
                                                              "freeze_authority"
                                                            |)
                                                          |);
                                                          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::MintCannotFreeze"
                                                                []
                                                            ]
                                                          |)
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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 |);
                                                        freeze_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    mint,
                                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                    "base"
                                                  |)
                                                |),
                                                "spl_token_2022::pod::PodMint",
                                                "freeze_authority"
                                              |),
                                              M.read (| new_authority |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let extension :=
                                            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::mint_close_authority::MintCloseAuthority"
                                                            ];
                                                          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::mint_close_authority::MintCloseAuthority"
                                                          ]
                                                        |),
                                                        [ 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_close_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 (| extension |),
                                                      "spl_token_2022::extension::mint_close_authority::MintCloseAuthority",
                                                      "close_authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let close_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_close_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        close_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::mint_close_authority::MintCloseAuthority",
                                                "close_authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::transfer_fee::TransferFeeConfig"
                                                            ];
                                                          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::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 maybe_transfer_fee_config_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 (| extension |),
                                                      "spl_token_2022::extension::transfer_fee::TransferFeeConfig",
                                                      "transfer_fee_config_authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let transfer_fee_config_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_transfer_fee_config_authority
                                                          |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        transfer_fee_config_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::transfer_fee::TransferFeeConfig",
                                                "transfer_fee_config_authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::transfer_fee::TransferFeeConfig"
                                                            ];
                                                          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::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 maybe_withdraw_withheld_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 (| extension |),
                                                      "spl_token_2022::extension::transfer_fee::TransferFeeConfig",
                                                      "withdraw_withheld_authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let withdraw_withheld_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_withdraw_withheld_authority
                                                          |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        withdraw_withheld_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::transfer_fee::TransferFeeConfig",
                                                "withdraw_withheld_authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::interest_bearing_mint::InterestBearingConfig"
                                                            ];
                                                          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::interest_bearing_mint::InterestBearingConfig"
                                                          ]
                                                        |),
                                                        [ 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_rate_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 (| extension |),
                                                      "spl_token_2022::extension::interest_bearing_mint::InterestBearingConfig",
                                                      "rate_authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let rate_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_rate_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        rate_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::interest_bearing_mint::InterestBearingConfig",
                                                "rate_authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::permanent_delegate::PermanentDelegate"
                                                            ];
                                                          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::permanent_delegate::PermanentDelegate"
                                                          ]
                                                        |),
                                                        [ 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_delegate :=
                                            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 (| extension |),
                                                      "spl_token_2022::extension::permanent_delegate::PermanentDelegate",
                                                      "delegate"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let delegate :=
                                            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_delegate |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        delegate;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::permanent_delegate::PermanentDelegate",
                                                "delegate"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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 (| extension |),
                                                      "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::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        confidential_transfer_mint_authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferMint",
                                                "authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::transfer_hook::TransferHook"
                                                            ];
                                                          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::transfer_hook::TransferHook"
                                                          ]
                                                        |),
                                                        [ 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_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 (| extension |),
                                                      "spl_token_2022::extension::transfer_hook::TransferHook",
                                                      "authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let 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_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::transfer_hook::TransferHook",
                                                "authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::ConfidentialTransferFeeConfig"
                                                            ];
                                                          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_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 maybe_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 (| extension |),
                                                      "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeConfig",
                                                      "authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let 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_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeConfig",
                                                "authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::metadata_pointer::MetadataPointer"
                                                            ];
                                                          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::metadata_pointer::MetadataPointer"
                                                          ]
                                                        |),
                                                        [ 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_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 (| extension |),
                                                      "spl_token_2022::extension::metadata_pointer::MetadataPointer",
                                                      "authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let 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_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::metadata_pointer::MetadataPointer",
                                                "authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::group_pointer::GroupPointer"
                                                            ];
                                                          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::group_pointer::GroupPointer"
                                                          ]
                                                        |),
                                                        [ 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_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 (| extension |),
                                                      "spl_token_2022::extension::group_pointer::GroupPointer",
                                                      "authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let 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_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::group_pointer::GroupPointer",
                                                "authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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
                                          (let extension :=
                                            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::group_member_pointer::GroupMemberPointer"
                                                            ];
                                                          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::group_member_pointer::GroupMemberPointer"
                                                          ]
                                                        |),
                                                        [ 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_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 (| extension |),
                                                      "spl_token_2022::extension::group_member_pointer::GroupMemberPointer",
                                                      "authority"
                                                    |)
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          let 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_authority |);
                                                          Value.StructTuple
                                                            "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            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::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        authority;
                                                        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.write (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| extension |),
                                                "spl_token_2022::extension::group_member_pointer::GroupMemberPointer",
                                                "authority"
                                              |),
                                              M.read (|
                                                M.match_operator (|
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::Try",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::TryInto",
                                                            Ty.apply
                                                              (Ty.path
                                                                "spl_token_2022::pod::PodCOption")
                                                              [
                                                                Ty.path
                                                                  "solana_program::pubkey::Pubkey"
                                                              ],
                                                            [
                                                              Ty.path
                                                                "spl_pod::optional_keys::OptionalNonZeroPubkey"
                                                            ],
                                                            "try_into",
                                                            []
                                                          |),
                                                          [ M.read (| new_authority |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              M.return_ (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::ops::try_trait::FromResidual",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.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 (|
                                            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::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          Value.StructTuple
                                            "core::result::Result::Err"
                                            [
                                              Value.StructTuple
                                                "solana_program::program_error::ProgramError::InvalidAccountData"
                                                []
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)))
                            ]
                          |)))
                    ]
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_set_authority :
      M.IsAssociatedFunction Self "process_set_authority" process_set_authority.
    
    (*
        pub fn process_mint_to(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
            amount: u64,
            expected_decimals: Option<u8>,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let mint_info = next_account_info(account_info_iter)?;
            let destination_account_info = next_account_info(account_info_iter)?;
            let owner_info = next_account_info(account_info_iter)?;
            let owner_info_data_len = owner_info.data_len();
    
            let mut destination_account_data = destination_account_info.data.borrow_mut();
            let destination_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut destination_account_data)?;
            if destination_account.base.is_frozen() {
                return Err(TokenError::AccountFrozen.into());
            }
    
            if destination_account.base.is_native() {
                return Err(TokenError::NativeNotSupported.into());
            }
            if !cmp_pubkeys(mint_info.key, &destination_account.base.mint) {
                return Err(TokenError::MintMismatch.into());
            }
    
            let mut mint_data = mint_info.data.borrow_mut();
            let mint = PodStateWithExtensionsMut::<PodMint>::unpack(&mut mint_data)?;
    
            // If the mint if non-transferable, only allow minting to accounts
            // with immutable ownership.
            if mint.get_extension::<NonTransferable>().is_ok()
                && destination_account
                    .get_extension::<ImmutableOwner>()
                    .is_err()
            {
                return Err(TokenError::NonTransferableNeedsImmutableOwnership.into());
            }
    
            if let Some(expected_decimals) = expected_decimals {
                if expected_decimals != mint.base.decimals {
                    return Err(TokenError::MintDecimalsMismatch.into());
                }
            }
    
            match &mint.base.mint_authority {
                PodCOption {
                    option: PodCOption::<Pubkey>::SOME,
                    value: mint_authority,
                } => Self::validate_owner(
                    program_id,
                    mint_authority,
                    owner_info,
                    owner_info_data_len,
                    account_info_iter.as_slice(),
                )?,
                _ => return Err(TokenError::FixedSupply.into()),
            }
    
            // Revisit this later to see if it's worth adding a check to reduce
            // compute costs, ie:
            // if amount == 0
            check_program_account(mint_info.owner)?;
            check_program_account(destination_account_info.owner)?;
    
            destination_account.base.amount = u64::from(destination_account.base.amount)
                .checked_add(amount)
                .ok_or(TokenError::Overflow)?
                .into();
    
            mint.base.supply = u64::from(mint.base.supply)
                .checked_add(amount)
                .ok_or(TokenError::Overflow)?
                .into();
    
            Ok(())
        }
    *)
    Definition process_mint_to (τ : 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 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 owner_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 owner_info_data_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "data_len",
                        []
                      |),
                      [ M.read (| owner_info |) ]
                    |)
                  |) in
                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 (| 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_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_associated_function (|
                                    Ty.path "spl_token_2022::pod::PodAccount",
                                    "is_native",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        destination_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::NativeNotSupported"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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
                                  (M.call_closure (|
                                    M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                    [
                                      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 (|
                                            destination_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 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::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",
                                      []
                                    |),
                                    [ 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 (|
                                LogicalOp.and (|
                                  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::PodStateWithExtensionsMut")
                                              [ 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 ]
                                        |)
                                      |)
                                    ]
                                  |),
                                  ltac:(M.monadic
                                    (M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.apply
                                              (Ty.path "&")
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::immutable_owner::ImmutableOwner"
                                              ];
                                            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::PodStateWithExtensionsMut")
                                                [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                              [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                              "get_extension",
                                              [
                                                Ty.path
                                                  "spl_token_2022::extension::immutable_owner::ImmutableOwner"
                                              ]
                                            |),
                                            [ destination_account ]
                                          |)
                                        |)
                                      ]
                                    |)))
                                |)
                              |)) 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::NonTransferableNeedsImmutableOwnership"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ := expected_decimals in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::option::Option::Some",
                              0
                            |) in
                          let expected_decimals := M.copy (| γ0_0 |) in
                          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::PodStateWithExtensionsMut",
                                                  "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 [] |)))
                            ]
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let _ :=
                  M.match_operator (|
                    M.alloc (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            mint,
                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                            "base"
                          |)
                        |),
                        "spl_token_2022::pod::PodMint",
                        "mint_authority"
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ := M.read (| γ |) in
                          let γ1_0 :=
                            M.SubPointer.get_struct_record_field (|
                              γ,
                              "spl_token_2022::pod::PodCOption",
                              "option"
                            |) in
                          let γ1_1 :=
                            M.SubPointer.get_struct_record_field (|
                              γ,
                              "spl_token_2022::pod::PodCOption",
                              "value"
                            |) in
                          let γ2_0 := M.SubPointer.get_slice_index (| γ1_0, 0 |) in
                          let γ2_1 := M.SubPointer.get_slice_index (| γ1_0, 1 |) in
                          let γ2_2 := M.SubPointer.get_slice_index (| γ1_0, 2 |) in
                          let γ2_3 := M.SubPointer.get_slice_index (| γ1_0, 3 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ2_0 |), Value.Integer 1 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ2_1 |), Value.Integer 0 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ2_2 |), Value.Integer 0 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ2_3 |), Value.Integer 0 |) in
                          let mint_authority := M.alloc (| γ1_1 |) in
                          M.match_operator (|
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::ops::try_trait::Try",
                                  Ty.apply
                                    (Ty.path "core::result::Result")
                                    [
                                      Ty.tuple [];
                                      Ty.path "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.read (| mint_authority |);
                                      M.read (| owner_info |);
                                      M.read (| owner_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))
                            ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_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::FixedSupply"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)))
                    ]
                  |) 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 _ :=
                  M.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 _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          destination_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 (|
                                                      destination_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 _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          mint,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodMint",
                      "supply"
                    |),
                    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 (|
                                                      mint,
                                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                      "base"
                                                    |)
                                                  |),
                                                  "spl_token_2022::pod::PodMint",
                                                  "supply"
                                                |)
                                              |)
                                            ]
                                          |);
                                          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.
    
    Axiom AssociatedFunction_process_mint_to :
      M.IsAssociatedFunction Self "process_mint_to" process_mint_to.
    
    (*
        pub fn process_burn(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
            amount: u64,
            expected_decimals: Option<u8>,
        ) -> 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 authority_info = next_account_info(account_info_iter)?;
            let authority_info_data_len = authority_info.data_len();
    
            let mut source_account_data = source_account_info.data.borrow_mut();
            let source_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut source_account_data)?;
            let mut mint_data = mint_info.data.borrow_mut();
            let mint = PodStateWithExtensionsMut::<PodMint>::unpack(&mut mint_data)?;
    
            if source_account.base.is_frozen() {
                return Err(TokenError::AccountFrozen.into());
            }
            if source_account.base.is_native() {
                return Err(TokenError::NativeNotSupported.into());
            }
            if u64::from(source_account.base.amount) < amount {
                return Err(TokenError::InsufficientFunds.into());
            }
            if mint_info.key != &source_account.base.mint {
                return Err(TokenError::MintMismatch.into());
            }
    
            if let Some(expected_decimals) = expected_decimals {
                if expected_decimals != mint.base.decimals {
                    return Err(TokenError::MintDecimalsMismatch.into());
                }
            }
            let maybe_permanent_delegate = get_permanent_delegate(&mint);
    
            if !source_account
                .base
                .is_owned_by_system_program_or_incinerator()
            {
                match (&source_account.base.delegate, maybe_permanent_delegate) {
                    (_, Some(ref delegate)) if cmp_pubkeys(authority_info.key, delegate) => {
                        Self::validate_owner(
                            program_id,
                            delegate,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?
                    }
                    (
                        PodCOption {
                            option: PodCOption::<Pubkey>::SOME,
                            value: delegate,
                        },
                        _,
                    ) if cmp_pubkeys(authority_info.key, delegate) => {
                        Self::validate_owner(
                            program_id,
                            delegate,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
    
                        if u64::from(source_account.base.delegated_amount) < amount {
                            return Err(TokenError::InsufficientFunds.into());
                        }
                        source_account.base.delegated_amount =
                            u64::from(source_account.base.delegated_amount)
                                .checked_sub(amount)
                                .ok_or(TokenError::Overflow)?
                                .into();
                        if u64::from(source_account.base.delegated_amount) == 0 {
                            source_account.base.delegate = PodCOption::none();
                        }
                    }
                    _ => {
                        Self::validate_owner(
                            program_id,
                            &source_account.base.owner,
                            authority_info,
                            authority_info_data_len,
                            account_info_iter.as_slice(),
                        )?;
    
                        if let Ok(cpi_guard) = source_account.get_extension::<CpiGuard>() {
                            if cpi_guard.lock_cpi.into() && in_cpi() {
                                return Err(TokenError::CpiGuardBurnBlocked.into());
                            }
                        }
                    }
                }
            }
    
            // Revisit this later to see if it's worth adding a check to reduce
            // compute costs, ie:
            // if amount == 0
            check_program_account(source_account_info.owner)?;
            check_program_account(mint_info.owner)?;
    
            source_account.base.amount = u64::from(source_account.base.amount)
                .checked_sub(amount)
                .ok_or(TokenError::Overflow)?
                .into();
            mint.base.supply = u64::from(mint.base.supply)
                .checked_sub(amount)
                .ok_or(TokenError::Overflow)?
                .into();
    
            Ok(())
        }
    *)
    Definition process_burn (τ : 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 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 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 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 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::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",
                                      []
                                    |),
                                    [ 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.path "spl_token_2022::pod::PodAccount",
                                    "is_frozen",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        source_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_associated_function (|
                                    Ty.path "spl_token_2022::pod::PodAccount",
                                    "is_native",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        source_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::NativeNotSupported"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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.lt
                                  (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 (|
                                              source_account,
                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                              "base"
                                            |)
                                          |),
                                          "spl_token_2022::pod::PodAccount",
                                          "amount"
                                        |)
                                      |)
                                    ]
                                  |))
                                  (M.read (| 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"
                                    [
                                      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::InsufficientFunds"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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.apply
                                      (Ty.path "&")
                                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                                    [
                                      Ty.apply
                                        (Ty.path "&")
                                        [ Ty.path "solana_program::pubkey::Pubkey" ]
                                    ],
                                    "ne",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| mint_info |),
                                      "solana_program::account_info::AccountInfo",
                                      "key"
                                    |);
                                    M.alloc (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            source_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 (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ := expected_decimals in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::option::Option::Some",
                              0
                            |) in
                          let expected_decimals := M.copy (| γ0_0 |) in
                          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::PodStateWithExtensionsMut",
                                                  "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 [] |)))
                            ]
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let maybe_permanent_delegate :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (|
                        "spl_token_2022::extension::permanent_delegate::get_permanent_delegate",
                        [
                          Ty.path "spl_token_2022::pod::PodMint";
                          Ty.apply
                            (Ty.path "spl_token_2022::extension::PodStateWithExtensionsMut")
                            [ Ty.path "spl_token_2022::pod::PodMint" ]
                        ]
                      |),
                      [ mint ]
                    |)
                  |) in
                let _ :=
                  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_token_2022::pod::PodAccount",
                                      "is_owned_by_system_program_or_incinerator",
                                      []
                                    |),
                                    [
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          source_account,
                                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                                          "base"
                                        |)
                                      |)
                                    ]
                                  |))
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.match_operator (|
                            M.alloc (|
                              Value.Tuple
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        source_account,
                                        "spl_token_2022::extension::PodStateWithExtensionsMut",
                                        "base"
                                      |)
                                    |),
                                    "spl_token_2022::pod::PodAccount",
                                    "delegate"
                                  |);
                                  M.read (| maybe_permanent_delegate |)
                                ]
                            |),
                            [
                              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 γ1_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ0_1,
                                      "core::option::Option::Some",
                                      0
                                    |) in
                                  let delegate := M.alloc (| γ1_0 |) in
                                  let γ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| authority_info |),
                                              "solana_program::account_info::AccountInfo",
                                              "key"
                                            |)
                                          |);
                                          M.read (| delegate |)
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "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.read (| delegate |);
                                              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))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                  let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                  let γ0_0 := M.read (| γ0_0 |) in
                                  let γ2_0 :=
                                    M.SubPointer.get_struct_record_field (|
                                      γ0_0,
                                      "spl_token_2022::pod::PodCOption",
                                      "option"
                                    |) in
                                  let γ2_1 :=
                                    M.SubPointer.get_struct_record_field (|
                                      γ0_0,
                                      "spl_token_2022::pod::PodCOption",
                                      "value"
                                    |) in
                                  let γ3_0 := M.SubPointer.get_slice_index (| γ2_0, 0 |) in
                                  let γ3_1 := M.SubPointer.get_slice_index (| γ2_0, 1 |) in
                                  let γ3_2 := M.SubPointer.get_slice_index (| γ2_0, 2 |) in
                                  let γ3_3 := M.SubPointer.get_slice_index (| γ2_0, 3 |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ3_0 |),
                                      Value.Integer 1
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ3_1 |),
                                      Value.Integer 0
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ3_2 |),
                                      Value.Integer 0
                                    |) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ3_3 |),
                                      Value.Integer 0
                                    |) in
                                  let delegate := M.alloc (| γ2_1 |) in
                                  let γ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| authority_info |),
                                              "solana_program::account_info::AccountInfo",
                                              "key"
                                            |)
                                          |);
                                          M.read (| delegate |)
                                        ]
                                      |)
                                    |) 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_associated_function (|
                                                Ty.path "spl_token_2022::processor::Processor",
                                                "validate_owner",
                                                []
                                              |),
                                              [
                                                M.read (| program_id |);
                                                M.read (| delegate |);
                                                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 (|
                                                  BinOp.Pure.lt
                                                    (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 (|
                                                                source_account,
                                                                "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                                "base"
                                                              |)
                                                            |),
                                                            "spl_token_2022::pod::PodAccount",
                                                            "delegated_amount"
                                                          |)
                                                        |)
                                                      ]
                                                    |))
                                                    (M.read (| 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"
                                                      [
                                                        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::InsufficientFunds"
                                                              []
                                                          ]
                                                        |)
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        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 (|
                                            source_account,
                                            "spl_token_2022::extension::PodStateWithExtensionsMut",
                                            "base"
                                          |)
                                        |),
                                        "spl_token_2022::pod::PodAccount",
                                        "delegated_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 (|
                                                                        source_account,
                                                                        "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                                        "base"
                                                                      |)
                                                                    |),
                                                                    "spl_token_2022::pod::PodAccount",
                                                                    "delegated_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.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.Pure.eq
                                                  (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 (|
                                                              source_account,
                                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                              "base"
                                                            |)
                                                          |),
                                                          "spl_token_2022::pod::PodAccount",
                                                          "delegated_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 (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    source_account,
                                                    "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                    "base"
                                                  |)
                                                |),
                                                "spl_token_2022::pod::PodAccount",
                                                "delegate"
                                              |),
                                              M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                                  "none",
                                                  []
                                                |),
                                                []
                                              |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let _ :=
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.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 (|
                                                      source_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
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "spl_token_2022::extension::BaseStateWithExtensions",
                                                  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",
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::cpi_guard::CpiGuard"
                                                  ]
                                                |),
                                                [ source_account ]
                                              |)
                                            |) in
                                          let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::result::Result::Ok",
                                              0
                                            |) in
                                          let cpi_guard := M.copy (| γ0_0 |) in
                                          M.match_operator (|
                                            M.alloc (| Value.Tuple [] |),
                                            [
                                              fun γ =>
                                                ltac:(M.monadic
                                                  (let γ :=
                                                    M.use
                                                      (M.alloc (|
                                                        LogicalOp.and (|
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::convert::Into",
                                                              Ty.path
                                                                "spl_pod::primitives::PodBool",
                                                              [ Ty.path "bool" ],
                                                              "into",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (| cpi_guard |),
                                                                  "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                                  "lock_cpi"
                                                                |)
                                                              |)
                                                            ]
                                                          |),
                                                          ltac:(M.monadic
                                                            (M.call_closure (|
                                                              M.get_function (|
                                                                "spl_token_2022::extension::cpi_guard::in_cpi",
                                                                []
                                                              |),
                                                              []
                                                            |)))
                                                        |)
                                                      |)) 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::CpiGuardBurnBlocked"
                                                                    []
                                                                ]
                                                              |)
                                                            ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)));
                                              fun γ =>
                                                ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                            ]
                                          |)));
                                      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::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 _ :=
                  M.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 _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          source_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 (|
                                                      source_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 _ :=
                  M.write (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          mint,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodMint",
                      "supply"
                    |),
                    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 (|
                                                      mint,
                                                      "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                      "base"
                                                    |)
                                                  |),
                                                  "spl_token_2022::pod::PodMint",
                                                  "supply"
                                                |)
                                              |)
                                            ]
                                          |);
                                          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.
    
    Axiom AssociatedFunction_process_burn : M.IsAssociatedFunction Self "process_burn" process_burn.
    
    (*
        pub fn process_close_account(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let source_account_info = next_account_info(account_info_iter)?;
            let destination_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();
    
            if cmp_pubkeys(source_account_info.key, destination_account_info.key) {
                return Err(ProgramError::InvalidAccountData);
            }
    
            let source_account_data = source_account_info.data.borrow();
            if let Ok(source_account) =
                PodStateWithExtensions::<PodAccount>::unpack(&source_account_data)
            {
                if !source_account.base.is_native() && u64::from(source_account.base.amount) != 0 {
                    return Err(TokenError::NonNativeHasBalance.into());
                }
    
                let authority = source_account
                    .base
                    .close_authority
                    .unwrap_or(source_account.base.owner);
    
                if !source_account
                    .base
                    .is_owned_by_system_program_or_incinerator()
                {
                    if let Ok(cpi_guard) = source_account.get_extension::<CpiGuard>() {
                        if cpi_guard.lock_cpi.into()
                            && in_cpi()
                            && !cmp_pubkeys(destination_account_info.key, &source_account.base.owner)
                        {
                            return Err(TokenError::CpiGuardCloseAccountBlocked.into());
                        }
                    }
    
                    Self::validate_owner(
                        program_id,
                        &authority,
                        authority_info,
                        authority_info_data_len,
                        account_info_iter.as_slice(),
                    )?;
                } else if !solana_program::incinerator::check_id(destination_account_info.key) {
                    return Err(ProgramError::InvalidAccountData);
                }
    
                if let Ok(confidential_transfer_state) =
                    source_account.get_extension::<ConfidentialTransferAccount>()
                {
                    confidential_transfer_state.closable()?
                }
    
                if let Ok(confidential_transfer_fee_state) =
                    source_account.get_extension::<ConfidentialTransferFeeAmount>()
                {
                    confidential_transfer_fee_state.closable()?
                }
    
                if let Ok(transfer_fee_state) = source_account.get_extension::<TransferFeeAmount>() {
                    transfer_fee_state.closable()?
                }
            } else if let Ok(mint) = PodStateWithExtensions::<PodMint>::unpack(&source_account_data) {
                let extension = mint.get_extension::<MintCloseAuthority>()?;
                let maybe_authority: Option<Pubkey> = extension.close_authority.into();
                let authority = maybe_authority.ok_or(TokenError::AuthorityTypeNotSupported)?;
                Self::validate_owner(
                    program_id,
                    &authority,
                    authority_info,
                    authority_info_data_len,
                    account_info_iter.as_slice(),
                )?;
    
                if u64::from(mint.base.supply) != 0 {
                    return Err(TokenError::MintHasSupply.into());
                }
            } else {
                return Err(ProgramError::UninitializedAccount);
            }
    
            let destination_starting_lamports = destination_account_info.lamports();
            **destination_account_info.lamports.borrow_mut() = destination_starting_lamports
                .checked_add(source_account_info.lamports())
                .ok_or(TokenError::Overflow)?;
    
            **source_account_info.lamports.borrow_mut() = 0;
            drop(source_account_data);
            delete_account(source_account_info)?;
    
            Ok(())
        }
    *)
    Definition process_close_account (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; accounts ] =>
        ltac:(M.monadic
          (let program_id := M.alloc (| program_id |) in
          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 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 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 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 (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| source_account_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| destination_account_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"
                                    [
                                      Value.StructTuple
                                        "solana_program::program_error::ProgramError::InvalidAccountData"
                                        []
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                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",
                        []
                      |),
                      [
                        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 _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "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",
                                        []
                                      |),
                                      [ source_account_data ]
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let source_account := M.copy (| γ0_0 |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          LogicalOp.and (|
                                            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 (|
                                                      source_account,
                                                      "spl_token_2022::extension::PodStateWithExtensions",
                                                      "base"
                                                    |)
                                                  |)
                                                ]
                                              |)),
                                            ltac:(M.monadic
                                              (BinOp.Pure.ne
                                                (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 (|
                                                            source_account,
                                                            "spl_token_2022::extension::PodStateWithExtensions",
                                                            "base"
                                                          |)
                                                        |),
                                                        "spl_token_2022::pod::PodAccount",
                                                        "amount"
                                                      |)
                                                    |)
                                                  ]
                                                |))
                                                (Value.Integer 0)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Err"
                                              [
                                                M.call_closure (|
                                                  M.get_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::NonNativeHasBalance"
                                                      []
                                                  ]
                                                |)
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let authority :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                  "unwrap_or",
                                  []
                                |),
                                [
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          source_account,
                                          "spl_token_2022::extension::PodStateWithExtensions",
                                          "base"
                                        |)
                                      |),
                                      "spl_token_2022::pod::PodAccount",
                                      "close_authority"
                                    |)
                                  |);
                                  M.read (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          source_account,
                                          "spl_token_2022::extension::PodStateWithExtensions",
                                          "base"
                                        |)
                                      |),
                                      "spl_token_2022::pod::PodAccount",
                                      "owner"
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          let _ :=
                            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_token_2022::pod::PodAccount",
                                                "is_owned_by_system_program_or_incinerator",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    source_account,
                                                    "spl_token_2022::extension::PodStateWithExtensions",
                                                    "base"
                                                  |)
                                                |)
                                              ]
                                            |))
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let _ :=
                                      M.match_operator (|
                                        M.alloc (| Value.Tuple [] |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ :=
                                                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::PodAccount"
                                                        ],
                                                      [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                                      "get_extension",
                                                      [
                                                        Ty.path
                                                          "spl_token_2022::extension::cpi_guard::CpiGuard"
                                                      ]
                                                    |),
                                                    [ source_account ]
                                                  |)
                                                |) in
                                              let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::result::Result::Ok",
                                                  0
                                                |) in
                                              let cpi_guard := M.copy (| γ0_0 |) in
                                              M.match_operator (|
                                                M.alloc (| Value.Tuple [] |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ :=
                                                        M.use
                                                          (M.alloc (|
                                                            LogicalOp.and (|
                                                              LogicalOp.and (|
                                                                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 (| cpi_guard |),
                                                                        "spl_token_2022::extension::cpi_guard::CpiGuard",
                                                                        "lock_cpi"
                                                                      |)
                                                                    |)
                                                                  ]
                                                                |),
                                                                ltac:(M.monadic
                                                                  (M.call_closure (|
                                                                    M.get_function (|
                                                                      "spl_token_2022::extension::cpi_guard::in_cpi",
                                                                      []
                                                                    |),
                                                                    []
                                                                  |)))
                                                              |),
                                                              ltac:(M.monadic
                                                                (UnOp.Pure.not
                                                                  (M.call_closure (|
                                                                    M.get_function (|
                                                                      "spl_token_2022::cmp_pubkeys",
                                                                      []
                                                                    |),
                                                                    [
                                                                      M.read (|
                                                                        M.SubPointer.get_struct_record_field (|
                                                                          M.read (|
                                                                            destination_account_info
                                                                          |),
                                                                          "solana_program::account_info::AccountInfo",
                                                                          "key"
                                                                        |)
                                                                      |);
                                                                      M.SubPointer.get_struct_record_field (|
                                                                        M.read (|
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            source_account,
                                                                            "spl_token_2022::extension::PodStateWithExtensions",
                                                                            "base"
                                                                          |)
                                                                        |),
                                                                        "spl_token_2022::pod::PodAccount",
                                                                        "owner"
                                                                      |)
                                                                    ]
                                                                  |))))
                                                            |)
                                                          |)) 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::CpiGuardCloseAccountBlocked"
                                                                        []
                                                                    ]
                                                                  |)
                                                                ]
                                                            |)
                                                          |)
                                                        |)
                                                      |)));
                                                  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_associated_function (|
                                                  Ty.path "spl_token_2022::processor::Processor",
                                                  "validate_owner",
                                                  []
                                                |),
                                                [
                                                  M.read (| program_id |);
                                                  authority;
                                                  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
                                    M.alloc (| Value.Tuple [] |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  UnOp.Pure.not
                                                    (M.call_closure (|
                                                      M.get_function (|
                                                        "solana_program::incinerator::check_id",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (| destination_account_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"
                                                      [
                                                        Value.StructTuple
                                                          "solana_program::program_error::ProgramError::InvalidAccountData"
                                                          []
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |)))
                              ]
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      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::PodAccount" ],
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                            "get_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer::ConfidentialTransferAccount"
                                            ]
                                          |),
                                          [ source_account ]
                                        |)
                                      |) in
                                    let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::result::Result::Ok",
                                        0
                                      |) in
                                    let confidential_transfer_state := M.copy (| γ0_0 |) in
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.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_state |) ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  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 (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      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::PodAccount" ],
                                            [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                            "get_extension",
                                            [
                                              Ty.path
                                                "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount"
                                            ]
                                          |),
                                          [ source_account ]
                                        |)
                                      |) in
                                    let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::result::Result::Ok",
                                        0
                                      |) in
                                    let confidential_transfer_fee_state := M.copy (| γ0_0 |) in
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.tuple [];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "spl_token_2022::extension::confidential_transfer_fee::ConfidentialTransferFeeAmount",
                                                "closable",
                                                []
                                              |),
                                              [ M.read (| confidential_transfer_fee_state |) ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  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 (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    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::PodAccount" ],
                                          [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                          "get_extension",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::transfer_fee::TransferFeeAmount"
                                          ]
                                        |),
                                        [ source_account ]
                                      |)
                                    |) in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Ok",
                                      0
                                    |) in
                                  let transfer_fee_state := M.copy (| γ0_0 |) in
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::Try",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.tuple [];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path
                                                "spl_token_2022::extension::transfer_fee::TransferFeeAmount",
                                              "closable",
                                              []
                                            |),
                                            [ M.read (| transfer_fee_state |) ]
                                          |)
                                        ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::ops::control_flow::ControlFlow::Break",
                                              0
                                            |) in
                                          let residual := M.copy (| γ0_0 |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                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 (M.alloc (| Value.Tuple [] |)))
                            ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.alloc (|
                                      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",
                                                []
                                              |),
                                              [ source_account_data ]
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Ok",
                                      0
                                    |) in
                                  let mint := M.copy (| γ0_0 |) in
                                  let extension :=
                                    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::mint_close_authority::MintCloseAuthority"
                                                    ];
                                                  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::mint_close_authority::MintCloseAuthority"
                                                  ]
                                                |),
                                                [ 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_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 (| extension |),
                                              "spl_token_2022::extension::mint_close_authority::MintCloseAuthority",
                                              "close_authority"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let 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_authority |);
                                                  Value.StructTuple
                                                    "spl_token_2022::error::TokenError::AuthorityTypeNotSupported"
                                                    []
                                                ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    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::processor::Processor",
                                                "validate_owner",
                                                []
                                              |),
                                              [
                                                M.read (| program_id |);
                                                authority;
                                                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
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.Pure.ne
                                                  (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 (|
                                                              mint,
                                                              "spl_token_2022::extension::PodStateWithExtensions",
                                                              "base"
                                                            |)
                                                          |),
                                                          "spl_token_2022::pod::PodMint",
                                                          "supply"
                                                        |)
                                                      |)
                                                    ]
                                                  |))
                                                  (Value.Integer 0)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          M.alloc (|
                                            M.never_to_any (|
                                              M.read (|
                                                M.return_ (|
                                                  Value.StructTuple
                                                    "core::result::Result::Err"
                                                    [
                                                      M.call_closure (|
                                                        M.get_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::MintHasSupply"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        M.return_ (|
                                          Value.StructTuple
                                            "core::result::Result::Err"
                                            [
                                              Value.StructTuple
                                                "solana_program::program_error::ProgramError::UninitializedAccount"
                                                []
                                            ]
                                        |)
                                      |)
                                    |)
                                  |)))
                            ]
                          |)))
                    ]
                  |) in
                let destination_starting_lamports :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "lamports",
                        []
                      |),
                      [ M.read (| destination_account_info |) ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    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.path "u64" ] ],
                          [],
                          "deref_mut",
                          []
                        |),
                        [
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::cell::RefCell")
                                  [ Ty.apply (Ty.path "&mut") [ Ty.path "u64" ] ],
                                "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.path "u64" ] ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| destination_account_info |),
                                      "solana_program::account_info::AccountInfo",
                                      "lamports"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |)
                        ]
                      |)
                    |),
                    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.read (| destination_starting_lamports |);
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          "lamports",
                                          []
                                        |),
                                        [ M.read (| source_account_info |) ]
                                      |)
                                    ]
                                  |);
                                  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 _ :=
                  M.write (|
                    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.path "u64" ] ],
                          [],
                          "deref_mut",
                          []
                        |),
                        [
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::cell::RefCell")
                                  [ Ty.apply (Ty.path "&mut") [ Ty.path "u64" ] ],
                                "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.path "u64" ] ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| source_account_info |),
                                      "solana_program::account_info::AccountInfo",
                                      "lamports"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |)
                        ]
                      |)
                    |),
                    Value.Integer 0
                  |) in
                let _ :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (|
                        "core::mem::drop",
                        [
                          Ty.apply
                            (Ty.path "core::cell::Ref")
                            [
                              Ty.apply
                                (Ty.path "&mut")
                                [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] ]
                            ]
                        ]
                      |),
                      [ M.read (| source_account_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_token_2022::processor::delete_account", [] |),
                            [ 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
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_close_account :
      M.IsAssociatedFunction Self "process_close_account" process_close_account.
    
    (*
        pub fn process_toggle_freeze_account(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
            freeze: bool,
        ) -> 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 authority_info = next_account_info(account_info_iter)?;
            let authority_info_data_len = authority_info.data_len();
    
            let mut source_account_data = source_account_info.data.borrow_mut();
            let source_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut source_account_data)?;
            if freeze && source_account.base.is_frozen() || !freeze && !source_account.base.is_frozen()
            {
                return Err(TokenError::InvalidState.into());
            }
            if source_account.base.is_native() {
                return Err(TokenError::NativeNotSupported.into());
            }
            if !cmp_pubkeys(mint_info.key, &source_account.base.mint) {
                return Err(TokenError::MintMismatch.into());
            }
    
            let mint_data = mint_info.data.borrow();
            let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)?;
            match &mint.base.freeze_authority {
                PodCOption {
                    option: PodCOption::<Pubkey>::SOME,
                    value: authority,
                } => Self::validate_owner(
                    program_id,
                    authority,
                    authority_info,
                    authority_info_data_len,
                    account_info_iter.as_slice(),
                ),
                _ => Err(TokenError::MintCannotFreeze.into()),
            }?;
    
            source_account.base.state = if freeze {
                AccountState::Frozen.into()
            } else {
                AccountState::Initialized.into()
            };
    
            Ok(())
        }
    *)
    Definition process_toggle_freeze_account (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; accounts; freeze ] =>
        ltac:(M.monadic
          (let program_id := M.alloc (| program_id |) in
          let accounts := M.alloc (| accounts |) in
          let freeze := M.alloc (| freeze |) 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 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 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 (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.or (|
                                  LogicalOp.and (|
                                    M.read (| freeze |),
                                    ltac:(M.monadic
                                      (M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "spl_token_2022::pod::PodAccount",
                                          "is_frozen",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              source_account,
                                              "spl_token_2022::extension::PodStateWithExtensionsMut",
                                              "base"
                                            |)
                                          |)
                                        ]
                                      |)))
                                  |),
                                  ltac:(M.monadic
                                    (LogicalOp.and (|
                                      UnOp.Pure.not (M.read (| freeze |)),
                                      ltac:(M.monadic
                                        (UnOp.Pure.not
                                          (M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "spl_token_2022::pod::PodAccount",
                                              "is_frozen",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  source_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::InvalidState"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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.path "spl_token_2022::pod::PodAccount",
                                    "is_native",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        source_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::NativeNotSupported"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      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
                                  (M.call_closure (|
                                    M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                    [
                                      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 (|
                                            source_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 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",
                        []
                      |),
                      [
                        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",
                                      []
                                    |),
                                    [ 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 (|
                      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.read (|
                            M.match_operator (|
                              M.alloc (|
                                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",
                                  "freeze_authority"
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ := M.read (| γ |) in
                                    let γ1_0 :=
                                      M.SubPointer.get_struct_record_field (|
                                        γ,
                                        "spl_token_2022::pod::PodCOption",
                                        "option"
                                      |) in
                                    let γ1_1 :=
                                      M.SubPointer.get_struct_record_field (|
                                        γ,
                                        "spl_token_2022::pod::PodCOption",
                                        "value"
                                      |) in
                                    let γ2_0 := M.SubPointer.get_slice_index (| γ1_0, 0 |) in
                                    let γ2_1 := M.SubPointer.get_slice_index (| γ1_0, 1 |) in
                                    let γ2_2 := M.SubPointer.get_slice_index (| γ1_0, 2 |) in
                                    let γ2_3 := M.SubPointer.get_slice_index (| γ1_0, 3 |) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ2_0 |),
                                        Value.Integer 1
                                      |) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ2_1 |),
                                        Value.Integer 0
                                      |) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ2_2 |),
                                        Value.Integer 0
                                      |) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ2_3 |),
                                        Value.Integer 0
                                      |) in
                                    let authority := M.alloc (| γ1_1 |) in
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path "spl_token_2022::processor::Processor",
                                          "validate_owner",
                                          []
                                        |),
                                        [
                                          M.read (| program_id |);
                                          M.read (| authority |);
                                          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
                                    (M.alloc (|
                                      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::MintCannotFreeze"
                                                []
                                            ]
                                          |)
                                        ]
                                    |)))
                              ]
                            |)
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                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 (|
                        M.SubPointer.get_struct_record_field (|
                          source_account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "state"
                    |),
                    M.read (|
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ := M.use freeze in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "spl_token_2022::state::AccountState",
                                    [ Ty.path "u8" ],
                                    "into",
                                    []
                                  |),
                                  [
                                    Value.StructTuple
                                      "spl_token_2022::state::AccountState::Frozen"
                                      []
                                  ]
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::convert::Into",
                                    Ty.path "spl_token_2022::state::AccountState",
                                    [ Ty.path "u8" ],
                                    "into",
                                    []
                                  |),
                                  [
                                    Value.StructTuple
                                      "spl_token_2022::state::AccountState::Initialized"
                                      []
                                  ]
                                |)
                              |)))
                        ]
                      |)
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_toggle_freeze_account :
      M.IsAssociatedFunction Self "process_toggle_freeze_account" process_toggle_freeze_account.
    
    (*
        pub fn process_sync_native(accounts: &[AccountInfo]) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let native_account_info = next_account_info(account_info_iter)?;
    
            check_program_account(native_account_info.owner)?;
            let mut native_account_data = native_account_info.data.borrow_mut();
            let native_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack(&mut native_account_data)?;
    
            match native_account.base.is_native {
                PodCOption {
                    option: PodCOption::<PodU64>::SOME,
                    value: amount,
                } => {
                    let new_amount = native_account_info
                        .lamports()
                        .checked_sub(u64::from(amount))
                        .ok_or(TokenError::Overflow)?;
                    if new_amount < u64::from(native_account.base.amount) {
                        return Err(TokenError::InvalidState.into());
                    }
                    native_account.base.amount = new_amount.into();
                }
                _ => return Err(TokenError::NonNativeNotSupported.into()),
            }
    
            Ok(())
        }
    *)
    Definition process_sync_native (τ : 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 native_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 (| native_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 native_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 (| native_account_info |),
                              "solana_program::account_info::AccountInfo",
                              "data"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let native_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",
                                      []
                                    |),
                                    [ native_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.SubPointer.get_struct_record_field (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          native_account,
                          "spl_token_2022::extension::PodStateWithExtensionsMut",
                          "base"
                        |)
                      |),
                      "spl_token_2022::pod::PodAccount",
                      "is_native"
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_record_field (|
                              γ,
                              "spl_token_2022::pod::PodCOption",
                              "option"
                            |) in
                          let γ0_1 :=
                            M.SubPointer.get_struct_record_field (|
                              γ,
                              "spl_token_2022::pod::PodCOption",
                              "value"
                            |) in
                          let γ1_0 := M.SubPointer.get_slice_index (| γ0_0, 0 |) in
                          let γ1_1 := M.SubPointer.get_slice_index (| γ0_0, 1 |) in
                          let γ1_2 := M.SubPointer.get_slice_index (| γ0_0, 2 |) in
                          let γ1_3 := M.SubPointer.get_slice_index (| γ0_0, 3 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 1 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ1_1 |), Value.Integer 0 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ1_2 |), Value.Integer 0 |) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ1_3 |), Value.Integer 0 |) in
                          let amount := M.copy (| γ0_1 |) in
                          let new_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.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_associated_function (|
                                                  Ty.path
                                                    "solana_program::account_info::AccountInfo",
                                                  "lamports",
                                                  []
                                                |),
                                                [ M.read (| native_account_info |) ]
                                              |);
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::convert::From",
                                                  Ty.path "u64",
                                                  [ Ty.path "spl_pod::primitives::PodU64" ],
                                                  "from",
                                                  []
                                                |),
                                                [ 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 _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          BinOp.Pure.lt
                                            (M.read (| new_amount |))
                                            (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 (|
                                                        native_account,
                                                        "spl_token_2022::extension::PodStateWithExtensionsMut",
                                                        "base"
                                                      |)
                                                    |),
                                                    "spl_token_2022::pod::PodAccount",
                                                    "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"
                                              [
                                                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::InvalidState"
                                                      []
                                                  ]
                                                |)
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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 (|
                                    native_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 (| new_amount |) ]
                              |)
                            |) in
                          M.alloc (| Value.Tuple [] |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  Value.StructTuple
                                    "core::result::Result::Err"
                                    [
                                      M.call_closure (|
                                        M.get_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::NonNativeNotSupported"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)))
                    ]
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_sync_native :
      M.IsAssociatedFunction Self "process_sync_native" process_sync_native.
    
    (*
        pub fn process_initialize_mint_close_authority(
            accounts: &[AccountInfo],
            close_authority: PodCOption<Pubkey>,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let mint_account_info = next_account_info(account_info_iter)?;
    
            let mut mint_data = mint_account_info.data.borrow_mut();
            let mut mint = PodStateWithExtensionsMut::<PodMint>::unpack_uninitialized(&mut mint_data)?;
            let extension = mint.init_extension::<MintCloseAuthority>(true)?;
            extension.close_authority = close_authority.try_into()?;
    
            Ok(())
        }
    *)
    Definition process_initialize_mint_close_authority (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; close_authority ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let close_authority := M.alloc (| close_authority |) 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_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_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_account_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",
                                      []
                                    |),
                                    [ 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 extension :=
                  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::mint_close_authority::MintCloseAuthority"
                                  ];
                                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::mint_close_authority::MintCloseAuthority"
                                ]
                              |),
                              [ 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 (| extension |),
                      "spl_token_2022::extension::mint_close_authority::MintCloseAuthority",
                      "close_authority"
                    |),
                    M.read (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::convert::TryInto",
                                  Ty.apply
                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                  [ Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey" ],
                                  "try_into",
                                  []
                                |),
                                [ M.read (| close_authority |) ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    M.return_ (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::try_trait::FromResidual",
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.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.
    
    Axiom AssociatedFunction_process_initialize_mint_close_authority :
      M.IsAssociatedFunction
        Self
        "process_initialize_mint_close_authority"
        process_initialize_mint_close_authority.
    
    (*
        pub fn process_get_account_data_size(
            accounts: &[AccountInfo],
            new_extension_types: &[ExtensionType],
        ) -> ProgramResult {
            if new_extension_types
                .iter()
                .any(|&t| t.get_account_type() != AccountType::Account)
            {
                return Err(TokenError::ExtensionTypeMismatch.into());
            }
    
            let account_info_iter = &mut accounts.iter();
            let mint_account_info = next_account_info(account_info_iter)?;
    
            let mut account_extensions = Self::get_required_account_extensions(mint_account_info)?;
            // ExtensionType::try_calculate_account_len() dedupes types, so just a dumb
            // concatenation is fine here
            account_extensions.extend_from_slice(new_extension_types);
    
            let account_len = ExtensionType::try_calculate_account_len::<Account>(&account_extensions)?;
            set_return_data(&account_len.to_le_bytes());
    
            Ok(())
        }
    *)
    Definition process_get_account_data_size (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; new_extension_types ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let new_extension_types := M.alloc (| new_extension_types |) 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 (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::iter::traits::iterator::Iterator",
                                    Ty.apply
                                      (Ty.path "core::slice::iter::Iter")
                                      [ Ty.path "spl_token_2022::extension::ExtensionType" ],
                                    [],
                                    "any",
                                    [
                                      Ty.function
                                        [
                                          Ty.tuple
                                            [
                                              Ty.apply
                                                (Ty.path "&")
                                                [ Ty.path "spl_token_2022::extension::ExtensionType"
                                                ]
                                            ]
                                        ]
                                        (Ty.path "bool")
                                    ]
                                  |),
                                  [
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.apply
                                            (Ty.path "slice")
                                            [ Ty.path "spl_token_2022::extension::ExtensionType" ],
                                          "iter",
                                          []
                                        |),
                                        [ M.read (| new_extension_types |) ]
                                      |)
                                    |);
                                    M.closure
                                      (fun γ =>
                                        ltac:(M.monadic
                                          match γ with
                                          | [ α0 ] =>
                                            M.match_operator (|
                                              M.alloc (| α0 |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ := M.read (| γ |) in
                                                    let t := M.copy (| γ |) in
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::cmp::PartialEq",
                                                        Ty.path
                                                          "spl_token_2022::extension::AccountType",
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::AccountType"
                                                        ],
                                                        "ne",
                                                        []
                                                      |),
                                                      [
                                                        M.alloc (|
                                                          M.call_closure (|
                                                            M.get_associated_function (|
                                                              Ty.path
                                                                "spl_token_2022::extension::ExtensionType",
                                                              "get_account_type",
                                                              []
                                                            |),
                                                            [ t ]
                                                          |)
                                                        |);
                                                        M.alloc (|
                                                          Value.StructTuple
                                                            "spl_token_2022::extension::AccountType::Account"
                                                            []
                                                        |)
                                                      ]
                                                    |)))
                                              ]
                                            |)
                                          | _ => M.impossible (||)
                                          end))
                                  ]
                                |)
                              |)) 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::ExtensionTypeMismatch"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                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_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 account_extensions :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  [
                                    Ty.path "spl_token_2022::extension::ExtensionType";
                                    Ty.path "alloc::alloc::Global"
                                  ];
                                Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "spl_token_2022::processor::Processor",
                                "get_required_account_extensions",
                                []
                              |),
                              [ M.read (| mint_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.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "alloc::vec::Vec")
                          [
                            Ty.path "spl_token_2022::extension::ExtensionType";
                            Ty.path "alloc::alloc::Global"
                          ],
                        "extend_from_slice",
                        []
                      |),
                      [ account_extensions; M.read (| new_extension_types |) ]
                    |)
                  |) in
                let account_len :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.path "usize";
                                Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "spl_token_2022::extension::ExtensionType",
                                "try_calculate_account_len",
                                [ Ty.path "spl_token_2022::state::Account" ]
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::deref::Deref",
                                    Ty.apply
                                      (Ty.path "alloc::vec::Vec")
                                      [
                                        Ty.path "spl_token_2022::extension::ExtensionType";
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref",
                                    []
                                  |),
                                  [ account_extensions ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  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.alloc (|
                    M.call_closure (|
                      M.get_function (| "solana_program::program::set_return_data", [] |),
                      [
                        (* Unsize *)
                        M.pointer_coercion
                          (M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (| Ty.path "usize", "to_le_bytes", [] |),
                              [ M.read (| account_len |) ]
                            |)
                          |))
                      ]
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_get_account_data_size :
      M.IsAssociatedFunction Self "process_get_account_data_size" process_get_account_data_size.
    
    (*
        pub fn process_initialize_immutable_owner(accounts: &[AccountInfo]) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let token_account_info = next_account_info(account_info_iter)?;
            let token_account_data = &mut token_account_info.data.borrow_mut();
            let mut token_account =
                PodStateWithExtensionsMut::<PodAccount>::unpack_uninitialized(token_account_data)?;
            token_account
                .init_extension::<ImmutableOwner>(true)
                .map(|_| ())
        }
    *)
    Definition process_initialize_immutable_owner (τ : 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 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_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 (| 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
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "core::result::Result")
                        [
                          Ty.apply
                            (Ty.path "&mut")
                            [ Ty.path "spl_token_2022::extension::immutable_owner::ImmutableOwner"
                            ];
                          Ty.path "solana_program::program_error::ProgramError"
                        ],
                      "map",
                      [
                        Ty.tuple [];
                        Ty.function
                          [
                            Ty.tuple
                              [
                                Ty.apply
                                  (Ty.path "&mut")
                                  [
                                    Ty.path
                                      "spl_token_2022::extension::immutable_owner::ImmutableOwner"
                                  ]
                              ]
                          ]
                          (Ty.tuple [])
                      ]
                    |),
                    [
                      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::immutable_owner::ImmutableOwner" ]
                        |),
                        [ token_account; Value.Bool true ]
                      |);
                      M.closure
                        (fun γ =>
                          ltac:(M.monadic
                            match γ with
                            | [ α0 ] =>
                              M.match_operator (|
                                M.alloc (| α0 |),
                                [ fun γ => ltac:(M.monadic (Value.Tuple [])) ]
                              |)
                            | _ => M.impossible (||)
                            end))
                    ]
                  |)
                |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_immutable_owner :
      M.IsAssociatedFunction
        Self
        "process_initialize_immutable_owner"
        process_initialize_immutable_owner.
    
    (*
        pub fn process_amount_to_ui_amount(accounts: &[AccountInfo], amount: u64) -> 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 = mint_info.data.borrow();
            let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)
                .map_err(|_| Into::<ProgramError>::into(TokenError::InvalidMint))?;
            let ui_amount = if let Ok(extension) = mint.get_extension::<InterestBearingConfig>() {
                let unix_timestamp = Clock::get()?.unix_timestamp;
                extension
                    .amount_to_ui_amount(amount, mint.base.decimals, unix_timestamp)
                    .ok_or(ProgramError::InvalidArgument)?
            } else {
                crate::amount_to_ui_amount_string_trimmed(amount, mint.base.decimals)
            };
    
            set_return_data(&ui_amount.into_bytes());
            Ok(())
        }
    *)
    Definition process_amount_to_ui_amount (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; amount ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let amount := M.alloc (| amount |) 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.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 "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"
                                  ],
                                "map_err",
                                [
                                  Ty.path "solana_program::program_error::ProgramError";
                                  Ty.function
                                    [
                                      Ty.tuple
                                        [ Ty.path "solana_program::program_error::ProgramError" ]
                                    ]
                                    (Ty.path "solana_program::program_error::ProgramError")
                                ]
                              |),
                              [
                                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",
                                          []
                                        |),
                                        [ mint_data ]
                                      |)
                                    |)
                                  ]
                                |);
                                M.closure
                                  (fun γ =>
                                    ltac:(M.monadic
                                      match γ with
                                      | [ α0 ] =>
                                        M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (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::InvalidMint"
                                                      []
                                                  ]
                                                |)))
                                          ]
                                        |)
                                      | _ => M.impossible (||)
                                      end))
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.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 ui_amount :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              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::interest_bearing_mint::InterestBearingConfig"
                                    ]
                                  |),
                                  [ mint ]
                                |)
                              |) in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::result::Result::Ok",
                                0
                              |) in
                            let extension := M.copy (| γ0_0 |) in
                            let unix_timestamp :=
                              M.copy (|
                                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",
                                  "unix_timestamp"
                                |)
                              |) in
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.path "alloc::string::String";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.apply
                                          (Ty.path "core::option::Option")
                                          [ Ty.path "alloc::string::String" ],
                                        "ok_or",
                                        [ Ty.path "solana_program::program_error::ProgramError" ]
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path
                                              "spl_token_2022::extension::interest_bearing_mint::InterestBearingConfig",
                                            "amount_to_ui_amount",
                                            []
                                          |),
                                          [
                                            M.read (| extension |);
                                            M.read (| amount |);
                                            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"
                                              |)
                                            |);
                                            M.read (| unix_timestamp |)
                                          ]
                                        |);
                                        Value.StructTuple
                                          "solana_program::program_error::ProgramError::InvalidArgument"
                                          []
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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
                            (M.alloc (|
                              M.call_closure (|
                                M.get_function (|
                                  "spl_token_2022::amount_to_ui_amount_string_trimmed",
                                  []
                                |),
                                [
                                  M.read (| amount |);
                                  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.alloc (|
                    M.call_closure (|
                      M.get_function (| "solana_program::program::set_return_data", [] |),
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::deref::Deref",
                            Ty.apply
                              (Ty.path "alloc::vec::Vec")
                              [ Ty.path "u8"; Ty.path "alloc::alloc::Global" ],
                            [],
                            "deref",
                            []
                          |),
                          [
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.path "alloc::string::String",
                                  "into_bytes",
                                  []
                                |),
                                [ M.read (| ui_amount |) ]
                              |)
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_amount_to_ui_amount :
      M.IsAssociatedFunction Self "process_amount_to_ui_amount" process_amount_to_ui_amount.
    
    (*
        pub fn process_ui_amount_to_amount(accounts: &[AccountInfo], ui_amount: &str) -> 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 = mint_info.data.borrow();
            let mint = PodStateWithExtensions::<PodMint>::unpack(&mint_data)
                .map_err(|_| Into::<ProgramError>::into(TokenError::InvalidMint))?;
            let amount = if let Ok(extension) = mint.get_extension::<InterestBearingConfig>() {
                let unix_timestamp = Clock::get()?.unix_timestamp;
                extension.try_ui_amount_into_amount(ui_amount, mint.base.decimals, unix_timestamp)?
            } else {
                crate::try_ui_amount_into_amount(ui_amount.to_string(), mint.base.decimals)?
            };
    
            set_return_data(&amount.to_le_bytes());
            Ok(())
        }
    *)
    Definition process_ui_amount_to_amount (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; ui_amount ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let ui_amount := M.alloc (| ui_amount |) 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.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 "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"
                                  ],
                                "map_err",
                                [
                                  Ty.path "solana_program::program_error::ProgramError";
                                  Ty.function
                                    [
                                      Ty.tuple
                                        [ Ty.path "solana_program::program_error::ProgramError" ]
                                    ]
                                    (Ty.path "solana_program::program_error::ProgramError")
                                ]
                              |),
                              [
                                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",
                                          []
                                        |),
                                        [ mint_data ]
                                      |)
                                    |)
                                  ]
                                |);
                                M.closure
                                  (fun γ =>
                                    ltac:(M.monadic
                                      match γ with
                                      | [ α0 ] =>
                                        M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (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::InvalidMint"
                                                      []
                                                  ]
                                                |)))
                                          ]
                                        |)
                                      | _ => M.impossible (||)
                                      end))
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.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 amount :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              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::interest_bearing_mint::InterestBearingConfig"
                                    ]
                                  |),
                                  [ mint ]
                                |)
                              |) in
                            let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::result::Result::Ok",
                                0
                              |) in
                            let extension := M.copy (| γ0_0 |) in
                            let unix_timestamp :=
                              M.copy (|
                                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",
                                  "unix_timestamp"
                                |)
                              |) in
                            M.match_operator (|
                              M.alloc (|
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::ops::try_trait::Try",
                                    Ty.apply
                                      (Ty.path "core::result::Result")
                                      [
                                        Ty.path "u64";
                                        Ty.path "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path
                                          "spl_token_2022::extension::interest_bearing_mint::InterestBearingConfig",
                                        "try_ui_amount_into_amount",
                                        []
                                      |),
                                      [
                                        M.read (| extension |);
                                        M.read (| ui_amount |);
                                        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"
                                          |)
                                        |);
                                        M.read (| unix_timestamp |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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
                            (M.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 "solana_program::program_error::ProgramError"
                                      ],
                                    [],
                                    "branch",
                                    []
                                  |),
                                  [
                                    M.call_closure (|
                                      M.get_function (|
                                        "spl_token_2022::try_ui_amount_into_amount",
                                        []
                                      |),
                                      [
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "alloc::string::ToString",
                                            Ty.path "str",
                                            [],
                                            "to_string",
                                            []
                                          |),
                                          [ M.read (| ui_amount |) ]
                                        |);
                                        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"
                                          |)
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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.alloc (|
                    M.call_closure (|
                      M.get_function (| "solana_program::program::set_return_data", [] |),
                      [
                        (* Unsize *)
                        M.pointer_coercion
                          (M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (| Ty.path "u64", "to_le_bytes", [] |),
                              [ M.read (| amount |) ]
                            |)
                          |))
                      ]
                    |)
                  |) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_ui_amount_to_amount :
      M.IsAssociatedFunction Self "process_ui_amount_to_amount" process_ui_amount_to_amount.
    
    (*
        pub fn process_create_native_mint(accounts: &[AccountInfo]) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let payer_info = next_account_info(account_info_iter)?;
            let native_mint_info = next_account_info(account_info_iter)?;
            let system_program_info = next_account_info(account_info_iter)?;
    
            if *native_mint_info.key != native_mint::id() {
                return Err(TokenError::InvalidMint.into());
            }
    
            let rent = Rent::get()?;
            let new_minimum_balance = rent.minimum_balance(Mint::get_packed_len());
            let lamports_diff = new_minimum_balance.saturating_sub(native_mint_info.lamports());
            invoke(
                &system_instruction::transfer(payer_info.key, native_mint_info.key, lamports_diff),
                &[
                    payer_info.clone(),
                    native_mint_info.clone(),
                    system_program_info.clone(),
                ],
            )?;
    
            invoke_signed(
                &system_instruction::allocate(native_mint_info.key, Mint::get_packed_len() as u64),
                &[native_mint_info.clone(), system_program_info.clone()],
                &[native_mint::PROGRAM_ADDRESS_SEEDS],
            )?;
    
            invoke_signed(
                &system_instruction::assign(native_mint_info.key, &crate::id()),
                &[native_mint_info.clone(), system_program_info.clone()],
                &[native_mint::PROGRAM_ADDRESS_SEEDS],
            )?;
    
            Mint::pack(
                Mint {
                    decimals: native_mint::DECIMALS,
                    is_initialized: true,
                    ..Mint::default()
                },
                &mut native_mint_info.data.borrow_mut(),
            )
        }
    *)
    Definition process_create_native_mint (τ : 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 payer_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 native_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 system_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
                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 (| native_mint_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::native_mint::id", [] |),
                                        []
                                      |)
                                    |)
                                  ]
                                |)
                              |)) 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::InvalidMint"
                                            []
                                        ]
                                      |)
                                    ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                let rent :=
                  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::rent::Rent";
                                Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "solana_program::sysvar::Sysvar",
                                Ty.path "solana_program::rent::Rent",
                                [],
                                "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))
                      ]
                    |)
                  |) in
                let new_minimum_balance :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::rent::Rent",
                        "minimum_balance",
                        []
                      |),
                      [
                        rent;
                        M.call_closure (|
                          M.get_trait_method (|
                            "solana_program::program_pack::Pack",
                            Ty.path "spl_token_2022::state::Mint",
                            [],
                            "get_packed_len",
                            []
                          |),
                          []
                        |)
                      ]
                    |)
                  |) in
                let lamports_diff :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (| Ty.path "u64", "saturating_sub", [] |),
                      [
                        M.read (| new_minimum_balance |);
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "solana_program::account_info::AccountInfo",
                            "lamports",
                            []
                          |),
                          [ M.read (| native_mint_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 (| "solana_program::program::invoke", [] |),
                            [
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "solana_program::system_instruction::transfer",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| payer_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| native_mint_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.read (| lamports_diff |)
                                  ]
                                |)
                              |);
                              (* Unsize *)
                              M.pointer_coercion
                                (M.alloc (|
                                  Value.Array
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| payer_info |) ]
                                      |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| native_mint_info |) ]
                                      |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| system_program_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 (| "solana_program::program::invoke_signed", [] |),
                            [
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "solana_program::system_instruction::allocate",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| native_mint_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.rust_cast
                                      (M.call_closure (|
                                        M.get_trait_method (|
                                          "solana_program::program_pack::Pack",
                                          Ty.path "spl_token_2022::state::Mint",
                                          [],
                                          "get_packed_len",
                                          []
                                        |),
                                        []
                                      |))
                                  ]
                                |)
                              |);
                              (* Unsize *)
                              M.pointer_coercion
                                (M.alloc (|
                                  Value.Array
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| native_mint_info |) ]
                                      |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| system_program_info |) ]
                                      |)
                                    ]
                                |));
                              (* Unsize *)
                              M.pointer_coercion
                                (M.alloc (|
                                  Value.Array
                                    [
                                      M.read (|
                                        M.get_constant (|
                                          "spl_token_2022::native_mint::PROGRAM_ADDRESS_SEEDS"
                                        |)
                                      |)
                                    ]
                                |))
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                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 (| "solana_program::program::invoke_signed", [] |),
                            [
                              M.alloc (|
                                M.call_closure (|
                                  M.get_function (|
                                    "solana_program::system_instruction::assign",
                                    []
                                  |),
                                  [
                                    M.read (|
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| native_mint_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "key"
                                      |)
                                    |);
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_function (| "spl_token_2022::id", [] |),
                                        []
                                      |)
                                    |)
                                  ]
                                |)
                              |);
                              (* Unsize *)
                              M.pointer_coercion
                                (M.alloc (|
                                  Value.Array
                                    [
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| native_mint_info |) ]
                                      |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::clone::Clone",
                                          Ty.path "solana_program::account_info::AccountInfo",
                                          [],
                                          "clone",
                                          []
                                        |),
                                        [ M.read (| system_program_info |) ]
                                      |)
                                    ]
                                |));
                              (* Unsize *)
                              M.pointer_coercion
                                (M.alloc (|
                                  Value.Array
                                    [
                                      M.read (|
                                        M.get_constant (|
                                          "spl_token_2022::native_mint::PROGRAM_ADDRESS_SEEDS"
                                        |)
                                      |)
                                    ]
                                |))
                            ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                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_trait_method (|
                      "solana_program::program_pack::Pack",
                      Ty.path "spl_token_2022::state::Mint",
                      [],
                      "pack",
                      []
                    |),
                    [
                      M.struct_record_update
                        (M.call_closure (|
                          M.get_trait_method (|
                            "core::default::Default",
                            Ty.path "spl_token_2022::state::Mint",
                            [],
                            "default",
                            []
                          |),
                          []
                        |))
                        [
                          ("decimals",
                            M.read (|
                              M.get_constant (| "spl_token_2022::native_mint::DECIMALS" |)
                            |));
                          ("is_initialized", Value.Bool true)
                        ];
                      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.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 (| native_mint_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "data"
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |)
                          ]
                        |)
                      |)
                    ]
                  |)
                |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_create_native_mint :
      M.IsAssociatedFunction Self "process_create_native_mint" process_create_native_mint.
    
    (*
        pub fn process_initialize_non_transferable_mint(accounts: &[AccountInfo]) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let mint_account_info = next_account_info(account_info_iter)?;
    
            let mut mint_data = mint_account_info.data.borrow_mut();
            let mut mint = PodStateWithExtensionsMut::<PodMint>::unpack_uninitialized(&mut mint_data)?;
            mint.init_extension::<NonTransferable>(true)?;
    
            Ok(())
        }
    *)
    Definition process_initialize_non_transferable_mint (τ : 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 mint_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_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_account_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",
                                      []
                                    |),
                                    [ 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 (|
                      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::non_transferable::NonTransferable"
                                ];
                              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::non_transferable::NonTransferable"
                              ]
                            |),
                            [ 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
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process_initialize_non_transferable_mint :
      M.IsAssociatedFunction
        Self
        "process_initialize_non_transferable_mint"
        process_initialize_non_transferable_mint.
    
    (*
        pub fn process_initialize_permanent_delegate(
            accounts: &[AccountInfo],
            delegate: &Pubkey,
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
            let mint_account_info = next_account_info(account_info_iter)?;
    
            let mut mint_data = mint_account_info.data.borrow_mut();
            let mut mint = PodStateWithExtensionsMut::<PodMint>::unpack_uninitialized(&mut mint_data)?;
            let extension = mint.init_extension::<PermanentDelegate>(true)?;
            extension.delegate = Some( *delegate).try_into()?;
    
            Ok(())
        }
    *)
    Definition process_initialize_permanent_delegate (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ accounts; delegate ] =>
        ltac:(M.monadic
          (let accounts := M.alloc (| accounts |) in
          let delegate := M.alloc (| delegate |) 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_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_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_account_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",
                                      []
                                    |),
                                    [ 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 extension :=
                  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::permanent_delegate::PermanentDelegate"
                                  ];
                                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::permanent_delegate::PermanentDelegate"
                                ]
                              |),
                              [ 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 (| extension |),
                      "spl_token_2022::extension::permanent_delegate::PermanentDelegate",
                      "delegate"
                    |),
                    M.read (|
                      M.match_operator (|
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::try_trait::Try",
                              Ty.apply
                                (Ty.path "core::result::Result")
                                [
                                  Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey";
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::convert::TryInto",
                                  Ty.apply
                                    (Ty.path "core::option::Option")
                                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                                  [ Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey" ],
                                  "try_into",
                                  []
                                |),
                                [
                                  Value.StructTuple
                                    "core::option::Option::Some"
                                    [ M.read (| M.read (| delegate |) |) ]
                                ]
                              |)
                            ]
                          |)
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Break",
                                  0
                                |) in
                              let residual := M.copy (| γ0_0 |) in
                              M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    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.
    
    Axiom AssociatedFunction_process_initialize_permanent_delegate :
      M.IsAssociatedFunction
        Self
        "process_initialize_permanent_delegate"
        process_initialize_permanent_delegate.
    
    (*
        pub fn process_withdraw_excess_lamports(
            program_id: &Pubkey,
            accounts: &[AccountInfo],
        ) -> ProgramResult {
            let account_info_iter = &mut accounts.iter();
    
            let source_info = next_account_info(account_info_iter)?;
            let destination_info = next_account_info(account_info_iter)?;
            let authority_info = next_account_info(account_info_iter)?;
    
            let source_data = source_info.data.borrow();
    
            if let Ok(account) = PodStateWithExtensions::<PodAccount>::unpack(&source_data) {
                if account.base.is_native() {
                    return Err(TokenError::NativeNotSupported.into());
                }
                Self::validate_owner(
                    program_id,
                    &account.base.owner,
                    authority_info,
                    authority_info.data_len(),
                    account_info_iter.as_slice(),
                )?;
            } else if let Ok(mint) = PodStateWithExtensions::<PodMint>::unpack(&source_data) {
                match &mint.base.mint_authority {
                    PodCOption {
                        option: PodCOption::<Pubkey>::SOME,
                        value: mint_authority,
                    } => {
                        Self::validate_owner(
                            program_id,
                            mint_authority,
                            authority_info,
                            authority_info.data_len(),
                            account_info_iter.as_slice(),
                        )?;
                    }
                    _ => return Err(TokenError::AuthorityTypeNotSupported.into()),
                }
            } else if source_data.len() == PodMultisig::SIZE_OF {
                Self::validate_owner(
                    program_id,
                    source_info.key,
                    authority_info,
                    authority_info.data_len(),
                    account_info_iter.as_slice(),
                )?;
            } else {
                return Err(TokenError::InvalidState.into());
            }
    
            let source_rent_exempt_reserve = Rent::get()?.minimum_balance(source_info.data_len());
    
            let transfer_amount = source_info
                .lamports()
                .checked_sub(source_rent_exempt_reserve)
                .ok_or(TokenError::NotRentExempt)?;
    
            let source_starting_lamports = source_info.lamports();
            **source_info.lamports.borrow_mut() = source_starting_lamports
                .checked_sub(transfer_amount)
                .ok_or(TokenError::Overflow)?;
    
            let destination_starting_lamports = destination_info.lamports();
            **destination_info.lamports.borrow_mut() = destination_starting_lamports
                .checked_add(transfer_amount)
                .ok_or(TokenError::Overflow)?;
    
            Ok(())
        }
    *)
    Definition process_withdraw_excess_lamports (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; accounts ] =>
        ltac:(M.monadic
          (let program_id := M.alloc (| program_id |) in
          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 source_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_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 source_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",
                        []
                      |),
                      [
                        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_info |),
                              "solana_program::account_info::AccountInfo",
                              "data"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_associated_function (|
                                  Ty.apply
                                    (Ty.path "spl_token_2022::extension::PodStateWithExtensions")
                                    [ Ty.path "spl_token_2022::pod::PodAccount" ],
                                  "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",
                                        []
                                      |),
                                      [ source_data ]
                                    |)
                                  |)
                                ]
                              |)
                            |) in
                          let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::result::Result::Ok",
                              0
                            |) in
                          let account := 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_associated_function (|
                                              Ty.path "spl_token_2022::pod::PodAccount",
                                              "is_native",
                                              []
                                            |),
                                            [
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  account,
                                                  "spl_token_2022::extension::PodStateWithExtensions",
                                                  "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::NativeNotSupported"
                                                      []
                                                  ]
                                                |)
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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 (|
                                              account,
                                              "spl_token_2022::extension::PodStateWithExtensions",
                                              "base"
                                            |)
                                          |),
                                          "spl_token_2022::pod::PodAccount",
                                          "owner"
                                        |);
                                        M.read (| authority_info |);
                                        M.call_closure (|
                                          M.get_associated_function (|
                                            Ty.path "solana_program::account_info::AccountInfo",
                                            "data_len",
                                            []
                                          |),
                                          [ 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 |) ]
                                        |)
                                      ]
                                    |)
                                  ]
                                |)
                              |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Break",
                                        0
                                      |) in
                                    let residual := M.copy (| γ0_0 |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          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.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.alloc (|
                                      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",
                                                []
                                              |),
                                              [ source_data ]
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::result::Result::Ok",
                                      0
                                    |) in
                                  let mint := M.copy (| γ0_0 |) in
                                  M.match_operator (|
                                    M.alloc (|
                                      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",
                                        "mint_authority"
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ := M.read (| γ |) in
                                          let γ1_0 :=
                                            M.SubPointer.get_struct_record_field (|
                                              γ,
                                              "spl_token_2022::pod::PodCOption",
                                              "option"
                                            |) in
                                          let γ1_1 :=
                                            M.SubPointer.get_struct_record_field (|
                                              γ,
                                              "spl_token_2022::pod::PodCOption",
                                              "value"
                                            |) in
                                          let γ2_0 := M.SubPointer.get_slice_index (| γ1_0, 0 |) in
                                          let γ2_1 := M.SubPointer.get_slice_index (| γ1_0, 1 |) in
                                          let γ2_2 := M.SubPointer.get_slice_index (| γ1_0, 2 |) in
                                          let γ2_3 := M.SubPointer.get_slice_index (| γ1_0, 3 |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ2_0 |),
                                              Value.Integer 1
                                            |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ2_1 |),
                                              Value.Integer 0
                                            |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ2_2 |),
                                              Value.Integer 0
                                            |) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ2_3 |),
                                              Value.Integer 0
                                            |) in
                                          let mint_authority := M.alloc (| γ1_1 |) 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.read (| mint_authority |);
                                                        M.read (| authority_info |);
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "solana_program::account_info::AccountInfo",
                                                            "data_len",
                                                            []
                                                          |),
                                                          [ 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 |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          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 (|
                                            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::AuthorityTypeNotSupported"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.Pure.eq
                                                  (M.call_closure (|
                                                    M.get_associated_function (|
                                                      Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                                      "len",
                                                      []
                                                    |),
                                                    [
                                                      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",
                                                            []
                                                          |),
                                                          [ source_data ]
                                                        |)
                                                      |)
                                                    ]
                                                  |))
                                                  (M.read (|
                                                    M.get_constant (|
                                                      "spl_token_2022::state::PackedSizeOf::SIZE_OF"
                                                    |)
                                                  |))
                                              |)) 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_associated_function (|
                                                        Ty.path
                                                          "spl_token_2022::processor::Processor",
                                                        "validate_owner",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| program_id |);
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (| source_info |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |);
                                                        M.read (| authority_info |);
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "solana_program::account_info::AccountInfo",
                                                            "data_len",
                                                            []
                                                          |),
                                                          [ 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 |) ]
                                                        |)
                                                      ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          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 (|
                                            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::InvalidState"
                                                            []
                                                        ]
                                                      |)
                                                    ]
                                                |)
                                              |)
                                            |)
                                          |)))
                                    ]
                                  |)))
                            ]
                          |)))
                    ]
                  |) in
                let source_rent_exempt_reserve :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::rent::Rent",
                        "minimum_balance",
                        []
                      |),
                      [
                        M.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::rent::Rent";
                                    Ty.path "solana_program::program_error::ProgramError"
                                  ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "solana_program::sysvar::Sysvar",
                                    Ty.path "solana_program::rent::Rent",
                                    [],
                                    "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))
                          ]
                        |);
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "solana_program::account_info::AccountInfo",
                            "data_len",
                            []
                          |),
                          [ M.read (| source_info |) ]
                        |)
                      ]
                    |)
                  |) in
                let transfer_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.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_associated_function (|
                                        Ty.path "solana_program::account_info::AccountInfo",
                                        "lamports",
                                        []
                                      |),
                                      [ M.read (| source_info |) ]
                                    |);
                                    M.read (| source_rent_exempt_reserve |)
                                  ]
                                |);
                                Value.StructTuple
                                  "spl_token_2022::error::TokenError::NotRentExempt"
                                  []
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  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 source_starting_lamports :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "lamports",
                        []
                      |),
                      [ M.read (| source_info |) ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    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.path "u64" ] ],
                          [],
                          "deref_mut",
                          []
                        |),
                        [
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::cell::RefCell")
                                  [ Ty.apply (Ty.path "&mut") [ Ty.path "u64" ] ],
                                "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.path "u64" ] ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| source_info |),
                                      "solana_program::account_info::AccountInfo",
                                      "lamports"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |)
                        ]
                      |)
                    |),
                    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.read (| source_starting_lamports |);
                                      M.read (| transfer_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 destination_starting_lamports :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "solana_program::account_info::AccountInfo",
                        "lamports",
                        []
                      |),
                      [ M.read (| destination_info |) ]
                    |)
                  |) in
                let _ :=
                  M.write (|
                    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.path "u64" ] ],
                          [],
                          "deref_mut",
                          []
                        |),
                        [
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.apply
                                  (Ty.path "core::cell::RefCell")
                                  [ Ty.apply (Ty.path "&mut") [ Ty.path "u64" ] ],
                                "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.path "u64" ] ];
                                        Ty.path "alloc::alloc::Global"
                                      ],
                                    [],
                                    "deref",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| destination_info |),
                                      "solana_program::account_info::AccountInfo",
                                      "lamports"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |)
                        ]
                      |)
                    |),
                    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.read (| destination_starting_lamports |);
                                      M.read (| transfer_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.
    
    Axiom AssociatedFunction_process_withdraw_excess_lamports :
      M.IsAssociatedFunction
        Self
        "process_withdraw_excess_lamports"
        process_withdraw_excess_lamports.
    
    (*
        pub fn process(program_id: &Pubkey, accounts: &[AccountInfo], input: &[u8]) -> ProgramResult {
            if let Ok(instruction_type) = decode_instruction_type(input) {
                match instruction_type {
                    PodTokenInstruction::InitializeMint => {
                        msg!("Instruction: InitializeMint");
                        let (data, freeze_authority) =
                            decode_instruction_data_with_coption_pubkey::<InitializeMintData>(input)?;
                        Self::process_initialize_mint(
                            accounts,
                            data.decimals,
                            &data.mint_authority,
                            freeze_authority,
                        )
                    }
                    PodTokenInstruction::InitializeMint2 => {
                        msg!("Instruction: InitializeMint2");
                        let (data, freeze_authority) =
                            decode_instruction_data_with_coption_pubkey::<InitializeMintData>(input)?;
                        Self::process_initialize_mint2(
                            accounts,
                            data.decimals,
                            &data.mint_authority,
                            freeze_authority,
                        )
                    }
                    PodTokenInstruction::InitializeAccount => {
                        msg!("Instruction: InitializeAccount");
                        Self::process_initialize_account(accounts)
                    }
                    PodTokenInstruction::InitializeAccount2 => {
                        msg!("Instruction: InitializeAccount2");
                        let owner = decode_instruction_data::<Pubkey>(input)?;
                        Self::process_initialize_account2(accounts, owner)
                    }
                    PodTokenInstruction::InitializeAccount3 => {
                        msg!("Instruction: InitializeAccount3");
                        let owner = decode_instruction_data::<Pubkey>(input)?;
                        Self::process_initialize_account3(accounts, owner)
                    }
                    PodTokenInstruction::InitializeMultisig => {
                        msg!("Instruction: InitializeMultisig");
                        let data = decode_instruction_data::<InitializeMultisigData>(input)?;
                        Self::process_initialize_multisig(accounts, data.m)
                    }
                    PodTokenInstruction::InitializeMultisig2 => {
                        msg!("Instruction: InitializeMultisig2");
                        let data = decode_instruction_data::<InitializeMultisigData>(input)?;
                        Self::process_initialize_multisig2(accounts, data.m)
                    }
                    #[allow(deprecated)]
                    PodTokenInstruction::Transfer => {
                        msg!("Instruction: Transfer");
                        let data = decode_instruction_data::<AmountData>(input)?;
                        Self::process_transfer(program_id, accounts, data.amount.into(), None, None)
                    }
                    PodTokenInstruction::Approve => {
                        msg!("Instruction: Approve");
                        let data = decode_instruction_data::<AmountData>(input)?;
                        Self::process_approve(program_id, accounts, data.amount.into(), None)
                    }
                    PodTokenInstruction::Revoke => {
                        msg!("Instruction: Revoke");
                        Self::process_revoke(program_id, accounts)
                    }
                    PodTokenInstruction::SetAuthority => {
                        msg!("Instruction: SetAuthority");
                        let (data, new_authority) =
                            decode_instruction_data_with_coption_pubkey::<SetAuthorityData>(input)?;
                        Self::process_set_authority(
                            program_id,
                            accounts,
                            AuthorityType::from(data.authority_type)?,
                            new_authority,
                        )
                    }
                    PodTokenInstruction::MintTo => {
                        msg!("Instruction: MintTo");
                        let data = decode_instruction_data::<AmountData>(input)?;
                        Self::process_mint_to(program_id, accounts, data.amount.into(), None)
                    }
                    PodTokenInstruction::Burn => {
                        msg!("Instruction: Burn");
                        let data = decode_instruction_data::<AmountData>(input)?;
                        Self::process_burn(program_id, accounts, data.amount.into(), None)
                    }
                    PodTokenInstruction::CloseAccount => {
                        msg!("Instruction: CloseAccount");
                        Self::process_close_account(program_id, accounts)
                    }
                    PodTokenInstruction::FreezeAccount => {
                        msg!("Instruction: FreezeAccount");
                        Self::process_toggle_freeze_account(program_id, accounts, true)
                    }
                    PodTokenInstruction::ThawAccount => {
                        msg!("Instruction: ThawAccount");
                        Self::process_toggle_freeze_account(program_id, accounts, false)
                    }
                    PodTokenInstruction::TransferChecked => {
                        msg!("Instruction: TransferChecked");
                        let data = decode_instruction_data::<AmountCheckedData>(input)?;
                        Self::process_transfer(
                            program_id,
                            accounts,
                            data.amount.into(),
                            Some(data.decimals),
                            None,
                        )
                    }
                    PodTokenInstruction::ApproveChecked => {
                        msg!("Instruction: ApproveChecked");
                        let data = decode_instruction_data::<AmountCheckedData>(input)?;
                        Self::process_approve(
                            program_id,
                            accounts,
                            data.amount.into(),
                            Some(data.decimals),
                        )
                    }
                    PodTokenInstruction::MintToChecked => {
                        msg!("Instruction: MintToChecked");
                        let data = decode_instruction_data::<AmountCheckedData>(input)?;
                        Self::process_mint_to(
                            program_id,
                            accounts,
                            data.amount.into(),
                            Some(data.decimals),
                        )
                    }
                    PodTokenInstruction::BurnChecked => {
                        msg!("Instruction: BurnChecked");
                        let data = decode_instruction_data::<AmountCheckedData>(input)?;
                        Self::process_burn(
                            program_id,
                            accounts,
                            data.amount.into(),
                            Some(data.decimals),
                        )
                    }
                    PodTokenInstruction::SyncNative => {
                        msg!("Instruction: SyncNative");
                        Self::process_sync_native(accounts)
                    }
                    PodTokenInstruction::GetAccountDataSize => {
                        msg!("Instruction: GetAccountDataSize");
                        let extension_types = input[1..]
                            .chunks(std::mem::size_of::<ExtensionType>())
                            .map(ExtensionType::try_from)
                            .collect::<Result<Vec<_>, _>>()?;
                        Self::process_get_account_data_size(accounts, &extension_types)
                    }
                    PodTokenInstruction::InitializeMintCloseAuthority => {
                        msg!("Instruction: InitializeMintCloseAuthority");
                        let (_, close_authority) =
                            decode_instruction_data_with_coption_pubkey::<()>(input)?;
                        Self::process_initialize_mint_close_authority(accounts, close_authority)
                    }
                    PodTokenInstruction::TransferFeeExtension => {
                        transfer_fee::processor::process_instruction(program_id, accounts, &input[1..])
                    }
                    PodTokenInstruction::ConfidentialTransferExtension => {
                        confidential_transfer::processor::process_instruction(
                            program_id,
                            accounts,
                            &input[1..],
                        )
                    }
                    PodTokenInstruction::DefaultAccountStateExtension => {
                        default_account_state::processor::process_instruction(
                            program_id,
                            accounts,
                            &input[1..],
                        )
                    }
                    PodTokenInstruction::InitializeImmutableOwner => {
                        msg!("Instruction: InitializeImmutableOwner");
                        Self::process_initialize_immutable_owner(accounts)
                    }
                    PodTokenInstruction::AmountToUiAmount => {
                        msg!("Instruction: AmountToUiAmount");
                        let data = decode_instruction_data::<AmountData>(input)?;
                        Self::process_amount_to_ui_amount(accounts, data.amount.into())
                    }
                    PodTokenInstruction::UiAmountToAmount => {
                        msg!("Instruction: UiAmountToAmount");
                        let ui_amount = std::str::from_utf8(&input[1..])
                            .map_err(|_| TokenError::InvalidInstruction)?;
                        Self::process_ui_amount_to_amount(accounts, ui_amount)
                    }
                    PodTokenInstruction::Reallocate => {
                        msg!("Instruction: Reallocate");
                        let extension_types = input[1..]
                            .chunks(std::mem::size_of::<ExtensionType>())
                            .map(ExtensionType::try_from)
                            .collect::<Result<Vec<_>, _>>()?;
                        reallocate::process_reallocate(program_id, accounts, extension_types)
                    }
                    PodTokenInstruction::MemoTransferExtension => {
                        memo_transfer::processor::process_instruction(program_id, accounts, &input[1..])
                    }
                    PodTokenInstruction::CreateNativeMint => {
                        msg!("Instruction: CreateNativeMint");
                        Self::process_create_native_mint(accounts)
                    }
                    PodTokenInstruction::InitializeNonTransferableMint => {
                        msg!("Instruction: InitializeNonTransferableMint");
                        Self::process_initialize_non_transferable_mint(accounts)
                    }
                    PodTokenInstruction::InterestBearingMintExtension => {
                        interest_bearing_mint::processor::process_instruction(
                            program_id,
                            accounts,
                            &input[1..],
                        )
                    }
                    PodTokenInstruction::CpiGuardExtension => {
                        cpi_guard::processor::process_instruction(program_id, accounts, &input[1..])
                    }
                    PodTokenInstruction::InitializePermanentDelegate => {
                        msg!("Instruction: InitializePermanentDelegate");
                        let delegate = decode_instruction_data::<Pubkey>(input)?;
                        Self::process_initialize_permanent_delegate(accounts, delegate)
                    }
                    PodTokenInstruction::TransferHookExtension => {
                        transfer_hook::processor::process_instruction(program_id, accounts, &input[1..])
                    }
                    PodTokenInstruction::ConfidentialTransferFeeExtension => {
                        confidential_transfer_fee::processor::process_instruction(
                            program_id,
                            accounts,
                            &input[1..],
                        )
                    }
                    PodTokenInstruction::WithdrawExcessLamports => {
                        msg!("Instruction: WithdrawExcessLamports");
                        Self::process_withdraw_excess_lamports(program_id, accounts)
                    }
                    PodTokenInstruction::MetadataPointerExtension => {
                        metadata_pointer::processor::process_instruction(
                            program_id,
                            accounts,
                            &input[1..],
                        )
                    }
                    PodTokenInstruction::GroupPointerExtension => {
                        group_pointer::processor::process_instruction(program_id, accounts, &input[1..])
                    }
                    PodTokenInstruction::GroupMemberPointerExtension => {
                        group_member_pointer::processor::process_instruction(
                            program_id,
                            accounts,
                            &input[1..],
                        )
                    }
                }
            } else if let Ok(instruction) = TokenMetadataInstruction::unpack(input) {
                token_metadata::processor::process_instruction(program_id, accounts, instruction)
            } else if let Ok(instruction) = TokenGroupInstruction::unpack(input) {
                token_group::processor::process_instruction(program_id, accounts, instruction)
            } else {
                Err(TokenError::InvalidInstruction.into())
            }
        }
    *)
    Definition process (τ : 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 (|
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.alloc (|
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::instruction::decode_instruction_type",
                                [ Ty.path "spl_token_2022::pod_instruction::PodTokenInstruction" ]
                              |),
                              [ M.read (| input |) ]
                            |)
                          |) in
                        let γ0_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ,
                            "core::result::Result::Ok",
                            0
                          |) in
                        let instruction_type := M.copy (| γ0_0 |) in
                        M.match_operator (|
                          instruction_type,
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: InitializeMint" |) ]
                                    |)
                                  |) 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.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::pod_instruction::InitializeMintData"
                                                    ];
                                                  Ty.apply
                                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::pod_instruction::decode_instruction_data_with_coption_pubkey",
                                              [
                                                Ty.path
                                                  "spl_token_2022::pod_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))
                                    ]
                                  |),
                                  [
                                    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 data := M.copy (| γ0_0 |) in
                                        let freeze_authority := M.copy (| γ0_1 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "spl_token_2022::processor::Processor",
                                              "process_initialize_mint",
                                              []
                                            |),
                                            [
                                              M.read (| accounts |);
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| data |),
                                                  "spl_token_2022::pod_instruction::InitializeMintData",
                                                  "decimals"
                                                |)
                                              |);
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| data |),
                                                "spl_token_2022::pod_instruction::InitializeMintData",
                                                "mint_authority"
                                              |);
                                              M.read (| freeze_authority |)
                                            ]
                                          |)
                                        |)))
                                  ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: InitializeMint2" |) ]
                                    |)
                                  |) 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.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::pod_instruction::InitializeMintData"
                                                    ];
                                                  Ty.apply
                                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::pod_instruction::decode_instruction_data_with_coption_pubkey",
                                              [
                                                Ty.path
                                                  "spl_token_2022::pod_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))
                                    ]
                                  |),
                                  [
                                    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 data := M.copy (| γ0_0 |) in
                                        let freeze_authority := M.copy (| γ0_1 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "spl_token_2022::processor::Processor",
                                              "process_initialize_mint2",
                                              []
                                            |),
                                            [
                                              M.read (| accounts |);
                                              M.read (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| data |),
                                                  "spl_token_2022::pod_instruction::InitializeMintData",
                                                  "decimals"
                                                |)
                                              |);
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| data |),
                                                "spl_token_2022::pod_instruction::InitializeMintData",
                                                "mint_authority"
                                              |);
                                              M.read (| freeze_authority |)
                                            ]
                                          |)
                                        |)))
                                  ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: InitializeAccount" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_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 "Instruction: InitializeAccount2" |)
                                      ]
                                    |)
                                  |) in
                                let owner :=
                                  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::pubkey::Pubkey" ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::instruction::decode_instruction_data",
                                                [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_account2",
                                      []
                                    |),
                                    [ M.read (| accounts |); M.read (| owner |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: InitializeAccount3" |)
                                      ]
                                    |)
                                  |) in
                                let owner :=
                                  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::pubkey::Pubkey" ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::instruction::decode_instruction_data",
                                                [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_account3",
                                      []
                                    |),
                                    [ M.read (| accounts |); M.read (| owner |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: InitializeMultisig" |)
                                      ]
                                    |)
                                  |) 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::pod_instruction::InitializeMultisigData"
                                                  ];
                                                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::pod_instruction::InitializeMultisigData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_multisig",
                                      []
                                    |),
                                    [
                                      M.read (| accounts |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| data |),
                                          "spl_token_2022::pod_instruction::InitializeMultisigData",
                                          "m"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: InitializeMultisig2" |)
                                      ]
                                    |)
                                  |) 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::pod_instruction::InitializeMultisigData"
                                                  ];
                                                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::pod_instruction::InitializeMultisigData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_multisig2",
                                      []
                                    |),
                                    [
                                      M.read (| accounts |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| data |),
                                          "spl_token_2022::pod_instruction::InitializeMultisigData",
                                          "m"
                                        |)
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: 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::pod_instruction::AmountData"
                                                  ];
                                                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::pod_instruction::AmountData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_transfer",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple "core::option::Option::None" [];
                                      Value.StructTuple "core::option::Option::None" []
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: Approve" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountData"
                                                  ];
                                                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::pod_instruction::AmountData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_approve",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple "core::option::Option::None" []
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: Revoke" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_revoke",
                                      []
                                    |),
                                    [ M.read (| program_id |); 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 "Instruction: SetAuthority" |) ]
                                    |)
                                  |) 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.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "spl_token_2022::pod_instruction::SetAuthorityData"
                                                    ];
                                                  Ty.apply
                                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::pod_instruction::decode_instruction_data_with_coption_pubkey",
                                              [
                                                Ty.path
                                                  "spl_token_2022::pod_instruction::SetAuthorityData"
                                              ]
                                            |),
                                            [ 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 γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                        let data := M.copy (| γ0_0 |) in
                                        let new_authority := M.copy (| γ0_1 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "spl_token_2022::processor::Processor",
                                              "process_set_authority",
                                              []
                                            |),
                                            [
                                              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.path
                                                              "spl_token_2022::instruction::AuthorityType";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [],
                                                        "branch",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_associated_function (|
                                                            Ty.path
                                                              "spl_token_2022::instruction::AuthorityType",
                                                            "from",
                                                            []
                                                          |),
                                                          [
                                                            M.read (|
                                                              M.SubPointer.get_struct_record_field (|
                                                                M.read (| data |),
                                                                "spl_token_2022::pod_instruction::SetAuthorityData",
                                                                "authority_type"
                                                              |)
                                                            |)
                                                          ]
                                                        |)
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    fun γ =>
                                                      ltac:(M.monadic
                                                        (let γ0_0 :=
                                                          M.SubPointer.get_struct_tuple_field (|
                                                            γ,
                                                            "core::ops::control_flow::ControlFlow::Break",
                                                            0
                                                          |) in
                                                        let residual := M.copy (| γ0_0 |) in
                                                        M.alloc (|
                                                          M.never_to_any (|
                                                            M.read (|
                                                              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))
                                                  ]
                                                |)
                                              |);
                                              M.read (| new_authority |)
                                            ]
                                          |)
                                        |)))
                                  ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: MintTo" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountData"
                                                  ];
                                                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::pod_instruction::AmountData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_mint_to",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple "core::option::Option::None" []
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: Burn" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountData"
                                                  ];
                                                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::pod_instruction::AmountData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_burn",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple "core::option::Option::None" []
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: CloseAccount" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_close_account",
                                      []
                                    |),
                                    [ M.read (| program_id |); 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 "Instruction: FreezeAccount" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_toggle_freeze_account",
                                      []
                                    |),
                                    [
                                      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 "Instruction: ThawAccount" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_toggle_freeze_account",
                                      []
                                    |),
                                    [
                                      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 "Instruction: TransferChecked" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountCheckedData"
                                                  ];
                                                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::pod_instruction::AmountCheckedData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_transfer",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountCheckedData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| data |),
                                              "spl_token_2022::pod_instruction::AmountCheckedData",
                                              "decimals"
                                            |)
                                          |)
                                        ];
                                      Value.StructTuple "core::option::Option::None" []
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: ApproveChecked" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountCheckedData"
                                                  ];
                                                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::pod_instruction::AmountCheckedData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_approve",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountCheckedData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| data |),
                                              "spl_token_2022::pod_instruction::AmountCheckedData",
                                              "decimals"
                                            |)
                                          |)
                                        ]
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: MintToChecked" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountCheckedData"
                                                  ];
                                                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::pod_instruction::AmountCheckedData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_mint_to",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountCheckedData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| data |),
                                              "spl_token_2022::pod_instruction::AmountCheckedData",
                                              "decimals"
                                            |)
                                          |)
                                        ]
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: BurnChecked" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountCheckedData"
                                                  ];
                                                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::pod_instruction::AmountCheckedData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_burn",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountCheckedData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |);
                                      Value.StructTuple
                                        "core::option::Option::Some"
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.read (| data |),
                                              "spl_token_2022::pod_instruction::AmountCheckedData",
                                              "decimals"
                                            |)
                                          |)
                                        ]
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: SyncNative" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_sync_native",
                                      []
                                    |),
                                    [ 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 "Instruction: GetAccountDataSize" |)
                                      ]
                                    |)
                                  |) in
                                let extension_types :=
                                  M.copy (|
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::ExtensionType";
                                                    Ty.path "alloc::alloc::Global"
                                                  ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::iter::traits::iterator::Iterator",
                                                Ty.apply
                                                  (Ty.path "core::iter::adapters::map::Map")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Chunks")
                                                      [ Ty.path "u8" ];
                                                    Ty.function
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ]
                                                          ]
                                                      ]
                                                      (Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::ExtensionType";
                                                          Ty.associated
                                                        ])
                                                  ],
                                                [],
                                                "collect",
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.apply
                                                        (Ty.path "alloc::vec::Vec")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::ExtensionType";
                                                          Ty.path "alloc::alloc::Global"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ]
                                                ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::iter::traits::iterator::Iterator",
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Chunks")
                                                      [ Ty.path "u8" ],
                                                    [],
                                                    "map",
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::ExtensionType";
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ];
                                                      Ty.function
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&")
                                                            [
                                                              Ty.apply
                                                                (Ty.path "slice")
                                                                [ Ty.path "u8" ]
                                                            ]
                                                        ]
                                                        (Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_token_2022::extension::ExtensionType";
                                                            Ty.associated
                                                          ])
                                                    ]
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                                        "chunks",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::index::Index",
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path
                                                                  "core::ops::range::RangeFrom")
                                                                [ Ty.path "usize" ]
                                                            ],
                                                            "index",
                                                            []
                                                          |),
                                                          [
                                                            M.read (| input |);
                                                            Value.StructRecord
                                                              "core::ops::range::RangeFrom"
                                                              [ ("start", Value.Integer 1) ]
                                                          ]
                                                        |);
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "core::mem::size_of",
                                                            [
                                                              Ty.path
                                                                "spl_token_2022::extension::ExtensionType"
                                                            ]
                                                          |),
                                                          []
                                                        |)
                                                      ]
                                                    |);
                                                    M.get_trait_method (|
                                                      "core::convert::TryFrom",
                                                      Ty.path
                                                        "spl_token_2022::extension::ExtensionType",
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ]
                                                          ]
                                                      ],
                                                      "try_from",
                                                      []
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_get_account_data_size",
                                      []
                                    |),
                                    [
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::deref::Deref",
                                          Ty.apply
                                            (Ty.path "alloc::vec::Vec")
                                            [
                                              Ty.path "spl_token_2022::extension::ExtensionType";
                                              Ty.path "alloc::alloc::Global"
                                            ],
                                          [],
                                          "deref",
                                          []
                                        |),
                                        [ extension_types ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [
                                        M.read (|
                                          Value.String "Instruction: InitializeMintCloseAuthority"
                                        |)
                                      ]
                                    |)
                                  |) 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.apply (Ty.path "&") [ Ty.tuple [] ];
                                                  Ty.apply
                                                    (Ty.path "spl_token_2022::pod::PodCOption")
                                                    [ Ty.path "solana_program::pubkey::Pubkey" ]
                                                ];
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [],
                                          "branch",
                                          []
                                        |),
                                        [
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::pod_instruction::decode_instruction_data_with_coption_pubkey",
                                              [ Ty.tuple [] ]
                                            |),
                                            [ 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 γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                        let close_authority := M.copy (| γ0_1 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_associated_function (|
                                              Ty.path "spl_token_2022::processor::Processor",
                                              "process_initialize_mint_close_authority",
                                              []
                                            |),
                                            [ M.read (| accounts |); M.read (| close_authority |) ]
                                          |)
                                        |)))
                                  ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::transfer_fee::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::confidential_transfer::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::default_account_state::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [
                                        M.read (|
                                          Value.String "Instruction: InitializeImmutableOwner"
                                        |)
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_immutable_owner",
                                      []
                                    |),
                                    [ 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 "Instruction: AmountToUiAmount" |) ]
                                    |)
                                  |) 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::pod_instruction::AmountData"
                                                  ];
                                                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::pod_instruction::AmountData"
                                                ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_amount_to_ui_amount",
                                      []
                                    |),
                                    [
                                      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::pod_instruction::AmountData",
                                              "amount"
                                            |)
                                          |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: UiAmountToAmount" |) ]
                                    |)
                                  |) in
                                let ui_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 "&") [ Ty.path "str" ];
                                                Ty.path "spl_token_2022::error::TokenError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.apply (Ty.path "&") [ Ty.path "str" ];
                                                    Ty.path "core::str::error::Utf8Error"
                                                  ],
                                                "map_err",
                                                [
                                                  Ty.path "spl_token_2022::error::TokenError";
                                                  Ty.function
                                                    [
                                                      Ty.tuple
                                                        [ Ty.path "core::str::error::Utf8Error" ]
                                                    ]
                                                    (Ty.path "spl_token_2022::error::TokenError")
                                                ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_function (|
                                                    "core::str::converts::from_utf8",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::index::Index",
                                                        Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::ops::range::RangeFrom")
                                                            [ Ty.path "usize" ]
                                                        ],
                                                        "index",
                                                        []
                                                      |),
                                                      [
                                                        M.read (| input |);
                                                        Value.StructRecord
                                                          "core::ops::range::RangeFrom"
                                                          [ ("start", Value.Integer 1) ]
                                                      ]
                                                    |)
                                                  ]
                                                |);
                                                M.closure
                                                  (fun γ =>
                                                    ltac:(M.monadic
                                                      match γ with
                                                      | [ α0 ] =>
                                                        M.match_operator (|
                                                          M.alloc (| α0 |),
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (Value.StructTuple
                                                                  "spl_token_2022::error::TokenError::InvalidInstruction"
                                                                  []))
                                                          ]
                                                        |)
                                                      | _ => M.impossible (||)
                                                      end))
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.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 (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_ui_amount_to_amount",
                                      []
                                    |),
                                    [ M.read (| accounts |); M.read (| ui_amount |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: Reallocate" |) ]
                                    |)
                                  |) in
                                let extension_types :=
                                  M.copy (|
                                    M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::ops::try_trait::Try",
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.apply
                                                  (Ty.path "alloc::vec::Vec")
                                                  [
                                                    Ty.path
                                                      "spl_token_2022::extension::ExtensionType";
                                                    Ty.path "alloc::alloc::Global"
                                                  ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::iter::traits::iterator::Iterator",
                                                Ty.apply
                                                  (Ty.path "core::iter::adapters::map::Map")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Chunks")
                                                      [ Ty.path "u8" ];
                                                    Ty.function
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ]
                                                          ]
                                                      ]
                                                      (Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::ExtensionType";
                                                          Ty.associated
                                                        ])
                                                  ],
                                                [],
                                                "collect",
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.apply
                                                        (Ty.path "alloc::vec::Vec")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::ExtensionType";
                                                          Ty.path "alloc::alloc::Global"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ]
                                                ]
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::iter::traits::iterator::Iterator",
                                                    Ty.apply
                                                      (Ty.path "core::slice::iter::Chunks")
                                                      [ Ty.path "u8" ],
                                                    [],
                                                    "map",
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::result::Result")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::ExtensionType";
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ];
                                                      Ty.function
                                                        [
                                                          Ty.apply
                                                            (Ty.path "&")
                                                            [
                                                              Ty.apply
                                                                (Ty.path "slice")
                                                                [ Ty.path "u8" ]
                                                            ]
                                                        ]
                                                        (Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "spl_token_2022::extension::ExtensionType";
                                                            Ty.associated
                                                          ])
                                                    ]
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_associated_function (|
                                                        Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                                        "chunks",
                                                        []
                                                      |),
                                                      [
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::index::Index",
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path
                                                                  "core::ops::range::RangeFrom")
                                                                [ Ty.path "usize" ]
                                                            ],
                                                            "index",
                                                            []
                                                          |),
                                                          [
                                                            M.read (| input |);
                                                            Value.StructRecord
                                                              "core::ops::range::RangeFrom"
                                                              [ ("start", Value.Integer 1) ]
                                                          ]
                                                        |);
                                                        M.call_closure (|
                                                          M.get_function (|
                                                            "core::mem::size_of",
                                                            [
                                                              Ty.path
                                                                "spl_token_2022::extension::ExtensionType"
                                                            ]
                                                          |),
                                                          []
                                                        |)
                                                      ]
                                                    |);
                                                    M.get_trait_method (|
                                                      "core::convert::TryFrom",
                                                      Ty.path
                                                        "spl_token_2022::extension::ExtensionType",
                                                      [
                                                        Ty.apply
                                                          (Ty.path "&")
                                                          [
                                                            Ty.apply
                                                              (Ty.path "slice")
                                                              [ Ty.path "u8" ]
                                                          ]
                                                      ],
                                                      "try_from",
                                                      []
                                                    |)
                                                  ]
                                                |)
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  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::reallocate::process_reallocate",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.read (| extension_types |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::memo_transfer::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [ M.read (| Value.String "Instruction: CreateNativeMint" |) ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_create_native_mint",
                                      []
                                    |),
                                    [ 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 "Instruction: InitializeNonTransferableMint"
                                        |)
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_non_transferable_mint",
                                      []
                                    |),
                                    [ M.read (| accounts |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::interest_bearing_mint::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::cpi_guard::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [
                                        M.read (|
                                          Value.String "Instruction: InitializePermanentDelegate"
                                        |)
                                      ]
                                    |)
                                  |) in
                                let delegate :=
                                  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::pubkey::Pubkey" ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::instruction::decode_instruction_data",
                                                [ Ty.path "solana_program::pubkey::Pubkey" ]
                                              |),
                                              [ 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_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_initialize_permanent_delegate",
                                      []
                                    |),
                                    [ M.read (| accounts |); M.read (| delegate |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::transfer_hook::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::confidential_transfer_fee::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (let _ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "solana_program::log::sol_log", [] |),
                                      [
                                        M.read (|
                                          Value.String "Instruction: WithdrawExcessLamports"
                                        |)
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_associated_function (|
                                      Ty.path "spl_token_2022::processor::Processor",
                                      "process_withdraw_excess_lamports",
                                      []
                                    |),
                                    [ M.read (| program_id |); M.read (| accounts |) ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::metadata_pointer::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::group_pointer::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::group_member_pointer::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::ops::index::Index",
                                          Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::ops::range::RangeFrom")
                                              [ Ty.path "usize" ]
                                          ],
                                          "index",
                                          []
                                        |),
                                        [
                                          M.read (| input |);
                                          Value.StructRecord
                                            "core::ops::range::RangeFrom"
                                            [ ("start", Value.Integer 1) ]
                                        ]
                                      |)
                                    ]
                                  |)
                                |)))
                          ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_associated_function (|
                                        Ty.path
                                          "spl_token_metadata_interface::instruction::TokenMetadataInstruction",
                                        "unpack",
                                        []
                                      |),
                                      [ M.read (| input |) ]
                                    |)
                                  |) in
                                let γ0_0 :=
                                  M.SubPointer.get_struct_tuple_field (|
                                    γ,
                                    "core::result::Result::Ok",
                                    0
                                  |) in
                                let instruction := M.copy (| γ0_0 |) in
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_function (|
                                      "spl_token_2022::extension::token_metadata::processor::process_instruction",
                                      []
                                    |),
                                    [
                                      M.read (| program_id |);
                                      M.read (| accounts |);
                                      M.read (| instruction |)
                                    ]
                                  |)
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.path
                                                  "spl_token_group_interface::instruction::TokenGroupInstruction",
                                                "unpack",
                                                []
                                              |),
                                              [ M.read (| input |) ]
                                            |)
                                          |) in
                                        let γ0_0 :=
                                          M.SubPointer.get_struct_tuple_field (|
                                            γ,
                                            "core::result::Result::Ok",
                                            0
                                          |) in
                                        let instruction := M.copy (| γ0_0 |) in
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_function (|
                                              "spl_token_2022::extension::token_group::processor::process_instruction",
                                              []
                                            |),
                                            [
                                              M.read (| program_id |);
                                              M.read (| accounts |);
                                              M.read (| instruction |)
                                            ]
                                          |)
                                        |)));
                                    fun γ =>
                                      ltac:(M.monadic
                                        (M.alloc (|
                                          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::InvalidInstruction"
                                                    []
                                                ]
                                              |)
                                            ]
                                        |)))
                                  ]
                                |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_process : M.IsAssociatedFunction Self "process" process.
    
    (*
        pub fn validate_owner(
            program_id: &Pubkey,
            expected_owner: &Pubkey,
            owner_account_info: &AccountInfo,
            owner_account_data_len: usize,
            signers: &[AccountInfo],
        ) -> ProgramResult {
            if !cmp_pubkeys(expected_owner, owner_account_info.key) {
                return Err(TokenError::OwnerMismatch.into());
            }
    
            if cmp_pubkeys(program_id, owner_account_info.owner)
                && owner_account_data_len == PodMultisig::SIZE_OF
            {
                let multisig_data = &owner_account_info.data.borrow();
                let multisig = pod_from_bytes::<PodMultisig>(multisig_data)?;
                let mut num_signers = 0;
                let mut matched = [false; MAX_SIGNERS];
                for signer in signers.iter() {
                    for (position, key) in multisig.signers[0..multisig.n as usize].iter().enumerate() {
                        if cmp_pubkeys(key, signer.key) && !matched[position] {
                            if !signer.is_signer {
                                return Err(ProgramError::MissingRequiredSignature);
                            }
                            matched[position] = true;
                            num_signers += 1;
                        }
                    }
                }
                if num_signers < multisig.m {
                    return Err(ProgramError::MissingRequiredSignature);
                }
                return Ok(());
            } else if !owner_account_info.is_signer {
                return Err(ProgramError::MissingRequiredSignature);
            }
            Ok(())
        }
    *)
    Definition validate_owner (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ program_id; expected_owner; owner_account_info; owner_account_data_len; signers ] =>
        ltac:(M.monadic
          (let program_id := M.alloc (| program_id |) in
          let expected_owner := M.alloc (| expected_owner |) in
          let owner_account_info := M.alloc (| owner_account_info |) in
          let owner_account_data_len := M.alloc (| owner_account_data_len |) in
          let signers := M.alloc (| signers |) 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 (|
                                UnOp.Pure.not
                                  (M.call_closure (|
                                    M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                    [
                                      M.read (| expected_owner |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| owner_account_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.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.and (|
                                  M.call_closure (|
                                    M.get_function (| "spl_token_2022::cmp_pubkeys", [] |),
                                    [
                                      M.read (| program_id |);
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| owner_account_info |),
                                          "solana_program::account_info::AccountInfo",
                                          "owner"
                                        |)
                                      |)
                                    ]
                                  |),
                                  ltac:(M.monadic
                                    (BinOp.Pure.eq
                                      (M.read (| owner_account_data_len |))
                                      (M.read (|
                                        M.get_constant (|
                                          "spl_token_2022::state::PackedSizeOf::SIZE_OF"
                                        |)
                                      |))))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                let multisig_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 (| owner_account_info |),
                                                "solana_program::account_info::AccountInfo",
                                                "data"
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |)
                                  |) in
                                let multisig :=
                                  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::pod::PodMultisig" ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_pod::bytemuck::pod_from_bytes",
                                                [ Ty.path "spl_token_2022::pod::PodMultisig" ]
                                              |),
                                              [
                                                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 (| multisig_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 num_signers := M.alloc (| Value.Integer 0 |) in
                                let matched := M.alloc (| repeat (Value.Bool false) 11 |) in
                                let _ :=
                                  M.use
                                    (M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::collect::IntoIterator",
                                            Ty.apply
                                              (Ty.path "core::slice::iter::Iter")
                                              [ Ty.path "solana_program::account_info::AccountInfo"
                                              ],
                                            [],
                                            "into_iter",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_associated_function (|
                                                Ty.apply
                                                  (Ty.path "slice")
                                                  [
                                                    Ty.path
                                                      "solana_program::account_info::AccountInfo"
                                                  ],
                                                "iter",
                                                []
                                              |),
                                              [ M.read (| signers |) ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let iter := M.copy (| γ |) in
                                            M.loop (|
                                              ltac:(M.monadic
                                                (let _ :=
                                                  M.match_operator (|
                                                    M.alloc (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::iter::traits::iterator::Iterator",
                                                          Ty.apply
                                                            (Ty.path "core::slice::iter::Iter")
                                                            [
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo"
                                                            ],
                                                          [],
                                                          "next",
                                                          []
                                                        |),
                                                        [ iter ]
                                                      |)
                                                    |),
                                                    [
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (M.alloc (|
                                                            M.never_to_any (|
                                                              M.read (| M.break (||) |)
                                                            |)
                                                          |)));
                                                      fun γ =>
                                                        ltac:(M.monadic
                                                          (let γ0_0 :=
                                                            M.SubPointer.get_struct_tuple_field (|
                                                              γ,
                                                              "core::option::Option::Some",
                                                              0
                                                            |) in
                                                          let signer := M.copy (| γ0_0 |) in
                                                          M.use
                                                            (M.match_operator (|
                                                              M.alloc (|
                                                                M.call_closure (|
                                                                  M.get_trait_method (|
                                                                    "core::iter::traits::collect::IntoIterator",
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::iter::adapters::enumerate::Enumerate")
                                                                      [
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::slice::iter::Iter")
                                                                          [
                                                                            Ty.path
                                                                              "solana_program::pubkey::Pubkey"
                                                                          ]
                                                                      ],
                                                                    [],
                                                                    "into_iter",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::iter::traits::iterator::Iterator",
                                                                        Ty.apply
                                                                          (Ty.path
                                                                            "core::slice::iter::Iter")
                                                                          [
                                                                            Ty.path
                                                                              "solana_program::pubkey::Pubkey"
                                                                          ],
                                                                        [],
                                                                        "enumerate",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.call_closure (|
                                                                          M.get_associated_function (|
                                                                            Ty.apply
                                                                              (Ty.path "slice")
                                                                              [
                                                                                Ty.path
                                                                                  "solana_program::pubkey::Pubkey"
                                                                              ],
                                                                            "iter",
                                                                            []
                                                                          |),
                                                                          [
                                                                            M.call_closure (|
                                                                              M.get_trait_method (|
                                                                                "core::ops::index::Index",
                                                                                Ty.apply
                                                                                  (Ty.path "array")
                                                                                  [
                                                                                    Ty.path
                                                                                      "solana_program::pubkey::Pubkey"
                                                                                  ],
                                                                                [
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::ops::range::Range")
                                                                                    [
                                                                                      Ty.path
                                                                                        "usize"
                                                                                    ]
                                                                                ],
                                                                                "index",
                                                                                []
                                                                              |),
                                                                              [
                                                                                M.SubPointer.get_struct_record_field (|
                                                                                  M.read (|
                                                                                    multisig
                                                                                  |),
                                                                                  "spl_token_2022::pod::PodMultisig",
                                                                                  "signers"
                                                                                |);
                                                                                Value.StructRecord
                                                                                  "core::ops::range::Range"
                                                                                  [
                                                                                    ("start",
                                                                                      Value.Integer
                                                                                        0);
                                                                                    ("end_",
                                                                                      M.rust_cast
                                                                                        (M.read (|
                                                                                          M.SubPointer.get_struct_record_field (|
                                                                                            M.read (|
                                                                                              multisig
                                                                                            |),
                                                                                            "spl_token_2022::pod::PodMultisig",
                                                                                            "n"
                                                                                          |)
                                                                                        |)))
                                                                                  ]
                                                                              ]
                                                                            |)
                                                                          ]
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              |),
                                                              [
                                                                fun γ =>
                                                                  ltac:(M.monadic
                                                                    (let iter := M.copy (| γ |) in
                                                                    M.loop (|
                                                                      ltac:(M.monadic
                                                                        (let _ :=
                                                                          M.match_operator (|
                                                                            M.alloc (|
                                                                              M.call_closure (|
                                                                                M.get_trait_method (|
                                                                                  "core::iter::traits::iterator::Iterator",
                                                                                  Ty.apply
                                                                                    (Ty.path
                                                                                      "core::iter::adapters::enumerate::Enumerate")
                                                                                    [
                                                                                      Ty.apply
                                                                                        (Ty.path
                                                                                          "core::slice::iter::Iter")
                                                                                        [
                                                                                          Ty.path
                                                                                            "solana_program::pubkey::Pubkey"
                                                                                        ]
                                                                                    ],
                                                                                  [],
                                                                                  "next",
                                                                                  []
                                                                                |),
                                                                                [ iter ]
                                                                              |)
                                                                            |),
                                                                            [
                                                                              fun γ =>
                                                                                ltac:(M.monadic
                                                                                  (M.alloc (|
                                                                                    M.never_to_any (|
                                                                                      M.read (|
                                                                                        M.break (||)
                                                                                      |)
                                                                                    |)
                                                                                  |)));
                                                                              fun γ =>
                                                                                ltac:(M.monadic
                                                                                  (let γ0_0 :=
                                                                                    M.SubPointer.get_struct_tuple_field (|
                                                                                      γ,
                                                                                      "core::option::Option::Some",
                                                                                      0
                                                                                    |) in
                                                                                  let γ1_0 :=
                                                                                    M.SubPointer.get_tuple_field (|
                                                                                      γ0_0,
                                                                                      0
                                                                                    |) in
                                                                                  let γ1_1 :=
                                                                                    M.SubPointer.get_tuple_field (|
                                                                                      γ0_0,
                                                                                      1
                                                                                    |) in
                                                                                  let position :=
                                                                                    M.copy (|
                                                                                      γ1_0
                                                                                    |) in
                                                                                  let key :=
                                                                                    M.copy (|
                                                                                      γ1_1
                                                                                    |) in
                                                                                  M.match_operator (|
                                                                                    M.alloc (|
                                                                                      Value.Tuple []
                                                                                    |),
                                                                                    [
                                                                                      fun γ =>
                                                                                        ltac:(M.monadic
                                                                                          (let γ :=
                                                                                            M.use
                                                                                              (M.alloc (|
                                                                                                LogicalOp.and (|
                                                                                                  M.call_closure (|
                                                                                                    M.get_function (|
                                                                                                      "spl_token_2022::cmp_pubkeys",
                                                                                                      []
                                                                                                    |),
                                                                                                    [
                                                                                                      M.read (|
                                                                                                        key
                                                                                                      |);
                                                                                                      M.read (|
                                                                                                        M.SubPointer.get_struct_record_field (|
                                                                                                          M.read (|
                                                                                                            signer
                                                                                                          |),
                                                                                                          "solana_program::account_info::AccountInfo",
                                                                                                          "key"
                                                                                                        |)
                                                                                                      |)
                                                                                                    ]
                                                                                                  |),
                                                                                                  ltac:(M.monadic
                                                                                                    (UnOp.Pure.not
                                                                                                      (M.read (|
                                                                                                        M.SubPointer.get_array_field (|
                                                                                                          matched,
                                                                                                          position
                                                                                                        |)
                                                                                                      |))))
                                                                                                |)
                                                                                              |)) in
                                                                                          let _ :=
                                                                                            M.is_constant_or_break_match (|
                                                                                              M.read (|
                                                                                                γ
                                                                                              |),
                                                                                              Value.Bool
                                                                                                true
                                                                                            |) 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 (|
                                                                                                                  signer
                                                                                                                |),
                                                                                                                "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.write (|
                                                                                              M.SubPointer.get_array_field (|
                                                                                                matched,
                                                                                                position
                                                                                              |),
                                                                                              Value.Bool
                                                                                                true
                                                                                            |) in
                                                                                          let _ :=
                                                                                            let β :=
                                                                                              num_signers in
                                                                                            M.write (|
                                                                                              β,
                                                                                              BinOp.Panic.add (|
                                                                                                Integer.U8,
                                                                                                M.read (|
                                                                                                  β
                                                                                                |),
                                                                                                Value.Integer
                                                                                                  1
                                                                                              |)
                                                                                            |) in
                                                                                          M.alloc (|
                                                                                            Value.Tuple
                                                                                              []
                                                                                          |)));
                                                                                      fun γ =>
                                                                                        ltac:(M.monadic
                                                                                          (M.alloc (|
                                                                                            Value.Tuple
                                                                                              []
                                                                                          |)))
                                                                                    ]
                                                                                  |)))
                                                                            ]
                                                                          |) in
                                                                        M.alloc (|
                                                                          Value.Tuple []
                                                                        |)))
                                                                    |)))
                                                              ]
                                                            |))))
                                                    ]
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                            |)))
                                      ]
                                    |)) in
                                let _ :=
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                BinOp.Pure.lt
                                                  (M.read (| num_signers |))
                                                  (M.read (|
                                                    M.SubPointer.get_struct_record_field (|
                                                      M.read (| multisig |),
                                                      "spl_token_2022::pod::PodMultisig",
                                                      "m"
                                                    |)
                                                  |))
                                              |)) 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
                                M.return_ (|
                                  Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]
                                |)
                              |)
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (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 (| owner_account_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
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_validate_owner :
      M.IsAssociatedFunction Self "validate_owner" validate_owner.
    
    (*
        fn get_required_account_extensions(
            mint_account_info: &AccountInfo,
        ) -> Result<Vec<ExtensionType>, ProgramError> {
            let mint_data = mint_account_info.data.borrow();
            let state = PodStateWithExtensions::<PodMint>::unpack(&mint_data)
                .map_err(|_| Into::<ProgramError>::into(TokenError::InvalidMint))?;
            Self::get_required_account_extensions_from_unpacked_mint(mint_account_info.owner, &state)
        }
    *)
    Definition get_required_account_extensions (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ mint_account_info ] =>
        ltac:(M.monadic
          (let mint_account_info := M.alloc (| mint_account_info |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                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",
                        []
                      |),
                      [
                        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_account_info |),
                              "solana_program::account_info::AccountInfo",
                              "data"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                let 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 "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 "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"
                                  ],
                                "map_err",
                                [
                                  Ty.path "solana_program::program_error::ProgramError";
                                  Ty.function
                                    [
                                      Ty.tuple
                                        [ Ty.path "solana_program::program_error::ProgramError" ]
                                    ]
                                    (Ty.path "solana_program::program_error::ProgramError")
                                ]
                              |),
                              [
                                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",
                                          []
                                        |),
                                        [ mint_data ]
                                      |)
                                    |)
                                  ]
                                |);
                                M.closure
                                  (fun γ =>
                                    ltac:(M.monadic
                                      match γ with
                                      | [ α0 ] =>
                                        M.match_operator (|
                                          M.alloc (| α0 |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (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::InvalidMint"
                                                      []
                                                  ]
                                                |)))
                                          ]
                                        |)
                                      | _ => M.impossible (||)
                                      end))
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              [
                                                Ty.path "spl_token_2022::extension::ExtensionType";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |)
                  |) in
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "spl_token_2022::processor::Processor",
                      "get_required_account_extensions_from_unpacked_mint",
                      []
                    |),
                    [
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| mint_account_info |),
                          "solana_program::account_info::AccountInfo",
                          "owner"
                        |)
                      |);
                      state
                    ]
                  |)
                |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_get_required_account_extensions :
      M.IsAssociatedFunction Self "get_required_account_extensions" get_required_account_extensions.
    
    (*
        fn get_required_account_extensions_from_unpacked_mint(
            token_program_id: &Pubkey,
            state: &PodStateWithExtensions<PodMint>,
        ) -> Result<Vec<ExtensionType>, ProgramError> {
            check_program_account(token_program_id)?;
            let mint_extensions = state.get_extension_types()?;
            Ok(ExtensionType::get_required_init_account_extensions(
                &mint_extensions,
            ))
        }
    *)
    Definition get_required_account_extensions_from_unpacked_mint
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match τ, α with
      | [], [ token_program_id; state ] =>
        ltac:(M.monadic
          (let token_program_id := M.alloc (| token_program_id |) in
          let state := M.alloc (| state |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let _ :=
                  M.match_operator (|
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::ops::try_trait::Try",
                          Ty.apply
                            (Ty.path "core::result::Result")
                            [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError" ],
                          [],
                          "branch",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_function (| "spl_token_2022::check_program_account", [] |),
                            [ M.read (| token_program_id |) ]
                          |)
                        ]
                      |)
                    |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Break",
                              0
                            |) in
                          let residual := M.copy (| γ0_0 |) in
                          M.alloc (|
                            M.never_to_any (|
                              M.read (|
                                M.return_ (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::FromResidual",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.apply
                                            (Ty.path "alloc::vec::Vec")
                                            [
                                              Ty.path "spl_token_2022::extension::ExtensionType";
                                              Ty.path "alloc::alloc::Global"
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.path "core::convert::Infallible";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ]
                                      ],
                                      "from_residual",
                                      []
                                    |),
                                    [ M.read (| residual |) ]
                                  |)
                                |)
                              |)
                            |)
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let γ0_0 :=
                            M.SubPointer.get_struct_tuple_field (|
                              γ,
                              "core::ops::control_flow::ControlFlow::Continue",
                              0
                            |) in
                          let val := M.copy (| γ0_0 |) in
                          val))
                    ]
                  |) in
                let mint_extensions :=
                  M.copy (|
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [
                                Ty.apply
                                  (Ty.path "alloc::vec::Vec")
                                  [
                                    Ty.path "spl_token_2022::extension::ExtensionType";
                                    Ty.path "alloc::alloc::Global"
                                  ];
                                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_types",
                                []
                              |),
                              [ M.read (| state |) ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Break",
                                0
                              |) in
                            let residual := M.copy (| γ0_0 |) in
                            M.alloc (|
                              M.never_to_any (|
                                M.read (|
                                  M.return_ (|
                                    M.call_closure (|
                                      M.get_trait_method (|
                                        "core::ops::try_trait::FromResidual",
                                        Ty.apply
                                          (Ty.path "core::result::Result")
                                          [
                                            Ty.apply
                                              (Ty.path "alloc::vec::Vec")
                                              [
                                                Ty.path "spl_token_2022::extension::ExtensionType";
                                                Ty.path "alloc::alloc::Global"
                                              ];
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |)
                  |) in
                M.alloc (|
                  Value.StructTuple
                    "core::result::Result::Ok"
                    [
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "spl_token_2022::extension::ExtensionType",
                          "get_required_init_account_extensions",
                          []
                        |),
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::ops::deref::Deref",
                              Ty.apply
                                (Ty.path "alloc::vec::Vec")
                                [
                                  Ty.path "spl_token_2022::extension::ExtensionType";
                                  Ty.path "alloc::alloc::Global"
                                ],
                              [],
                              "deref",
                              []
                            |),
                            [ mint_extensions ]
                          |)
                        ]
                      |)
                    ]
                |)
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_get_required_account_extensions_from_unpacked_mint :
      M.IsAssociatedFunction
        Self
        "get_required_account_extensions_from_unpacked_mint"
        get_required_account_extensions_from_unpacked_mint.
  End Impl_spl_token_2022_processor_Processor.
  
  (*
  fn delete_account(account_info: &AccountInfo) -> Result<(), ProgramError> {
      account_info.assign(&system_program::id());
      let mut account_data = account_info.data.borrow_mut();
      let data_len = account_data.len();
      solana_program::program_memory::sol_memset( *account_data, 0, data_len);
      Ok(())
  }
  *)
  Definition delete_account (τ : list Ty.t) (α : list Value.t) : M :=
    match τ, α with
    | [], [ account_info ] =>
      ltac:(M.monadic
        (let account_info := M.alloc (| account_info |) in
        M.read (|
          let _ :=
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "solana_program::account_info::AccountInfo",
                  "assign",
                  []
                |),
                [
                  M.read (| account_info |);
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (| "solana_program::system_program::id", [] |),
                      []
                    |)
                  |)
                ]
              |)
            |) in
          let 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 (| account_info |),
                        "solana_program::account_info::AccountInfo",
                        "data"
                      |)
                    ]
                  |)
                ]
              |)
            |) in
          let data_len :=
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply (Ty.path "slice") [ Ty.path "u8" ],
                  "len",
                  []
                |),
                [
                  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",
                        []
                      |),
                      [ account_data ]
                    |)
                  |)
                ]
              |)
            |) in
          let _ :=
            M.alloc (|
              M.call_closure (|
                M.get_function (| "solana_program::program_memory::sol_memset", [] |),
                [
                  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",
                        []
                      |),
                      [ account_data ]
                    |)
                  |);
                  Value.Integer 0;
                  M.read (| data_len |)
                ]
              |)
            |) in
          M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
        |)))
    | _, _ => M.impossible
    end.
End processor.
